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();
48 void multirow_clicked();
51 void hAlign_changed(int align);
52 void vAlign_changed(int align);
53 void tableAlignment_changed(int align);
54 void specialAlignment_changed();
57 void ltNewpage_clicked();
58 void ltHeaderStatus_clicked();
59 void ltHeaderBorderAbove_clicked();
60 void ltHeaderBorderBelow_clicked();
61 void ltFirstHeaderStatus_clicked();
62 void ltFirstHeaderBorderAbove_clicked();
63 void ltFirstHeaderBorderBelow_clicked();
64 void ltFirstHeaderEmpty_clicked();
65 void ltFooterStatus_clicked();
66 void ltFooterBorderAbove_clicked();
67 void ltFooterBorderBelow_clicked();
68 void ltLastFooterStatus_clicked();
69 void ltLastFooterBorderAbove_clicked();
70 void ltLastFooterBorderBelow_clicked();
71 void ltLastFooterEmpty_clicked();
72 void ltAlignment_clicked();
73 void on_captionStatusCB_toggled();
77 bool isValid() { return true; }
79 void updateBorders(Tabular const & tabular);
81 void updateContents();
83 void paramsToDialog(Tabular const & tabular);
84 /// save some values before closing the gui
85 void closeGUI(Tabular const & tabular);
87 bool initialiseParams(std::string const & data);
90 /// We use set() instead.
91 void dispatchParams() {};
93 bool isBufferDependent() const { return true; }
95 FuncCode getLfun() const { return LFUN_TABULAR_FEATURE; }
98 Tabular::idx_type getActiveCell() const;
100 void set(Tabular::Feature, std::string const & arg = std::string());
102 void setSpecial(Tabular const & tabular, std::string const & special);
104 void setWidth(Tabular const & tabular, std::string const & width);
106 void toggleMultiColumn();
107 void toggleMultiRow();
109 void rotateTabular(bool yes);
110 void rotateCell(bool yes);
112 enum HALIGN { LEFT, RIGHT, CENTER, BLOCK };
114 void halign(Tabular const & tabular, HALIGN h);
116 enum VALIGN { TOP, MIDDLE, BOTTOM };
118 void valign(Tabular const & tabular, VALIGN h);
120 void booktabs(bool yes);
122 void longTabular(bool yes);
124 bool funcEnabled(Tabular::Feature f) const;
127 Tabular::idx_type active_cell_;
132 } // namespace frontend
135 #endif // GUITABULAR_H