]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormBrowser.C
Merging BRANCH_MVC back into HEAD.
[lyx.git] / src / frontends / xforms / FormBrowser.C
1 /* FormBrowser.C
2  * (C) 2001 LyX Team
3  * John Levon, moz@compsoc.man.ac.uk
4  */
5
6 #include <config.h>
7
8 #include FORMS_H_LOCATION
9
10 #ifdef __GNUG__
11 #pragma implementation
12 #endif
13
14 #include "gettext.h"
15 #include "FormBrowser.h"
16 #include "form_browser.h"
17 #include "LyXView.h"
18 #include "Dialogs.h"
19 #include "lyxrc.h"
20 #include "buffer.h"
21
22 #ifdef SIGC_CXX_NAMESPACES
23 using SigC::slot;
24 #endif
25
26 FormBrowser::FormBrowser(LyXView * lv, Dialogs * d, const string & name)
27         : FormBaseBD(lv, d, name)
28 {}
29
30
31 void FormBrowser::build()
32 {
33         dialog_.reset(build_browser());
34
35         // Workaround dumb xforms sizing bug
36         minw_ = form()->w;
37         minh_ = form()->h;
38
39         // Manage the close button
40         bc().setCancel(dialog_->button_close);
41         bc().refresh();
42 }
43
44
45 FL_FORM * FormBrowser::form() const
46 {
47         if (dialog_.get())
48                 return dialog_->form;
49         return 0;
50 }
51
52 void FormBrowser::update()
53 {}
54
55
56 bool FormBrowser::input(FL_OBJECT *, long)
57 {
58         update();
59         return true;
60 }