]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormInclude.h
John's tiny FormGraphics patch and large GUI-I InsetInclude patch.
[lyx.git] / src / frontends / xforms / FormInclude.h
1 /**
2  * \file FormInclude.h
3  * Copyright 2001 the LyX Team
4  * See the file COPYING
5  *
6  * \author Alejandro Aguilar Sierra
7  * \author John Levon
8  */
9 #ifndef FORMINCLUDE_H
10 #define FORMINCLUDE_H
11
12 #ifdef __GNUG__
13 #pragma interface
14 #endif
15
16 #include "FormBase.h"
17 #include "insets/insetinclude.h"
18
19 class InsetInclude;
20  
21 struct FD_form_include;
22
23 /** This class provides an XForms implementation of the FormInclude Dialog.
24  */
25 class FormInclude : public FormBaseBD {
26 public:
27         ///
28         FormInclude(LyXView *, Dialogs *);
29         ///
30         ~FormInclude();
31 private:
32         ///
33         enum State {
34                 /// the browse button
35                 BROWSE=0,
36                 /// the load file button
37                 LOAD=5,
38                 /// the verbatim radio choice
39                 VERBATIM=10,
40                 /// the input and include radio choices
41                 INPUTINCLUDE=11
42         };
43  
44         /// Slot launching dialog to an existing inset
45         void showInclude(InsetInclude *);
46
47         /// Connect signals. Also perform any necessary initialisation.
48         virtual void connect();
49         /// Disconnect signals. Also perform any necessary housekeeping.
50         virtual void disconnect();
51
52         /// Build the dialog
53         virtual void build();
54         /// Filter the inputs
55         virtual bool input( FL_OBJECT *, long );
56         /// Update dialog before showing it
57         virtual void update();
58         /// Apply from dialog (modify or create inset)
59         virtual void apply();
60         /// Pointer to the actual instantiation of the xforms form
61         virtual FL_FORM * form() const;
62         /// bool indicates if a buffer switch took place
63         virtual void updateSlot(bool);
64
65
66         /// Type definition from the fdesign produced header file.
67         FD_form_include * build_include();
68
69         /// Real GUI implementation.
70         FD_form_include * dialog_;
71  
72         /// inset::hide connection.
73         Connection ih_;
74  
75         /// pointer to the inset passed through showInset
76         InsetInclude * inset_;
77         /// the nitty-gritty. What is modified and passed back
78         InsetInclude::InsetIncludeParams params;
79 };
80
81 #endif