]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlMinipage.h
math-space; fixes to include inset dialog; autoconfiguration of gfx converters
[lyx.git] / src / frontends / controllers / ControlMinipage.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *       
7  *          Copyright 2001 The LyX Team.
8  *
9  *======================================================
10  *
11  * \file ControlMinipage.h
12  * \author Juergen Vigna, jug@sad.it
13  * \author Angus Leeming, a.leeming@ic.ac.uk
14  */
15
16 #ifndef CONTROLMINIPAGE_H
17 #define CONTROLMINIPAGE_H
18
19 #include <vector>
20
21 #ifdef __GNUG__
22 #pragma interface
23 #endif
24
25 #include "ControlInset.h"
26 #include "insets/insetminipage.h" // InsetMinipage::Position
27
28 /** This should be moved back into insetminipage.h and InsetMinipage should
29     contain an instance of it. */
30
31 struct MinipageParams {
32         ///
33         MinipageParams();
34         ///
35         MinipageParams(InsetMinipage const &);
36         ///
37         bool operator==(MinipageParams const &) const;
38         ///
39         bool operator!=(MinipageParams const &) const;
40         
41         ///
42         string width;
43         ///
44         InsetMinipage::Position pos;
45 };
46
47
48 class InsetMinipage;
49 class MinipageParams;
50
51 /** A controller for Minipage dialogs.
52  */
53 class ControlMinipage : public ControlInset<InsetMinipage, MinipageParams>  {
54 public:
55         ///
56         ControlMinipage(LyXView &, Dialogs &);
57
58 private:
59         /// Dispatch the changed parameters to the kernel.
60         virtual void applyParamsToInset();
61         /// 
62         virtual void applyParamsNoInset();
63         /// get the parameters from the string passed to createInset.
64         virtual MinipageParams const getParams(string const &)
65                 { return MinipageParams(); }
66         /// get the parameters from the inset passed to showInset.
67         virtual MinipageParams const getParams(InsetMinipage const &);
68 };
69
70 /// Helper functions
71 namespace minipage {
72
73         std::vector<string> const getUnits();
74
75 } //  namespace minipage
76
77 #endif