3 * \file ControlTabular.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
11 * This is pretty icky, we should really be able to use
12 * ControlInset. We can't because there are no params for
16 #ifndef CONTROLTABULAR_H
17 #define CONTROLTABULAR_H
20 #include "insets/InsetTabular.h"
25 class ControlTabular : public Dialog::Controller {
28 ControlTabular(Dialog &);
30 virtual bool initialiseParams(std::string const & data);
32 virtual void clearParams();
33 /// We use set() instead.
34 virtual void dispatchParams() {};
36 virtual bool isBufferDependent() const { return true; }
38 virtual kb_action getLfun() const { return LFUN_TABULAR_FEATURE; }
41 Tabular::idx_type getActiveCell() const;
42 /// get the contained tabular
43 Tabular const & tabular() const;
44 /// return true if units should default to metric
45 bool useMetricUnits() const;
47 void set(Tabular::Feature, std::string const & arg = std::string());
51 void toggleBottomLine();
52 void toggleLeftLine();
53 void toggleRightLine();
55 void setSpecial(std::string const & special);
57 void setWidth(std::string const & width);
59 void toggleMultiColumn();
61 void rotateTabular(bool yes);
62 void rotateCell(bool yes);
64 enum HALIGN { LEFT, RIGHT, CENTER, BLOCK };
66 void halign(HALIGN h);
68 enum VALIGN { TOP, MIDDLE, BOTTOM };
70 void valign(VALIGN h);
72 void booktabs(bool yes);
74 void longTabular(bool yes);
78 Tabular::idx_type active_cell_;
80 boost::scoped_ptr<Tabular> params_;
83 } // namespace frontend
86 #endif // CONTROLTABULAR_H