]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormInset.h
fix tooltips in toolbar
[lyx.git] / src / frontends / xforms / FormInset.h
1 // -*- C++ -*-
2 /**
3  * \file FormInset.h
4  * Copyright 2000-2001 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Angus Leeming, a.leeming@ic.ac.uk
8  */
9
10 /* A base class for dialogs connected to insets. This class is temporary in that
11  * it has been superceeded by the controller-view split.
12  */
13
14 #ifndef FORMCOMMAND_H
15 #define FORMCOMMAND_H
16
17 #include "FormBaseDeprecated.h"
18 #include "insets/insetcommandparams.h"
19
20 #include <boost/signals/connection.hpp>
21
22 #ifdef __GNUG__
23 #pragma interface
24 #endif
25
26 class InsetCommand;
27
28 /** This class is an XForms GUI base class to insets
29  */
30 class FormInset : public FormBaseBD {
31 protected:
32         /// Constructor
33         FormInset(LyXView *, Dialogs *, string const &);
34
35         /// Connect signals. Also perform any necessary initialisation.
36         virtual void connect();
37         /// Disconnect signals. Also perform any necessary housekeeping.
38         virtual void disconnect();
39
40         /// bool indicates if a buffer switch took place
41         virtual void updateSlot(bool);
42
43         /// inset::hide connection.
44         boost::signals::connection ih_;
45 };
46
47
48 /** This class is an XForms GUI base class to insets derived from
49     InsetCommand
50  */
51 class FormCommand : public FormInset {
52 protected:
53         /// Constructor
54         FormCommand(LyXView *, Dialogs *, string const &);
55
56         /// Disconnect signals. Also perform any necessary housekeeping.
57         virtual void disconnect();
58
59         /// Slot launching dialog to (possibly) create a new inset
60         void createInset(string const &);
61         /// Slot launching dialog to an existing inset
62         void showInset(InsetCommand *);
63
64         /// pointer to the inset passed through showInset
65         InsetCommand * inset_;
66         /// the nitty-griity. What is modified and passed back
67         InsetCommandParams params;
68 };
69
70 #endif