]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlFloat.h
insetfloat work + stuff
[lyx.git] / src / frontends / controllers / ControlFloat.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 ControlFloat.h
12  */
13
14 #ifndef CONTROLFLOAT_H
15 #define CONTROLFLOAT_H
16
17 #include <vector>
18
19 #ifdef __GNUG__
20 #pragma interface
21 #endif
22
23 #include "ControlInset.h"
24
25 class InsetFloat;
26
27 ///
28 struct FloatParams {
29         ///
30         FloatParams();
31         ///
32         FloatParams(InsetFloat const &);
33         ///
34         string placement;
35 };
36
37
38 inline
39 bool operator==(FloatParams const & p1, FloatParams const & p2) 
40 {
41         return p1.placement == p2.placement;
42 }
43
44
45 /** A controller for Minipage dialogs.
46  */
47 class ControlFloat : public ControlInset<InsetFloat, FloatParams>  {
48 public:
49         ///
50         ControlFloat(LyXView &, Dialogs &);
51 private:
52         /// Dispatch the changed parameters to the kernel.
53         virtual void applyParamsToInset();
54         /// 
55         virtual void applyParamsNoInset();
56         /// get the parameters from the string passed to createInset.
57         virtual FloatParams const getParams(string const &)
58                 { return FloatParams(); }
59         /// get the parameters from the inset passed to showInset.
60         virtual FloatParams const getParams(InsetFloat const &);
61 };
62
63 #endif