4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Kalle Dalheimer
9 * \author Jürgen Spitzmüller
12 * Full author contact details are available in file CREDITS.
18 #include "GuiDialog.h"
19 #include "ui_TabularUi.h"
20 #include "insets/InsetTabular.h"
25 class GuiTabular : public GuiDialog, public Ui::TabularUi
30 GuiTabular(GuiView & lv);
34 void change_adaptor();
36 void topspace_changed();
37 void bottomspace_changed();
38 void interlinespace_changed();
39 void booktabsChanged(bool);
41 void borderSet_clicked();
42 void borderUnset_clicked();
43 void leftBorder_changed();
44 void rightBorder_changed();
45 void topBorder_changed();
46 void bottomBorder_changed();
47 void multicolumn_clicked();
50 void hAlign_changed(int align);
51 void vAlign_changed(int align);
52 void specialAlignment_changed();
55 void ltNewpage_clicked();
56 void ltHeaderStatus_clicked();
57 void ltHeaderBorderAbove_clicked();
58 void ltHeaderBorderBelow_clicked();
59 void ltFirstHeaderStatus_clicked();
60 void ltFirstHeaderBorderAbove_clicked();
61 void ltFirstHeaderBorderBelow_clicked();
62 void ltFirstHeaderEmpty_clicked();
63 void ltFooterStatus_clicked();
64 void ltFooterBorderAbove_clicked();
65 void ltFooterBorderBelow_clicked();
66 void ltLastFooterStatus_clicked();
67 void ltLastFooterBorderAbove_clicked();
68 void ltLastFooterBorderBelow_clicked();
69 void ltLastFooterEmpty_clicked();
73 void closeEvent(QCloseEvent * e);
75 bool isValid() { return true; }
77 void update_borders();
79 void updateContents();
80 /// save some values before closing the gui
83 bool initialiseParams(std::string const & data);
86 /// We use set() instead.
87 void dispatchParams() {};
89 bool isBufferDependent() const { return true; }
91 kb_action getLfun() const { return LFUN_TABULAR_FEATURE; }
94 Tabular::idx_type getActiveCell() const;
95 /// return true if units should default to metric
96 bool useMetricUnits() const;
98 void set(Tabular::Feature, std::string const & arg = std::string());
101 void toggleTopLine();
102 void toggleBottomLine();
103 void toggleLeftLine();
104 void toggleRightLine();
106 void setSpecial(std::string const & special);
108 void setWidth(std::string const & width);
110 void toggleMultiColumn();
112 void rotateTabular(bool yes);
113 void rotateCell(bool yes);
115 enum HALIGN { LEFT, RIGHT, CENTER, BLOCK };
117 void halign(HALIGN h);
119 enum VALIGN { TOP, MIDDLE, BOTTOM };
121 void valign(VALIGN h);
123 void booktabs(bool yes);
125 void longTabular(bool yes);
128 Tabular::idx_type active_cell_;
133 } // namespace frontend
136 #endif // GUITABULAR_H