X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmathed%2FInsetMathHull.h;h=1b3eef3410676475dd514272231696b1fe20c77a;hb=f9835d054d7aac5830ec6bb5a3537c2b4fa2d269;hp=e02c61971e51f85ed73c20e67c91520857023cfb;hpb=2c0884870086652dd8229378dcb061f1e1baf2c5;p=lyx.git diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index e02c61971e..1b3eef3410 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -17,7 +17,7 @@ #include "DocIterator.h" #include "OutputEnums.h" -#include +#include "support/unique_ptr.h" namespace lyx { @@ -52,7 +52,7 @@ public: void updateBuffer(ParIterator const &, UpdateType); /// void addToToc(DocIterator const & di, bool output_active, - UpdateType utype) const; + UpdateType utype, TocBackend & backend) const; /// InsetMathHull & operator=(InsetMathHull const &); /// @@ -86,6 +86,8 @@ public: /// bool ams() const; /// + bool outerDisplay() const; + /// void validate(LaTeXFeatures & features) const; /// identifies HullInset InsetMathHull const * asHullInset() const { return this; } @@ -105,12 +107,16 @@ public: /// get type HullType getType() const; + /// is mutation implemented for this type? + static bool isMutable(HullType type); /// change type void mutate(HullType newtype); /// int defaultColSpace(col_type col); /// + int displayColSpace(col_type col) const; + /// char defaultColAlign(col_type col); /// char displayColAlign(idx_type idx) const; @@ -181,6 +187,10 @@ public: std::string contextMenuName() const; /// InsetCode lyxCode() const { return MATH_HULL_CODE; } + /// + bool canPaintChange(BufferView const &) const; + /// + bool confirmDeletion() const { return nargs() != 1 || !cell(0).empty(); } protected: InsetMathHull(InsetMathHull const &); @@ -190,6 +200,12 @@ protected: /// do we want to handle this event? bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const; + /// override to set to 0 for inline equation + int leftMargin() const; + /// override to set to 0 for inline equation + int rightMargin() const; + /// override to set to 0 for inline equation + int border() const; /// docstring eolString(row_type row, bool fragile, bool latex, bool last_eoln) const; @@ -231,13 +247,13 @@ private: /// change number of columns, split or combine columns if necessary. void changeCols(col_type); /// - docstring standardFont() const; + std::string standardFont() const; /// ColorCode standardColor() const; /// consistency check void check() const; /// does it understand tabular-feature commands? - bool isTable() const; + bool allowsTabularFeatures() const; /// can this change its number of rows? bool rowChangeOK() const; /// can this change its number of cols? @@ -254,9 +270,7 @@ private: /// std::vector label_; /// - boost::scoped_ptr preview_; - /// - mutable bool use_preview_; + unique_ptr preview_; /// DocIterator docit_; /// @@ -280,6 +294,8 @@ public: Inset * editXY(Cursor & cur, int x, int y); /// DisplayType display() const; + /// + int indent(BufferView const &) const; protected: ///