X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetFormulaMacro.cpp;h=c0148fcac2bce8fb5c0310800444a611328cc05b;hb=e54ae72e5fac6f750c3f7972c74bb42b57f3a049;hp=1a17f8705cf60d8fffc78e23accddd7633444ad7;hpb=f497296c30e6da2f97b16da8ad1c9e96feffb16b;p=lyx.git diff --git a/src/mathed/InsetFormulaMacro.cpp b/src/mathed/InsetFormulaMacro.cpp index 1a17f8705c..c0148fcac2 100644 --- a/src/mathed/InsetFormulaMacro.cpp +++ b/src/mathed/InsetFormulaMacro.cpp @@ -12,16 +12,16 @@ #include #include "InsetFormulaMacro.h" -#include "MathMacroTable.h" +#include "MacroTable.h" #include "MathMacroTemplate.h" #include "BufferView.h" -#include "cursor.h" +#include "Cursor.h" #include "debug.h" #include "gettext.h" -#include "LColor.h" -#include "lyxlex.h" -#include "outputparams.h" +#include "Color.h" +#include "Lexer.h" +#include "OutputParams.h" #include "frontends/FontMetrics.h" #include "frontends/Painter.h" @@ -30,17 +30,14 @@ #include - -namespace lyx { - -using odocstream; -using support::bformat; - using std::string; using std::auto_ptr; using std::ostream; using std::endl; +namespace lyx { + +using support::bformat; InsetFormulaMacro::InsetFormulaMacro() @@ -49,7 +46,7 @@ InsetFormulaMacro::InsetFormulaMacro() InsetFormulaMacro::InsetFormulaMacro - (string const & name, int nargs, string const & type) + (docstring const & name, int nargs, docstring const & type) : InsetMathNest(2), name_(name) { MathMacroTable::create(MathAtom(new MathMacroTemplate(name, nargs, type))); @@ -64,9 +61,9 @@ InsetFormulaMacro::InsetFormulaMacro(string const & s) } -auto_ptr InsetFormulaMacro::clone() const +auto_ptr InsetFormulaMacro::clone() const { - return auto_ptr(new InsetFormulaMacro(*this)); + return auto_ptr(new InsetFormulaMacro(*this)); } @@ -79,7 +76,7 @@ void InsetFormulaMacro::write(Buffer const &, ostream & os) const int InsetFormulaMacro::latex(Buffer const &, odocstream & os, - OutputParams const & runparams) const + OutputParams const & runparams) const { //lyxerr << "InsetFormulaMacro::latex" << endl; WriteStream wi(os, runparams.moving_arg, true); @@ -89,7 +86,7 @@ int InsetFormulaMacro::latex(Buffer const &, odocstream & os, int InsetFormulaMacro::plaintext(Buffer const &, odocstream & os, - OutputParams const &) const + OutputParams const &) const { odocstringstream oss; WriteStream wi(oss, false, true); @@ -102,13 +99,13 @@ int InsetFormulaMacro::plaintext(Buffer const &, odocstream & os, int InsetFormulaMacro::docbook(Buffer const & buf, ostream & os, - OutputParams const & runparams) const + OutputParams const & runparams) const { return plaintext(buf, os, runparams); } -void InsetFormulaMacro::read(Buffer const &, LyXLex & lex) +void InsetFormulaMacro::read(Buffer const &, Lexer & lex) { read(lex.getStream()); } @@ -144,8 +141,8 @@ bool InsetFormulaMacro::metrics(MetricsInfo & mi, Dimension & dim) const void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const { // label - LyXFont font = p.base.font; - font.setColor(LColor::math); + Font font = p.base.font; + font.setColor(Color::math); PainterInfo pi(p.base.bv, p.pain); pi.base.style = LM_ST_TEXT; @@ -155,15 +152,13 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const int const w = dim_.wid - 2; int const h = dim_.height() - 2; - // LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too - pi.pain.fillRectangle(x, a, w, h, LColor::mathmacrobg); - pi.pain.rectangle(x, a, w, h, LColor::mathframe); + // Color::mathbg used to be "AntiqueWhite" but is "linen" now, too + pi.pain.fillRectangle(x, a, w, h, Color::mathmacrobg); + pi.pain.rectangle(x, a, w, h, Color::mathframe); -#ifdef WITH_WARNINGS -#warning FIXME -#endif + // FIXME #if 0 - LCursor & cur = p.base.bv->cursor(); + Cursor & cur = p.base.bv->cursor(); if (cur.isInside(this)) cur.drawSelection(pi); #endif