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