]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormBrowser.h
Merging BRANCH_MVC back into HEAD.
[lyx.git] / src / frontends / xforms / FormBrowser.h
1 // -*- C++ -*-
2 /*
3  * FormBrowser.h
4  *
5  * (C) 2001 LyX Team
6  * John Levon, moz@compsoc.man.ac.uk
7  */
8
9 #ifndef FORMBROWSER_H
10 #define FORMBROWSER_H
11
12 #include <boost/smart_ptr.hpp>
13
14 #include "FormBaseDeprecated.h"
15 #include "xformsBC.h"
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 class LyXView;
22 class Dialogs;
23 struct FD_form_browser;
24
25 /**
26  * This class provides an XForms implementation of a read only
27  * text browser.
28  */
29 class FormBrowser : public FormBaseBD {
30 public:
31         ///
32         FormBrowser(LyXView *, Dialogs *, const string &);
33 protected:
34         /// Update the dialog.
35         virtual void update();
36
37         /// Real GUI implementation.
38         boost::scoped_ptr<FD_form_browser> dialog_;
39         /// Pointer to the actual instantiation of the ButtonController.
40         virtual xformsBC & bc();
41 private:
42         /// Pointer to the actual instantiation of the xforms form
43         virtual FL_FORM * form() const;
44         /// Filter the inputs on callback from xforms
45         virtual bool input(FL_OBJECT *, long);
46         /// Build the dialog
47         virtual void build();
48
49         /// generated build function
50         FD_form_browser * build_browser();
51         /// The ButtonController
52         ButtonController<OkCancelPolicy, xformsBC> bc_;
53 };
54
55
56 inline
57 xformsBC & FormBrowser::bc()
58 {
59         return bc_;
60 }
61 #endif