]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlFloat.h
Move InsetFloat's params into a separate struct to simplify the move to the new dialo...
[lyx.git] / src / frontends / controllers / ControlFloat.h
1 // -*- C++ -*-
2 /**
3  * \file ControlFloat.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef CONTROLFLOAT_H
13 #define CONTROLFLOAT_H
14
15
16 #include "ControlInset.h"
17 #include "insets/insetfloat.h"
18
19 inline
20 bool operator==(InsetFloatParams const & p1, InsetFloatParams const & p2)
21 {
22         return p1.placement == p2.placement && p1.wide == p2.wide;
23 }
24
25
26 inline
27 bool operator!=(InsetFloatParams const & p1, InsetFloatParams const & p2)
28 {
29         return !(p1 == p2);
30 }
31
32
33 /** A controller for Minipage dialogs.
34  */
35 class ControlFloat : public ControlInset<InsetFloat, InsetFloatParams>  {
36 public:
37         ///
38         ControlFloat(LyXView &, Dialogs &);
39 private:
40         /// Dispatch the changed parameters to the kernel.
41         virtual void applyParamsToInset();
42         ///
43         virtual void applyParamsNoInset();
44         /// get the parameters from the string passed to createInset.
45         virtual InsetFloatParams const getParams(string const &)
46                 { return InsetFloatParams(); }
47         /// get the parameters from the inset passed to showInset.
48         virtual InsetFloatParams const getParams(InsetFloat const &);
49 };
50
51 #endif