#include "InsetMathGrid.h"
-#include "Color.h"
#include "DocIterator.h"
#include "OutputEnums.h"
/// This provides an interface between "LyX insets" and "LyX math insets"
class InsetMathHull : public InsetMathGrid {
public:
+ /// How a line is numbered
+ enum Numbered {
+ /// not numbered, LaTeX code \\nonumber if line differs from inset
+ NONUMBER,
+ /// numbered, LaTeX code \\number if line differs from inset
+ NUMBER,
+ /// not numbered, LaTeX code \\notag if line differs from inset
+ NOTAG
+ };
///
InsetMathHull(Buffer * buf);
///
///
void updateBuffer(ParIterator const &, UpdateType);
///
- void addToToc(DocIterator const &) const;
+ void addToToc(DocIterator const & di, bool output_active) const;
///
InsetMathHull & operator=(InsetMathHull const &);
///
///
ColorCode backgroundColor(PainterInfo const &) const;
///
- void numbered(row_type row, bool num);
+ void numbered(row_type row, bool num) { numbered(row, num ? NUMBER : NONUMBER); }
+ ///
+ void numbered(row_type row, Numbered num);
///
bool numbered(row_type row) const;
///
///
char defaultColAlign(col_type col);
///
+ ///
+ char displayColAlign(col_type col, row_type row) const;
+ ///
bool idxFirst(Cursor &) const;
///
bool idxLast(Cursor &) const;
///
bool readQuiet(Lexer & lex);
///
- int plaintext(odocstream &, OutputParams const &) const;
+ int plaintext(odocstringstream &, OutputParams const &,
+ size_t max_length = INT_MAX) const;
///
int docbook(odocstream &, OutputParams const &) const;
///
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
/// get notification when the cursor leaves this inset
bool notifyCursorLeaves(Cursor const & old, Cursor & cur);
void recordLocation(DocIterator const & di);
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
InsetCode lyxCode() const { return MATH_HULL_CODE; }
/// "none", "simple", "display", "eqnarray",...
HullType type_;
///
- std::vector<bool> numbered_;
+ std::vector<Numbered> numbered_;
///
std::vector<docstring> numbers_;
///
///
void handleFont2(Cursor & cur, docstring const & arg);
///
- bool previewState(BufferView * bv) const;
+ bool previewState(BufferView const * const bv) const;
+ ///
+ bool previewTooSmall(Dimension const & dim) const;
};