#include "FuncStatus.h"
#include "Lexer.h"
#include "LyXRC.h"
-#include "Undo.h"
#include "frontends/Painter.h"
void MathMacroTemplate::draw(PainterInfo & pi, int x, int y) const
{
+ ColorChanger dummy0(pi.base.font, Color_math);
FontSetChanger dummy1(pi.base, from_ascii("mathnormal"));
StyleChanger dummy2(pi.base, LM_ST_TEXT);
void MathMacroTemplate::edit(Cursor & cur, bool front, EntryDirection entry_from)
{
updateLook();
- cur.updateFlags(Update::SinglePar);
+ cur.screenUpdateFlags(Update::SinglePar);
InsetMathNest::edit(cur, front, entry_from);
}
{
commitEditChanges(cur, old);
updateLook();
- cur.updateFlags(Update::Force);
+ cur.screenUpdateFlags(Update::Force);
return InsetMathNest::notifyCursorLeaves(old, cur);
}
int MathMacroTemplate::maxArgumentInDefinition() const
{
// We don't have a buffer when pasting from the clipboard (bug 6014).
- Buffer const * macro_buffer = this->isBufferValid() ? &buffer() : 0;
+ Buffer const * macro_buffer = isBufferLoaded() ? &buffer() : 0;
int maxArg = 0;
DocIterator it = doc_iterator_begin(macro_buffer, this);
it.idx() = defIdx();
hull.nextInset()->asInsetMath()->asHullInset();
LASSERT(inset_hull, /**/);
inset_hull->reloadPreview(hull);
- cur.updateFlags(Update::Force);
+ cur.screenUpdateFlags(Update::Force);
preview_reload_needed = false;
}
hull.clear();
void MathMacroTemplate::doDispatch(Cursor & cur, FuncRequest & cmd)
{
string const arg = to_utf8(cmd.argument());
- switch (cmd.action) {
+ switch (cmd.action()) {
case LFUN_MATH_MACRO_ADD_PARAM:
if (numargs_ < 9) {
{
bool ret = true;
string const arg = to_utf8(cmd.argument());
- switch (cmd.action) {
+ switch (cmd.action()) {
case LFUN_MATH_MACRO_ADD_PARAM: {
int num = numargs_ + 1;
if (arg.size() != 0)
}
+docstring MathMacroTemplate::xhtml(XHTMLStream &, OutputParams const &) const
+{
+ return docstring();
+}
+
int MathMacroTemplate::plaintext(odocstream & os,
OutputParams const &) const
{