]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormInset.h
Angus's FormInset work; Dekel's languages patch; my reworking of Angus's stuff +...
[lyx.git] / src / frontends / xforms / FormInset.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 FORMCOMMAND_H
13 #define FORMCOMMAND_H
14
15 #include "FormBase.h"
16 #include "insets/insetcommand.h"
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22
23 /** This class is an XForms GUI base class to insets
24  */
25 class FormInset : public FormBaseBD {
26 public:
27         /// Constructor
28         FormInset( LyXView *, Dialogs *, string const &,
29                    ButtonPolicy * bp = new OkCancelReadOnlyPolicy,
30                    char const * close = N_("Close"),
31                    char const * cancel = N_("Cancel"));
32
33 protected: // methods
34         /// Connect signals. Also perform any necessary initialisation.
35         virtual void connect();
36         /// Disconnect signals. Also perform any necessary housekeeping.
37         virtual void disconnect();
38
39 protected: // data
40         /// inset::hide connection.
41         Connection ih_;
42 };
43
44
45 /** This class is an XForms GUI base class to insets derived from
46     InsetCommand
47  */
48 class FormCommand : public FormInset {
49 public:
50         /// Constructor
51         FormCommand( LyXView *, Dialogs *, string const &,
52                      ButtonPolicy * = new OkCancelReadOnlyPolicy,
53                      char const * close = N_("Close"),
54                      char const * cancel = N_("Cancel"));
55
56 protected:
57         /// Disconnect signals. Also perform any necessary housekeeping.
58         virtual void disconnect();
59
60         /// Slot launching dialog to (possibly) create a new inset
61         void createInset( string const & );
62         /// Slot launching dialog to an existing inset
63         void showInset( InsetCommand * );
64
65         /// pointer to the inset passed through showInset
66         InsetCommand * inset_;
67         /// the nitty-griity. What is modified and passed back
68         InsetCommandParams params;
69 };
70
71 #endif