]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlMinipage.h
prefs/tabular MVC work
[lyx.git] / src / frontends / controllers / ControlMinipage.h
1 // -*- C++ -*-
2 /**
3  * \file ControlMinipage.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Vigna
8  * \author Angus Leeming
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef CONTROLMINIPAGE_H
14 #define CONTROLMINIPAGE_H
15
16 #include <vector>
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22 #include "ControlInset.h"
23 #include "insets/insetminipage.h" // InsetMinipage::Position
24
25 /** This should be moved back into insetminipage.h and InsetMinipage should
26     contain an instance of it. */
27
28 struct MinipageParams {
29         ///
30         MinipageParams();
31         ///
32         MinipageParams(InsetMinipage const &);
33         ///
34         LyXLength pageWidth;
35         ///
36         InsetMinipage::Position pos;
37 };
38
39
40 ///
41 bool operator==(MinipageParams const &, MinipageParams const &);
42 ///
43 bool operator!=(MinipageParams const &, MinipageParams const &);
44
45
46 /** A controller for Minipage dialogs.
47  */
48 class ControlMinipage : public ControlInset<InsetMinipage, MinipageParams>  {
49 public:
50         ///
51         ControlMinipage(LyXView &, Dialogs &);
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