]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormRef.h
85c8146cf15293b4dab238f6442cd5f6345162ec
[lyx.git] / src / frontends / xforms / FormRef.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2000 The LyX Team.
8  *
9  * ======================================================
10  */
11
12 #ifndef FORMREF_H
13 #define FORMREF_H
14
15 #include <boost/smart_ptr.hpp>
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "FormInset.h"
22
23 struct FD_form_ref;
24
25 /** This class provides an XForms implementation of the FormRef Dialog.
26  */
27 class FormRef : public FormCommand {
28 public:
29         ///
30         FormRef(LyXView *, Dialogs *);
31 private:
32         /// Pointer to the actual instantiation of the ButtonController.
33         virtual xformsBC & bc();
34         /// Disconnect signals. Also perform any necessary housekeeping.
35         virtual void disconnect();
36
37         /// Build the dialog
38         virtual void build();
39         /// Filter the input
40         virtual bool input(FL_OBJECT *, long);
41         /// Update dialog before showing it
42         virtual void update();
43         /// Not used but must be instantiated
44         virtual void apply();
45         /// Pointer to the actual instantiation of the xforms form
46         virtual FL_FORM * form() const;
47
48         ///
49         void updateBrowser(std::vector<string> const &) const;
50         ///
51         FD_form_ref * build_ref();
52
53         ///
54         bool at_ref;
55         /// 
56         std::vector<string> refs;
57
58         /// Real GUI implementation.
59         boost::scoped_ptr<FD_form_ref> dialog_;
60         /// The ButtonController
61         ButtonController<NoRepeatedApplyPolicy, xformsBC> bc_;
62 };
63
64
65 inline
66 xformsBC & FormRef::bc()
67 {
68         return bc_;
69 }
70 #endif