X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fcontrollers%2FControlTabular.h;h=da85d26958abe10bc3b5feca3d70a2f13d47c570;hb=ee8d50c73d3c93a894d020df6828f4c2439a7779;hp=83226833de169d52be4c07e1cd589b5e83cfe0fb;hpb=13349032cb4dc8ef44146aa652ff6bbff6698249;p=lyx.git diff --git a/src/frontends/controllers/ControlTabular.h b/src/frontends/controllers/ControlTabular.h index 83226833de..da85d26958 100644 --- a/src/frontends/controllers/ControlTabular.h +++ b/src/frontends/controllers/ControlTabular.h @@ -16,65 +16,62 @@ #ifndef CONTROLTABULAR_H #define CONTROLTABULAR_H -#include "ControlConnections.h" -#include "LString.h" +#include "Dialog.h" #include "tabular.h" -#include -class InsetTabular; - -class ControlTabular : public ControlConnectBD { +class ControlTabular : public Dialog::Controller { public: - ControlTabular(LyXView &, Dialogs &); - - /// get the inset - InsetTabular * inset() const; - + ControlTabular(Dialog &); + /// + virtual bool initialiseParams(string const & data); + /// clean-up on hide. + virtual void clearParams(); + /// We use set() instead. + virtual void dispatchParams() {}; + /// + virtual bool isBufferDependent() const { return true; } + + /// + int getActiveCell() const; /// get the contained tabular - LyXTabular * tabular() const; - + LyXTabular const & tabular() const; + /// return true if units should default to metric + bool useMetricUnits() const; /// set a parameter void set(LyXTabular::Feature, string const & arg = string()); - /// slot launching dialog to an existing inset. - void showInset(InsetTabular *); + /// borders + void toggleTopLine(); + void toggleBottomLine(); + void toggleLeftLine(); + void toggleRightLine(); - /// update inset - void updateInset(InsetTabular *); + void setSpecial(string const & special); - /// return true if units should default to metric - bool metric() const; + void setWidth(string const & width); - /// return true if actual cell is multicolumn - bool isMulticolumnCell() const; + void toggleMultiColumn(); -private: + void rotateTabular(bool yes); + void rotateCell(bool yes); - /// we can't do this ... - virtual void apply() {}; - /// disconnect signals and hide View. - virtual void hide(); - /// update the dialog. - virtual void update(); - - /** Instantiation of ControlConnectBD private virtual method. - Slot connected to update signal. */ - virtual void updateSlot(bool); - - /// show the dialog. - void show(InsetTabular *); - /// connect signals - void connectInset(InsetTabular *); - - /// pointer to the inset passed through connectInset - InsetTabular * inset_; - /// inset::hide connection. - boost::signals::connection ih_; - - /// is the dialog built ? - bool dialog_built_; + enum HALIGN { LEFT, RIGHT, CENTER, BLOCK }; + + void halign(HALIGN h); + + enum VALIGN { TOP, MIDDLE, BOTTOM }; + + void valign(VALIGN h); + + void longTabular(bool yes); + +private: + /// + int active_cell_; + /// + boost::scoped_ptr params_; }; #endif // CONTROLTABULAR_H