]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlMinipage.h
bug 183
[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         string width;
38         ///
39         InsetMinipage::Position pos;
40 };
41
42
43 ///
44 bool operator==(MinipageParams const &, MinipageParams const &);
45 ///
46 bool operator!=(MinipageParams const &, MinipageParams const &);
47
48
49 /** A controller for Minipage dialogs.
50  */
51 class ControlMinipage : public ControlInset<InsetMinipage, MinipageParams>  {
52 public:
53         ///
54         ControlMinipage(LyXView &, Dialogs &);
55
56 private:
57         /// Dispatch the changed parameters to the kernel.
58         virtual void applyParamsToInset();
59         /// 
60         virtual void applyParamsNoInset();
61         /// get the parameters from the string passed to createInset.
62         virtual MinipageParams const getParams(string const &)
63                 { return MinipageParams(); }
64         /// get the parameters from the inset passed to showInset.
65         virtual MinipageParams const getParams(InsetMinipage const &);
66 };
67
68 #endif