]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlTabular.h
Finish the task of removing all cruft from the header files.
[lyx.git] / src / frontends / controllers / ControlTabular.h
1 // -*- C++ -*-
2 /**
3  * \file ControlTabular.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  *
11  * This is pretty icky, we should really be able to use
12  * ControlInset. We can't because there are no params for
13  * tabular inset.
14  */
15
16 #ifndef CONTROLTABULAR_H
17 #define CONTROLTABULAR_H
18
19 #include "Dialog.h"
20 #include "tabular.h"
21
22
23 class ControlTabular : public Dialog::Controller {
24 public:
25
26         ControlTabular(Dialog &);
27         ///
28         virtual bool initialiseParams(string const & data);
29         /// clean-up on hide.
30         virtual void clearParams();
31         /// We use set() instead.
32         virtual void dispatchParams() {};
33         ///
34         virtual bool isBufferDependent() const { return true; }
35
36         ///
37         int getActiveCell() const;
38         /// get the contained tabular
39         LyXTabular const & tabular() const;
40         /// return true if units should default to metric
41         bool useMetricUnits() const;
42         /// set a parameter
43         void set(LyXTabular::Feature, string const & arg = string());
44
45         /// borders
46         void toggleTopLine();
47         void toggleBottomLine();
48         void toggleLeftLine();
49         void toggleRightLine();
50
51         void setSpecial(string const & special);
52
53         void setWidth(string const & width);
54
55         void toggleMultiColumn();
56
57         void rotateTabular(bool yes);
58         void rotateCell(bool yes);
59
60         enum HALIGN { LEFT, RIGHT, CENTER, BLOCK };
61
62         void halign(HALIGN h);
63
64         enum VALIGN { TOP, MIDDLE, BOTTOM };
65
66         void valign(VALIGN h);
67
68         void longTabular(bool yes);
69
70 private:
71         ///
72         int active_cell_;
73         ///
74         boost::scoped_ptr<LyXTabular> params_;
75 };
76
77 #endif // CONTROLTABULAR_H