]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlMinipage.h
include sys/time.h
[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
19 #include "ControlInset.h"
20 #include "insets/insetminipage.h" // InsetMinipage::Position
21
22 /** This should be moved back into insetminipage.h and InsetMinipage should
23     contain an instance of it. */
24
25 struct MinipageParams {
26         ///
27         MinipageParams();
28         ///
29         MinipageParams(InsetMinipage const &);
30         ///
31         LyXLength pageWidth;
32         ///
33         InsetMinipage::Position pos;
34 };
35
36
37 ///
38 bool operator==(MinipageParams const &, MinipageParams const &);
39 ///
40 bool operator!=(MinipageParams const &, MinipageParams const &);
41
42
43 /** A controller for Minipage dialogs.
44  */
45 class ControlMinipage : public ControlInset<InsetMinipage, MinipageParams>  {
46 public:
47         ///
48         ControlMinipage(LyXView &, Dialogs &);
49 private:
50         /// Dispatch the changed parameters to the kernel.
51         virtual void applyParamsToInset();
52         ///
53         virtual void applyParamsNoInset();
54         /// get the parameters from the string passed to createInset.
55         virtual MinipageParams const getParams(string const &)
56                 { return MinipageParams(); }
57         /// get the parameters from the inset passed to showInset.
58         virtual MinipageParams const getParams(InsetMinipage const &);
59 };
60
61 #endif