]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlMinipage.h
Really dull and boring header shit
[lyx.git] / src / frontends / controllers / ControlMinipage.h
1 // -*- C++ -*-
2 /**
3  * \file ControlMinipage.h
4  * Read the file COPYING
5  *
6  * \author Jürgen Vigna
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef CONTROLMINIPAGE_H
13 #define CONTROLMINIPAGE_H
14
15 #include <vector>
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "ControlInset.h"
22 #include "insets/insetminipage.h" // InsetMinipage::Position
23
24 /** This should be moved back into insetminipage.h and InsetMinipage should
25     contain an instance of it. */
26
27 struct MinipageParams {
28         ///
29         MinipageParams();
30         ///
31         MinipageParams(InsetMinipage const &);
32         ///
33         LyXLength pageWidth;
34         ///
35         InsetMinipage::Position pos;
36 };
37
38
39 ///
40 bool operator==(MinipageParams const &, MinipageParams const &);
41 ///
42 bool operator!=(MinipageParams const &, MinipageParams const &);
43
44
45 /** A controller for Minipage dialogs.
46  */
47 class ControlMinipage : public ControlInset<InsetMinipage, MinipageParams>  {
48 public:
49         ///
50         ControlMinipage(LyXView &, Dialogs &);
51
52 private:
53         /// Dispatch the changed parameters to the kernel.
54         virtual void applyParamsToInset();
55         ///
56         virtual void applyParamsNoInset();
57         /// get the parameters from the string passed to createInset.
58         virtual MinipageParams const getParams(string const &)
59                 { return MinipageParams(); }
60         /// get the parameters from the inset passed to showInset.
61         virtual MinipageParams const getParams(InsetMinipage const &);
62 };
63
64 #endif