]> git.lyx.org Git - features.git/commitdiff
rename Math*Inset into InsetMath*
authorAndré Pönitz <poenitz@gmx.net>
Sat, 16 Sep 2006 18:11:38 +0000 (18:11 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sat, 16 Sep 2006 18:11:38 +0000 (18:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15023 a592a061-630c-0410-9148-cb99ea01b6c8

150 files changed:
src/CutAndPaste.C
src/cursor.C
src/cursor.h
src/cursor_slice.C
src/cursor_slice.h
src/dociterator.C
src/factory.C
src/frontends/WorkArea.h
src/frontends/key_state.h
src/insets/insetbase.h
src/lyx_cb.C
src/mathed/command_inset.C
src/mathed/command_inset.h
src/mathed/formulamacro.C
src/mathed/formulamacro.h
src/mathed/math_amsarrayinset.C
src/mathed/math_amsarrayinset.h
src/mathed/math_arrayinset.C
src/mathed/math_arrayinset.h
src/mathed/math_atom.C
src/mathed/math_atom.h
src/mathed/math_biginset.C
src/mathed/math_biginset.h
src/mathed/math_binominset.C
src/mathed/math_binominset.h
src/mathed/math_boldsymbolinset.C
src/mathed/math_boldsymbolinset.h
src/mathed/math_boxedinset.C
src/mathed/math_boxedinset.h
src/mathed/math_boxinset.C
src/mathed/math_boxinset.h
src/mathed/math_braceinset.C
src/mathed/math_braceinset.h
src/mathed/math_casesinset.C
src/mathed/math_casesinset.h
src/mathed/math_charinset.C
src/mathed/math_charinset.h
src/mathed/math_colorinset.C
src/mathed/math_colorinset.h
src/mathed/math_commentinset.C
src/mathed/math_commentinset.h
src/mathed/math_decorationinset.C
src/mathed/math_decorationinset.h
src/mathed/math_deliminset.C
src/mathed/math_deliminset.h
src/mathed/math_dfracinset.C
src/mathed/math_dfracinset.h
src/mathed/math_diffinset.C
src/mathed/math_diffinset.h
src/mathed/math_diminset.C
src/mathed/math_diminset.h
src/mathed/math_dotsinset.C
src/mathed/math_dotsinset.h
src/mathed/math_envinset.C
src/mathed/math_envinset.h
src/mathed/math_exfuncinset.C
src/mathed/math_exfuncinset.h
src/mathed/math_exintinset.C
src/mathed/math_exintinset.h
src/mathed/math_extern.C
src/mathed/math_factory.C
src/mathed/math_factory.h
src/mathed/math_fboxinset.C
src/mathed/math_fboxinset.h
src/mathed/math_fontinset.C
src/mathed/math_fontinset.h
src/mathed/math_fontoldinset.C
src/mathed/math_fontoldinset.h
src/mathed/math_fracbase.C
src/mathed/math_fracbase.h
src/mathed/math_fracinset.C
src/mathed/math_fracinset.h
src/mathed/math_frameboxinset.C
src/mathed/math_frameboxinset.h
src/mathed/math_gridinset.C
src/mathed/math_gridinset.h
src/mathed/math_hullinset.C
src/mathed/math_hullinset.h
src/mathed/math_inset.C
src/mathed/math_inset.h
src/mathed/math_kerninset.C
src/mathed/math_kerninset.h
src/mathed/math_lefteqninset.C
src/mathed/math_lefteqninset.h
src/mathed/math_liminset.C
src/mathed/math_liminset.h
src/mathed/math_macro.C
src/mathed/math_macro.h
src/mathed/math_macroarg.h
src/mathed/math_macrotable.C
src/mathed/math_macrotemplate.C
src/mathed/math_macrotemplate.h
src/mathed/math_makeboxinset.C
src/mathed/math_makeboxinset.h
src/mathed/math_mathmlstream.h
src/mathed/math_matrixinset.C
src/mathed/math_matrixinset.h
src/mathed/math_mboxinset.C
src/mathed/math_mboxinset.h
src/mathed/math_nestinset.C
src/mathed/math_nestinset.h
src/mathed/math_numberinset.C
src/mathed/math_numberinset.h
src/mathed/math_oversetinset.C
src/mathed/math_oversetinset.h
src/mathed/math_parinset.C
src/mathed/math_parinset.h
src/mathed/math_parser.C
src/mathed/math_parser.h
src/mathed/math_phantominset.C
src/mathed/math_phantominset.h
src/mathed/math_rootinset.C
src/mathed/math_rootinset.h
src/mathed/math_scriptinset.C
src/mathed/math_scriptinset.h
src/mathed/math_sizeinset.C
src/mathed/math_sizeinset.h
src/mathed/math_spaceinset.C
src/mathed/math_spaceinset.h
src/mathed/math_splitinset.C
src/mathed/math_splitinset.h
src/mathed/math_sqrtinset.C
src/mathed/math_sqrtinset.h
src/mathed/math_stackrelinset.C
src/mathed/math_stackrelinset.h
src/mathed/math_stringinset.C
src/mathed/math_stringinset.h
src/mathed/math_substackinset.C
src/mathed/math_substackinset.h
src/mathed/math_support.C
src/mathed/math_support.h
src/mathed/math_symbolinset.C
src/mathed/math_symbolinset.h
src/mathed/math_tabularinset.C
src/mathed/math_tabularinset.h
src/mathed/math_tfracinset.C
src/mathed/math_tfracinset.h
src/mathed/math_undersetinset.C
src/mathed/math_undersetinset.h
src/mathed/math_unknowninset.C
src/mathed/math_unknowninset.h
src/mathed/math_xarrowinset.C
src/mathed/math_xarrowinset.h
src/mathed/math_xyarrowinset.C
src/mathed/math_xyarrowinset.h
src/mathed/math_xymatrixinset.C
src/mathed/math_xymatrixinset.h
src/mathed/ref_inset.C
src/text2.C
src/text3.C

index eeb7e8f0e639b1488ff81b6b8b04db76f6f09f03..f0aba7cdbd52fc69571ee294f6638edd70141d3b 100644 (file)
@@ -635,7 +635,7 @@ void pasteParagraphList(LCursor & cur, ParagraphList const & parlist,
                text->setCursor(cur, ppp.first, ppp.second);
        }
 
-       // mathed is handled in MathNestInset/MathGridInset
+       // mathed is handled in InsetMathNest/InsetMathGrid
        BOOST_ASSERT(!cur.inMathed());
 }
 
@@ -694,7 +694,7 @@ void eraseSelection(LCursor & cur)
        //lyxerr << "LCursor::eraseSelection begin: " << cur << endl;
        CursorSlice const & i1 = cur.selBegin();
        CursorSlice const & i2 = cur.selEnd();
-       if (i1.inset().asMathInset()) {
+       if (i1.inset().asInsetMath()) {
                cur.top() = i1;
                if (i1.idx() == i2.idx()) {
                        i1.cell().erase(i1.pos(), i2.pos());
@@ -703,7 +703,7 @@ void eraseSelection(LCursor & cur)
                        if (cur.pos() > cur.lastpos())
                                cur.pos() = cur.lastpos();
                } else {
-                       MathInset * p = i1.asMathInset();
+                       InsetMath * p = i1.asInsetMath();
                        InsetBase::row_type r1, r2;
                        InsetBase::col_type c1, c2;
                        region(i1, i2, r1, r2, c1, c2);
@@ -758,7 +758,7 @@ string grabSelection(LCursor const & cur)
        CursorSlice i2 = cur.selEnd();
 
        if (i1.idx() == i2.idx()) {
-               if (i1.inset().asMathInset()) {
+               if (i1.inset().asInsetMath()) {
                        MathArray::const_iterator it = i1.cell().begin();
                        return asString(MathArray(it + i1.pos(), it + i2.pos()));
                } else {
@@ -771,15 +771,15 @@ string grabSelection(LCursor const & cur)
        region(i1, i2, r1, r2, c1, c2);
 
        string data;
-       if (i1.inset().asMathInset()) {
+       if (i1.inset().asInsetMath()) {
                for (InsetBase::row_type row = r1; row <= r2; ++row) {
                        if (row > r1)
                                data += "\\\\";
                        for (InsetBase::col_type col = c1; col <= c2; ++col) {
                                if (col > c1)
                                        data += '&';
-                               data += asString(i1.asMathInset()->
-                                       cell(i1.asMathInset()->index(row, col)));
+                               data += asString(i1.asInsetMath()->
+                                       cell(i1.asInsetMath()->index(row, col)));
                        }
                }
        } else {
index 9e52a22d24481236fceabf586dd2e36723d0d0a3..3a9ed20790098d7d92921c4e96c43909c24cf2c5 100644 (file)
@@ -95,7 +95,7 @@ namespace {
                DocIterator it = c;
                it.top().pos() = 0;
                DocIterator et = c;
-               et.top().pos() = et.top().asMathInset()->cell(et.top().idx()).size();
+               et.top().pos() = et.top().asInsetMath()->cell(et.top().idx()).size();
                for (size_t i = 0; ; ++i) {
                        int xo;
                        int yo;
@@ -566,7 +566,7 @@ std::ostream & operator<<(std::ostream & os, LCursor const & cur)
 //
 // The part below is the non-integrated rest of the original math
 // cursor. This should be either generalized for texted or moved
-// back to mathed (in most cases to MathNestInset).
+// back to mathed (in most cases to InsetMathNest).
 //
 ///////////////////////////////////////////////////////////////////
 
@@ -670,7 +670,7 @@ void LCursor::insert(char_type c)
        BOOST_ASSERT(!empty());
        if (inMathed()) {
                lyx::cap::selClearOrDel(*this);
-               insert(new MathCharInset(c));
+               insert(new InsetMathChar(c));
        } else {
                text()->insertChar(*this, c);
        }
@@ -752,7 +752,7 @@ bool LCursor::backspace()
        }
 
        if (inMacroMode()) {
-               MathUnknownInset * p = activeMacro();
+               InsetMathUnknown * p = activeMacro();
                if (p->name().size() > 1) {
                        p->setName(p->name().substr(0, p->name().size() - 1));
                        return true;
@@ -842,7 +842,7 @@ bool LCursor::macroModeClose()
 {
        if (!inMacroMode())
                return false;
-       MathUnknownInset * p = activeMacro();
+       InsetMathUnknown * p = activeMacro();
        p->finalize();
        string const s = p->name();
        --pos();
@@ -860,10 +860,10 @@ bool LCursor::macroModeClose()
        if (macro && macro->getInsetName() == name)
                lyxerr << "can't enter recursive macro" << endl;
 
-       MathNestInset * const in = inset().asMathInset()->asNestInset();
+       InsetMathNest * const in = inset().asInsetMath()->asNestInset();
        if (in && in->interpret(*this, s))
                return true;
-       plainInsert(createMathInset(name));
+       plainInsert(createInsetMath(name));
        return true;
 }
 
@@ -912,12 +912,12 @@ bool LCursor::inMacroMode() const
 {
        if (pos() == 0)
                return false;
-       MathUnknownInset const * p = prevAtom()->asUnknownInset();
+       InsetMathUnknown const * p = prevAtom()->asUnknownInset();
        return p && !p->final();
 }
 
 
-MathUnknownInset * LCursor::activeMacro()
+InsetMathUnknown * LCursor::activeMacro()
 {
        return inMacroMode() ? prevAtom().nucleus()->asUnknownInset() : 0;
 }
@@ -967,7 +967,7 @@ void LCursor::normalize()
                        << pos() << ' ' << lastpos() <<  " in idx: " << idx()
                       << " in atom: '";
                WriteStream wi(lyxerr, false, true);
-               inset().asMathInset()->write(wi);
+               inset().asInsetMath()->write(wi);
                lyxerr << endl;
                pos() = lastpos();
        }
@@ -985,7 +985,8 @@ bool LCursor::goUpDown(bool up)
        int yo = 0;
        getPos(xo, yo);
 
-       // check if we had something else in mind, if not, this is the future goal
+       // check if we had something else in mind, if not, this is the future
+       // target
        if (x_target() == -1)
                x_target() = xo;
        else
@@ -995,10 +996,10 @@ bool LCursor::goUpDown(bool up)
        if (!selection()) {
                // try left
                if (pos() != 0) {
-                       MathScriptInset const * p = prevAtom()->asScriptInset();
+                       InsetMathScript const * p = prevAtom()->asScriptInset();
                        if (p && p->has(up)) {
                                --pos();
-                               push(*const_cast<MathScriptInset*>(p));
+                               push(*const_cast<InsetMathScript*>(p));
                                idx() = p->idxOfScript(up);
                                pos() = lastpos();
                                return true;
@@ -1007,9 +1008,9 @@ bool LCursor::goUpDown(bool up)
 
                // try right
                if (pos() != lastpos()) {
-                       MathScriptInset const * p = nextAtom()->asScriptInset();
+                       InsetMathScript const * p = nextAtom()->asScriptInset();
                        if (p && p->has(up)) {
-                               push(*const_cast<MathScriptInset*>(p));
+                               push(*const_cast<InsetMathScript*>(p));
                                idx() = p->idxOfScript(up);
                                pos() = 0;
                                return true;
@@ -1088,7 +1089,7 @@ void LCursor::handleFont(string const & font)
                } else {
                        // cursor in between. split cell
                        MathArray::iterator bt = cell().begin();
-                       MathAtom at = createMathInset(font);
+                       MathAtom at = createInsetMath(font);
                        at.nucleus()->cell(0) = MathArray(bt, bt + pos());
                        cell().erase(bt, bt + pos());
                        popLeft();
index ed6a35c6861cb499df27252f2cb0aba53525fd94..e934700244e060bdbe3c7b9b197cb0e8d39cfa9d 100644 (file)
@@ -26,7 +26,7 @@ class Point;
 class LyXFont;
 
 // these should go
-class MathUnknownInset;
+class InsetMathUnknown;
 class Encoding;
 
 
@@ -261,7 +261,7 @@ public:
        /// are we currently typing the name of a macro?
        bool inMacroMode() const;
        /// get access to the macro we are currently typing
-       MathUnknownInset * activeMacro();
+       InsetMathUnknown * activeMacro();
 
        /// replace selected stuff with at, placing the former
        // selection in given cell of atom
index eda679a2e95750fa10c79da8517003c57dd63ba3..7425bf5f84e4d9d190c3d49420efd4927b146c2d 100644 (file)
@@ -40,7 +40,7 @@ CursorSlice::CursorSlice(InsetBase & p)
 
 MathArray & CursorSlice::cell() const
 {
-       return inset_->asMathInset()->cell(idx_);
+       return inset_->asInsetMath()->cell(idx_);
 }
 
 
@@ -59,21 +59,21 @@ Paragraph const & CursorSlice::paragraph() const
 CursorSlice::pos_type CursorSlice::lastpos() const
 {
        BOOST_ASSERT(inset_);
-       return inset_->asMathInset() ? cell().size() : paragraph().size();
+       return inset_->asInsetMath() ? cell().size() : paragraph().size();
 }
 
 
 CursorSlice::row_type CursorSlice::row() const
 {
-       BOOST_ASSERT(asMathInset());
-       return asMathInset()->row(idx_);
+       BOOST_ASSERT(asInsetMath());
+       return asInsetMath()->row(idx_);
 }
 
 
 CursorSlice::col_type CursorSlice::col() const
 {
-       BOOST_ASSERT(asMathInset());
-       return asMathInset()->col(idx_);
+       BOOST_ASSERT(asInsetMath());
+       return asInsetMath()->col(idx_);
 }
 
 
index 3ba4dfb0587ba56d276f79488690535f2f864bc0..f08fe045af4d27ba794c563d03fe8c91c4e8e203 100644 (file)
@@ -109,8 +109,8 @@ public:
        ///
        /// mathed specific stuff
        ///
-       /// returns the owning inset if it is a MathInset, else 0
-       MathInset * asMathInset() const { return inset_->asMathInset(); }
+       /// returns the owning inset if it is a InsetMath, else 0
+       InsetMath * asInsetMath() const { return inset_->asInsetMath(); }
        /// returns cell corresponding to this position
        MathArray & cell() const;
 
index 25b9a282e6969e44ef1791dbd130e6c89b25c5af..257cf4eabe97ab279033b8c815148f31396b921d 100644 (file)
@@ -298,9 +298,9 @@ void DocIterator::forwardPos(bool ignorecollapsed)
        }
 
        // jump over collapsables if they are collapsed
-       // FIXME: the check for asMathInset() shouldn't be necessary
+       // FIXME: the check for asInsetMath() shouldn't be necessary
        // but math insets do not return a sensible editable() state yet.
-       if (ignorecollapsed && nextInset() && (!nextInset()->asMathInset()
+       if (ignorecollapsed && nextInset() && (!nextInset()->asInsetMath()
            && nextInset()->editable() != InsetBase::HIGHLY_EDITABLE)) {
                ++top().pos();
                return;
index 0f3285cec83bc1b3879ebe16924ecfa70c61ebd2..4279534000bf17b7324b7590096e58a3e02b2f80 100644 (file)
@@ -402,7 +402,7 @@ InsetBase * readInset(LyXLex & lex, Buffer const & buf)
                } else if (tmptok == "FormulaMacro") {
                        inset.reset(new MathMacroTemplate);
                } else if (tmptok == "Formula") {
-                       inset.reset(new MathHullInset);
+                       inset.reset(new InsetMathHull);
                } else if (tmptok == "Graphics") {
                        inset.reset(new InsetGraphics);
                } else if (tmptok == "Note") {
index d7b7fe0f6aff5dbff4d4cf250893dcb020810723..7c399a18751fcb9b9c3539264a7d4c1dd8c4a58f 100644 (file)
  * Full author contact details are available in file CREDITS.
  */
 
-// X11 use a define called CursorShape, and we really want to use
-// that name our selves. Therefore we do something similar to what is done
-// in kde/fixx11h.h:
-namespace X {
-#ifdef CursorShape
-#ifndef FIXX11H_CursorShape
-#define FIXX11H_CursorShape
-int const XCursorShape = CursorShape;
-#undef CursorShape
-int const CursorShape = CursorShape;
-#endif
-#undef CursorShape
-#endif
-} // namespace X
-
-
 #ifndef BASE_WORKAREA_H
 #define BASE_WORKAREA_H
 
index 0f9cd19e93a7aaa3dcef2198df510dd60dca6ab7..ce77e170c38f76ac6da8c0511a60aba686b8ebf2 100644 (file)
 
 /// modifier key states
 namespace key_modifier {
-       enum state {
-               none    = 0, //< no modifiers held
-               ctrl    = 1, //< control button held
-               alt     = 2, //< alt/meta key held
-               shift   = 4  //< shift key held
-       };
+
+enum state {
+       none  = 0, //< no modifiers held
+       ctrl  = 1, //< control button held
+       alt   = 2, //< alt/meta key held
+       shift = 4  //< shift key held
+};
 
 
 inline state operator|(state const & s1, state const & s2)
index 23c901074105e2c7e324eb399db10b9da1fe4230..62ec6a50256356419927a4dee68cfe8f021f6fb2 100644 (file)
@@ -23,12 +23,12 @@ class BufferView;
 class CursorSlice;
 class FuncRequest;
 class FuncStatus;
+class InsetMath;
 class InsetText;
 class LaTeXFeatures;
 class LCursor;
 class LyXLex;
 class LyXText;
-class MathInset;
 class MetricsInfo;
 class Dimension;
 class PainterInfo;
@@ -65,7 +65,7 @@ public:
        std::auto_ptr<InsetBase> clone() const;
 
        /// identification as math inset
-       virtual MathInset * asMathInset() { return 0; }
+       virtual InsetMath * asInsetMath() { return 0; }
        /// true for 'math' math inset, but not for e.g. mbox
        virtual bool inMathed() const { return false; }
 
index e1af6fd8fdcfa115694fd780e37d04853f5e54bd..4d108c860bc9d733b6da8d12b6ac089e563ec0e9 100644 (file)
@@ -362,7 +362,7 @@ void insertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
                return;
 
        // clear the selection
-       LyXText & const text = bv->buffer()->text();
+       LyXText const & text = bv->buffer()->text();
        if (&text == bv->getLyXText())
                bv->cursor().clearSelection();
        if (asParagraph)
index fcfa79d16a326288eff6da2e1787351dfa7c6ee0..e303aec83253f4631391069bae14bc00f3a42330 100644 (file)
@@ -24,7 +24,7 @@ using std::ostringstream;
 
 
 CommandInset::CommandInset(string const & name)
-       : MathNestInset(2), name_(name), set_label_(false)
+       : InsetMathNest(2), name_(name), set_label_(false)
 {
        lock_ = true;
 }
index 8872cfec91fb25fe02808a3405f3375af3f5d910..1cc5d2dac49f2fe4c33c47b4029dbb40aacf590a 100644 (file)
@@ -19,7 +19,7 @@
 
 
 /// Inset for things like \name[options]{contents}
-class CommandInset : public MathNestInset {
+class CommandInset : public InsetMathNest {
 public:
        ///
        explicit CommandInset(std::string const & name);
index d183f2a25c632d288a2ddcfe5bd459c75dd9fdc7..3cd2f08346448587ece87229a0fc16ee5d9592e2 100644 (file)
@@ -41,20 +41,20 @@ using std::endl;
 
 
 InsetFormulaMacro::InsetFormulaMacro()
-       : MathNestInset(2), name_("unknownA")
+       : InsetMathNest(2), name_("unknownA")
 {}
 
 
 InsetFormulaMacro::InsetFormulaMacro
                (string const & name, int nargs, string const & type)
-       : MathNestInset(2), name_(name)
+       : InsetMathNest(2), name_(name)
 {
        MathMacroTable::create(MathAtom(new MathMacroTemplate(name, nargs, type)));
 }
 
 
 InsetFormulaMacro::InsetFormulaMacro(string const & s)
-       : MathNestInset(2), name_("unknownB")
+       : InsetMathNest(2), name_("unknownB")
 {
        std::istringstream is(s);
        read(is);
index a6831ce1aec0ce74767a51cbd3f5b74144a179ff..03968620c97eab3569d840263e6269a472fcdef1 100644 (file)
@@ -23,7 +23,7 @@ class LyXLex;
 // MathMacroTable if it needs to know more.
 
 /// Main LyX Inset for defining math macros
-class InsetFormulaMacro : public MathNestInset {
+class InsetFormulaMacro : public InsetMathNest {
 public:
        ///
        InsetFormulaMacro();
index 4bcc0ab343d8320cfa10b5e453316d046dc8ef01..26bca0c610f4bd6f824474d4ac2be9c64f5c60d6 100644 (file)
@@ -32,23 +32,23 @@ using std::auto_ptr;
 using lyx::support::bformat;
 
 
-MathAMSArrayInset::MathAMSArrayInset(string const & name, int m, int n)
-       : MathGridInset(m, n), name_(name)
+InsetMathAMSArray::InsetMathAMSArray(string const & name, int m, int n)
+       : InsetMathGrid(m, n), name_(name)
 {}
 
 
-MathAMSArrayInset::MathAMSArrayInset(string const & name)
-       : MathGridInset(1, 1), name_(name)
+InsetMathAMSArray::InsetMathAMSArray(string const & name)
+       : InsetMathGrid(1, 1), name_(name)
 {}
 
 
-auto_ptr<InsetBase> MathAMSArrayInset::doClone() const
+auto_ptr<InsetBase> InsetMathAMSArray::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathAMSArrayInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathAMSArray(*this));
 }
 
 
-char const * MathAMSArrayInset::name_left() const
+char const * InsetMathAMSArray::name_left() const
 {
        if (name_ == "bmatrix")
                return "[";
@@ -64,7 +64,7 @@ char const * MathAMSArrayInset::name_left() const
 }
 
 
-char const * MathAMSArrayInset::name_right() const
+char const * InsetMathAMSArray::name_right() const
 {
        if (name_ == "bmatrix")
                return "]";
@@ -80,27 +80,27 @@ char const * MathAMSArrayInset::name_right() const
 }
 
 
-void MathAMSArrayInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathAMSArray::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        ArrayChanger dummy(mi.base);
-       MathGridInset::metrics(mi, dim);
+       InsetMathGrid::metrics(mi, dim);
        dim.wid += 14;
        dim_ = dim;
 }
 
 
-void MathAMSArrayInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathAMSArray::draw(PainterInfo & pi, int x, int y) const
 {
        int const yy = y - dim_.ascent();
        // Drawing the deco after an ArrayChanger does not work
        mathed_draw_deco(pi, x + 1, yy, 5, dim_.height(), name_left());
        mathed_draw_deco(pi, x + dim_.width() - 8, yy, 5, dim_.height(), name_right());
        ArrayChanger dummy(pi.base);
-       MathGridInset::drawWithMargin(pi, x, y, 6, 8);
+       InsetMathGrid::drawWithMargin(pi, x, y, 6, 8);
 }
 
 
-bool MathAMSArrayInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+bool InsetMathAMSArray::getStatus(LCursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
        switch (cmd.action) {
@@ -113,23 +113,23 @@ bool MathAMSArrayInset::getStatus(LCursor & cur, FuncRequest const & cmd,
                        flag.enabled(false);
                        return true;
                }
-               return MathGridInset::getStatus(cur, cmd, flag);
+               return InsetMathGrid::getStatus(cur, cmd, flag);
        }
        default:
-               return MathGridInset::getStatus(cur, cmd, flag);
+               return InsetMathGrid::getStatus(cur, cmd, flag);
        }
 }
 
 
-void MathAMSArrayInset::write(WriteStream & os) const
+void InsetMathAMSArray::write(WriteStream & os) const
 {
        os << "\\begin{" << name_ << '}';
-       MathGridInset::write(os);
+       InsetMathGrid::write(os);
        os << "\\end{" << name_ << '}';
 }
 
 
-void MathAMSArrayInset::infoize(std::ostream & os) const
+void InsetMathAMSArray::infoize(std::ostream & os) const
 {
        string name = name_;
        name[0] = lyx::support::uppercase(name[0]);
@@ -137,16 +137,16 @@ void MathAMSArrayInset::infoize(std::ostream & os) const
 }
 
 
-void MathAMSArrayInset::normalize(NormalStream & os) const
+void InsetMathAMSArray::normalize(NormalStream & os) const
 {
        os << '[' << name_ << ' ';
-       MathGridInset::normalize(os);
+       InsetMathGrid::normalize(os);
        os << ']';
 }
 
 
-void MathAMSArrayInset::validate(LaTeXFeatures & features) const
+void InsetMathAMSArray::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
-       MathGridInset::validate(features);
+       InsetMathGrid::validate(features);
 }
index 8ff70cbdc8b3f19197805e511ee39e2a56d5a31f..4ca858753beca5c8c984b5341b6f94be479edfa5 100644 (file)
 
 
 /// Inset for things like [pbvV]matrix, psmatrix etc
-class MathAMSArrayInset : public MathGridInset {
+class InsetMathAMSArray : public InsetMathGrid {
 public:
        ///
-       MathAMSArrayInset(std::string const & name, int m, int n);
+       InsetMathAMSArray(std::string const & name, int m, int n);
        ///
-       MathAMSArrayInset(std::string const & name);
+       InsetMathAMSArray(std::string const & name);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pain, int x, int y) const;
        ///
-       MathAMSArrayInset * asAMSArrayInset() { return this; }
+       InsetMathAMSArray * asAMSArrayInset() { return this; }
        ///
-       MathAMSArrayInset const * asAMSArrayInset() const { return this; }
+       InsetMathAMSArray const * asAMSArrayInset() const { return this; }
 
        ///
        bool getStatus(LCursor & cur, FuncRequest const & cmd,
index be837bad25d22a580d2d71978c7cb812eefd2f78..fdf44d961b68eb6913446f8f2bfcb21ac928b295 100644 (file)
@@ -31,25 +31,25 @@ using std::istream_iterator;
 using std::vector;
 
 
-MathArrayInset::MathArrayInset(string const & name, int m, int n)
-       : MathGridInset(m, n), name_(name)
+InsetMathArray::InsetMathArray(string const & name, int m, int n)
+       : InsetMathGrid(m, n), name_(name)
 {}
 
 
-MathArrayInset::MathArrayInset(string const & name, int m, int n,
+InsetMathArray::InsetMathArray(string const & name, int m, int n,
                char valign, string const & halign)
-       : MathGridInset(m, n, valign, halign), name_(name)
+       : InsetMathGrid(m, n, valign, halign), name_(name)
 {}
 
 
-MathArrayInset::MathArrayInset(string const & name, char valign,
+InsetMathArray::InsetMathArray(string const & name, char valign,
                string const & halign)
-       : MathGridInset(valign, halign), name_(name)
+       : InsetMathGrid(valign, halign), name_(name)
 {}
 
 
-MathArrayInset::MathArrayInset(string const & name, string const & str)
-       : MathGridInset(1, 1), name_(name)
+InsetMathArray::InsetMathArray(string const & name, string const & str)
+       : InsetMathGrid(1, 1), name_(name)
 {
        vector< vector<string> > dat;
        istringstream is(str);
@@ -72,30 +72,30 @@ MathArrayInset::MathArrayInset(string const & name, string const & str)
 }
 
 
-auto_ptr<InsetBase> MathArrayInset::doClone() const
+auto_ptr<InsetBase> InsetMathArray::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathArrayInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathArray(*this));
 }
 
 
-void MathArrayInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathArray::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        ArrayChanger dummy(mi.base);
-       MathGridInset::metrics(mi, dim);
+       InsetMathGrid::metrics(mi, dim);
        dim.wid += 6;
        dim_ = dim;
 }
 
 
-void MathArrayInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathArray::draw(PainterInfo & pi, int x, int y) const
 {
        setPosCache(pi, x, y);
        ArrayChanger dummy(pi.base);
-       MathGridInset::drawWithMargin(pi, x, y, 4, 2);
+       InsetMathGrid::drawWithMargin(pi, x, y, 4, 2);
 }
 
 
-void MathArrayInset::write(WriteStream & os) const
+void InsetMathArray::write(WriteStream & os) const
 {
        if (os.fragile())
                os << "\\protect";
@@ -105,7 +105,7 @@ void MathArrayInset::write(WriteStream & os) const
                os << '[' << char(v_align_) << ']';
        os << '{' << halign() << "}\n";
 
-       MathGridInset::write(os);
+       InsetMathGrid::write(os);
 
        if (os.fragile())
                os << "\\protect";
@@ -115,7 +115,7 @@ void MathArrayInset::write(WriteStream & os) const
 }
 
 
-void MathArrayInset::infoize(std::ostream & os) const
+void InsetMathArray::infoize(std::ostream & os) const
 {
        string name = name_;
        name[0] = lyx::support::uppercase(name[0]);
@@ -123,25 +123,25 @@ void MathArrayInset::infoize(std::ostream & os) const
 }
 
 
-void MathArrayInset::normalize(NormalStream & os) const
+void InsetMathArray::normalize(NormalStream & os) const
 {
        os << '[' << name_ << ' ';
-       MathGridInset::normalize(os);
+       InsetMathGrid::normalize(os);
        os << ']';
 }
 
 
-void MathArrayInset::maple(MapleStream & os) const
+void InsetMathArray::maple(MapleStream & os) const
 {
        os << "array(";
-       MathGridInset::maple(os);
+       InsetMathGrid::maple(os);
        os << ')';
 }
 
 
-void MathArrayInset::validate(LaTeXFeatures & features) const
+void InsetMathArray::validate(LaTeXFeatures & features) const
 {
        if (name_ == "subarray")
                features.require("amsmath");
-       MathGridInset::validate(features);
+       InsetMathGrid::validate(features);
 }
index f3f9b7d5ee465404a0650bb37ecceff3638c7434..e688a084f268f7a1418f01a5260aa9caa45341ca 100644 (file)
 
 
 /// Inset for things like \begin{array}...\end{array}
-class MathArrayInset : public MathGridInset {
+class InsetMathArray : public InsetMathGrid {
 public:
        ///
-       MathArrayInset(std::string const &, int m, int n);
+       InsetMathArray(std::string const &, int m, int n);
        ///
-       MathArrayInset(std::string const &, int m, int n,
+       InsetMathArray(std::string const &, int m, int n,
                char valign, std::string const & halign);
        ///
-       MathArrayInset(std::string const &, char valign, std::string const & halign);
+       InsetMathArray(std::string const &, char valign, std::string const & halign);
        /// convenience constructor from whitespace/newline separated data
-       MathArrayInset(std::string const &, std::string const & str);
+       InsetMathArray(std::string const &, std::string const & str);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
-       MathArrayInset * asArrayInset() { return this; }
+       InsetMathArray * asArrayInset() { return this; }
        ///
-       MathArrayInset const * asArrayInset() const { return this; }
+       InsetMathArray const * asArrayInset() const { return this; }
 
        ///
        void write(WriteStream & os) const;
index 4b8259f1ff75e08b2f0906ac643ddd28a2100b54..bdf81d25aefba55223d27b250467d621a11ab5fb 100644 (file)
@@ -22,7 +22,7 @@ MathAtom::MathAtom()
 
 
 MathAtom::MathAtom(InsetBase * p)
-       : nucleus_(static_cast<MathInset *>(p))
+       : nucleus_(static_cast<InsetMath *>(p))
 {}
 
 
@@ -30,7 +30,7 @@ MathAtom::MathAtom(MathAtom const & at)
        : nucleus_(0)
 {
        if (at.nucleus_)
-               nucleus_ = static_cast<MathInset*>(at.nucleus_->clone().release());
+               nucleus_ = static_cast<InsetMath*>(at.nucleus_->clone().release());
 }
 
 
index e4e2ce99a4811c809f2868286e62c6d15d5449b6..3457a2181ce92f64da25d1783efae757f05e7f6d 100644 (file)
@@ -14,7 +14,7 @@
 
 
 /**
-Wrapper for MathInset * with copy-semantics
+Wrapper for InsetMath * with copy-semantics
 
 --
 
@@ -29,11 +29,11 @@ Jules
 --
 
 Ok: Implementing it thusly is not feasible since cursor movement gets
-hackish. We use MathAtom only as a wrapper around MathInset * with value
+hackish. We use MathAtom only as a wrapper around InsetMath * with value
 semantics.
 
-The MathAtom owns the MathInset * and is responsible for proper cloning and
-destruction. Every MathInset * should be put into a MathAtom after its
+The MathAtom owns the InsetMath * and is responsible for proper cloning and
+destruction. Every InsetMath * should be put into a MathAtom after its
 creation as soon as possible.
 
 Andre'
@@ -41,7 +41,7 @@ Andre'
 */
 
 class InsetBase;
-class MathInset;
+class InsetMath;
 
 class MathAtom {
 public:
@@ -57,17 +57,17 @@ public:
        /// assignment invokes nucleus_->clone()
        MathAtom & operator=(MathAtom const &);
        /// access to the inset (checked with gprof)
-       MathInset       * nucleus()       { return nucleus_; }
-       MathInset const * nucleus() const { return nucleus_; }
+       InsetMath       * nucleus()       { return nucleus_; }
+       InsetMath const * nucleus() const { return nucleus_; }
        /// access to the inset
-       MathInset const * operator->() const { return nucleus_; }
+       InsetMath const * operator->() const { return nucleus_; }
 
        /// width cache. Not nice...
        //mutable int width_;
 
 private:
        ///
-       MathInset * nucleus_;
+       InsetMath * nucleus_;
 };
 
 #endif
index 9b1aaf5cb6e6db0038cce60c094c8efe41cf787d..40f9be317e1de758272f98183c38c6ab69c4ecc0 100644 (file)
@@ -22,24 +22,24 @@ using std::string;
 using std::auto_ptr;
 
 
-MathBigInset::MathBigInset(string const & name, string const & delim)
+InsetMathBig::InsetMathBig(string const & name, string const & delim)
        : name_(name), delim_(delim)
 {}
 
 
-string MathBigInset::name() const
+string InsetMathBig::name() const
 {
        return name_;
 }
 
 
-auto_ptr<InsetBase> MathBigInset::doClone() const
+auto_ptr<InsetBase> InsetMathBig::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathBigInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathBig(*this));
 }
 
 
-MathBigInset::size_type MathBigInset::size() const
+InsetMathBig::size_type InsetMathBig::size() const
 {
        // order: big Big bigg Bigg biggg Biggg
        //        0   1   2    3    4     5
@@ -49,7 +49,7 @@ MathBigInset::size_type MathBigInset::size() const
 }
 
 
-double MathBigInset::increase() const
+double InsetMathBig::increase() const
 {
        // The formula used in amsmath.sty is
        // 1.2 * (1.0 + size() * 0.5) - 1.0.
@@ -59,7 +59,7 @@ double MathBigInset::increase() const
 }
 
 
-void MathBigInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathBig::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        double const h = mathed_char_ascent(mi.base.font, 'I');
        double const f = increase();
@@ -70,7 +70,7 @@ void MathBigInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathBigInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathBig::draw(PainterInfo & pi, int x, int y) const
 {
        // mathed_draw_deco does not use the leading backslash, so remove it.
        // Replace \| by \Vert (equivalent in LaTeX), since mathed_draw_deco
@@ -84,7 +84,7 @@ void MathBigInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathBigInset::write(WriteStream & os) const
+void InsetMathBig::write(WriteStream & os) const
 {
        os << '\\' << name_ << ' ' << delim_;
        if (delim_[0] == '\\')
@@ -92,19 +92,19 @@ void MathBigInset::write(WriteStream & os) const
 }
 
 
-void MathBigInset::normalize(NormalStream & os) const
+void InsetMathBig::normalize(NormalStream & os) const
 {
        os << '[' << name_ << ' ' <<  delim_ << ']';
 }
 
 
-void MathBigInset::infoize2(std::ostream & os) const
+void InsetMathBig::infoize2(std::ostream & os) const
 {
        os << name_;
 }
 
 
-bool MathBigInset::isBigInsetDelim(string const & delim)
+bool InsetMathBig::isBigInsetDelim(string const & delim)
 {
        // mathed_draw_deco must handle these
        static char const * const delimiters[] = {
index 5d85fa2fa1040828639822c3c208a07384ab1d86..c778d7a09780cb18baabdfde2a50007ab283d586 100644 (file)
 #include <string>
 
 /// Inset for \\bigl & Co.
-class MathBigInset : public MathDimInset {
+class InsetMathBig : public InsetMathDim {
 public:
        ///
-       MathBigInset(std::string const & name, std::string const & delim);
+       InsetMathBig(std::string const & name, std::string const & delim);
        ///
        std::string name() const;
        ///
index c2718bb049726d0afe2ad7a98e0118cb8c30333e..80eafb3fd897851a217627ae90797a91fc23f8f7 100644 (file)
@@ -20,18 +20,18 @@ using std::max;
 using std::auto_ptr;
 
 
-MathBinomInset::MathBinomInset(bool choose)
+InsetMathBinom::InsetMathBinom(bool choose)
        : choose_(choose)
 {}
 
 
-auto_ptr<InsetBase> MathBinomInset::doClone() const
+auto_ptr<InsetBase> InsetMathBinom::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathBinomInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathBinom(*this));
 }
 
 
-int MathBinomInset::dw() const
+int InsetMathBinom::dw() const
 {
        int w = dim_.height() / 5;
        if (w > 15)
@@ -42,7 +42,7 @@ int MathBinomInset::dw() const
 }
 
 
-void MathBinomInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathBinom::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        ScriptChanger dummy(mi.base);
        cell(0).metrics(mi);
@@ -55,7 +55,7 @@ void MathBinomInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathBinomInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathBinom::draw(PainterInfo & pi, int x, int y) const
 {
        int m = x + dim_.width() / 2;
        ScriptChanger dummy(pi.base);
@@ -68,13 +68,13 @@ void MathBinomInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-bool MathBinomInset::extraBraces() const
+bool InsetMathBinom::extraBraces() const
 {
        return choose_;
 }
 
 
-void MathBinomInset::write(WriteStream & os) const
+void InsetMathBinom::write(WriteStream & os) const
 {
        if (choose_)
                os << '{' << cell(0) << " \\choose " << cell(1) << '}';
@@ -83,7 +83,7 @@ void MathBinomInset::write(WriteStream & os) const
 }
 
 
-void MathBinomInset::normalize(NormalStream & os) const
+void InsetMathBinom::normalize(NormalStream & os) const
 {
        os << "[binom " << cell(0) << ' ' << cell(1) << ']';
 }
index 28a2bbadf8f72997a53905e3d7d8555e5dbf14eb..659b23d4d7362f67da74e7ce186223de38ef72a0 100644 (file)
 
 
 /// Binom like objects
-class MathBinomInset : public MathFracbaseInset {
+class InsetMathBinom : public InsetMathFracBase {
 public:
        ///
-       explicit MathBinomInset(bool choose = false);
+       explicit InsetMathBinom(bool choose = false);
        ///
        void write(WriteStream & os) const;
        ///
index fc847197e4032c57f95bfce58329ebe28ee7a21f..cbb284e6b7263fa55607a48d597dac05c4c09775 100644 (file)
 using std::auto_ptr;
 
 
-MathBoldsymbolInset::MathBoldsymbolInset()
-       : MathNestInset(1)
+InsetMathBoldSymbol::InsetMathBoldSymbol()
+       : InsetMathNest(1)
 {}
 
 
-auto_ptr<InsetBase> MathBoldsymbolInset::doClone() const
+auto_ptr<InsetBase> InsetMathBoldSymbol::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathBoldsymbolInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathBoldSymbol(*this));
 }
 
 
-void MathBoldsymbolInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathBoldSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        //FontSetChanger dummy(mi.base, "mathbf");
        cell(0).metrics(mi, dim);
@@ -40,7 +40,7 @@ void MathBoldsymbolInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathBoldsymbolInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathBoldSymbol::draw(PainterInfo & pi, int x, int y) const
 {
        //FontSetChanger dummy(pi.base, "mathbf");
        cell(0).draw(pi, x + 1, y);
@@ -49,32 +49,32 @@ void MathBoldsymbolInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathBoldsymbolInset::metricsT(TextMetricsInfo const & mi, Dimension & /*dim*/) const
+void InsetMathBoldSymbol::metricsT(TextMetricsInfo const & mi, Dimension & /*dim*/) const
 {
        cell(0).metricsT(mi, dim_);
 }
 
 
-void MathBoldsymbolInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathBoldSymbol::drawT(TextPainter & pain, int x, int y) const
 {
        cell(0).drawT(pain, x, y);
 }
 
 
-void MathBoldsymbolInset::validate(LaTeXFeatures & features) const
+void InsetMathBoldSymbol::validate(LaTeXFeatures & features) const
 {
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
        features.require("amssymb");
 }
 
 
-void MathBoldsymbolInset::write(WriteStream & os) const
+void InsetMathBoldSymbol::write(WriteStream & os) const
 {
        os << "\\boldsymbol{" << cell(0) << "}";
 }
 
 
-void MathBoldsymbolInset::infoize(std::ostream & os) const
+void InsetMathBoldSymbol::infoize(std::ostream & os) const
 {
        os << "Boldsymbol ";
 }
index cb5a6eb046fa5d1acecf7f4406e594c7bc1a2a33..76153ed31833007fcae1dd65621621ca8f8cb4fb 100644 (file)
 
 
 /// Inset for AMSTeX's \boldsymbol
-class MathBoldsymbolInset : public MathNestInset {
+class InsetMathBoldSymbol : public InsetMathNest {
 public:
        ///
-       MathBoldsymbolInset();
+       InsetMathBoldSymbol();
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index d16e4b169ced7fb9705815d5e9a61c85dd96dc97..de36c489d987ae6e60dc4dcea05665b98f727af6 100644 (file)
 using std::auto_ptr;
 
 
-MathBoxedInset::MathBoxedInset()
-       : MathNestInset(1)
+InsetMathBoxed::InsetMathBoxed()
+       : InsetMathNest(1)
 {}
 
 
-auto_ptr<InsetBase> MathBoxedInset::doClone() const
+auto_ptr<InsetBase> InsetMathBoxed::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathBoxedInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathBoxed(*this));
 }
 
 
-void MathBoxedInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathBoxed::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        metricsMarkers2(dim, 3); // 1 pixel space, 1 frame, 1 space
@@ -43,7 +43,7 @@ void MathBoxedInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathBoxedInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathBoxed::draw(PainterInfo & pi, int x, int y) const
 {
        pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
                dim_.width() - 2, dim_.height() - 2, LColor::foreground);
@@ -52,25 +52,25 @@ void MathBoxedInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathBoxedInset::write(WriteStream & os) const
+void InsetMathBoxed::write(WriteStream & os) const
 {
        os << "\\boxed{" << cell(0) << '}';
 }
 
 
-void MathBoxedInset::normalize(NormalStream & os) const
+void InsetMathBoxed::normalize(NormalStream & os) const
 {
        os << "[boxed " << cell(0) << ']';
 }
 
 
-void MathBoxedInset::infoize(std::ostream & os) const
+void InsetMathBoxed::infoize(std::ostream & os) const
 {
        os << "Boxed: ";
 }
 
 
-void MathBoxedInset::validate(LaTeXFeatures & features) const
+void InsetMathBoxed::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
 }
index c87ade2aab14bfc0aba8fafc3c52a44e0ef7bb2a..06924e762f4574eeb627fa3103ffbc1f7be5b15c 100644 (file)
 
 
 /// Non-AMS-style frame
-class MathBoxedInset : public MathNestInset {
+class InsetMathBoxed : public InsetMathNest {
 public:
        ///
-       MathBoxedInset();
+       InsetMathBoxed();
        ///
        void validate(LaTeXFeatures & features) const;
        ///
index a5af582e8cfdaeac15de34ccc322569a43243128..7fd3ac7a804b47a7c979dbf570cc3993d4bcfb38 100644 (file)
@@ -20,24 +20,24 @@ using std::string;
 using std::auto_ptr;
 
 
-MathBoxInset::MathBoxInset(string const & name)
-       : MathNestInset(1), name_(name)
+InsetMathBox::InsetMathBox(string const & name)
+       : InsetMathNest(1), name_(name)
 {}
 
 
-auto_ptr<InsetBase> MathBoxInset::doClone() const
+auto_ptr<InsetBase> InsetMathBox::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathBoxInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathBox(*this));
 }
 
 
-void MathBoxInset::write(WriteStream & os) const
+void InsetMathBox::write(WriteStream & os) const
 {
        os << '\\' << name_ << '{' << cell(0) << '}';
 }
 
 
-void MathBoxInset::normalize(NormalStream & os) const
+void InsetMathBox::normalize(NormalStream & os) const
 {
        os << '[' << name_ << ' ';
        //text_->write(buffer(), os);
@@ -45,7 +45,7 @@ void MathBoxInset::normalize(NormalStream & os) const
 }
 
 
-void MathBoxInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathBox::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
        cell(0).metrics(mi, dim);
@@ -54,7 +54,7 @@ void MathBoxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathBoxInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathBox::draw(PainterInfo & pi, int x, int y) const
 {
        FontSetChanger dummy(pi.base, "textnormal");
        cell(0).draw(pi, x, y);
@@ -62,7 +62,7 @@ void MathBoxInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathBoxInset::infoize(std::ostream & os) const
+void InsetMathBox::infoize(std::ostream & os) const
 {
        os << "Box: " << name_;
 }
index df9bcd6cff566150af7de2c64c57f5f4620fe020..96629de6703569675a66f59adca16e3ae0b33c6c 100644 (file)
@@ -21,10 +21,10 @@ class LyXFont;
 
 /// Support for \\mbox
 
-class MathBoxInset : public MathNestInset {
+class InsetMathBox : public InsetMathNest {
 public:
        ///
-       explicit MathBoxInset(std::string const & name);
+       explicit InsetMathBox(std::string const & name);
        ///
        mode_type currentMode() const { return TEXT_MODE; }
        ///
index 7e8a70234969bf181baddd470e7044a3dcdf87e5..b8b20acc2a44b8933ccea30cb379255b9712a874 100644 (file)
@@ -22,25 +22,25 @@ using std::max;
 using std::auto_ptr;
 
 
-MathBraceInset::MathBraceInset()
-       : MathNestInset(1)
+InsetMathBrace::InsetMathBrace()
+       : InsetMathNest(1)
 {}
 
 
-MathBraceInset::MathBraceInset(MathArray const & ar)
-       : MathNestInset(1)
+InsetMathBrace::InsetMathBrace(MathArray const & ar)
+       : InsetMathNest(1)
 {
        cell(0) = ar;
 }
 
 
-auto_ptr<InsetBase> MathBraceInset::doClone() const
+auto_ptr<InsetBase> InsetMathBrace::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathBraceInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathBrace(*this));
 }
 
 
-void MathBraceInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathBrace::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi);
        Dimension t;
@@ -53,7 +53,7 @@ void MathBraceInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathBraceInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathBrace::draw(PainterInfo & pi, int x, int y) const
 {
        LyXFont font = pi.base.font;
        font.setColor(LColor::latex);
@@ -66,43 +66,43 @@ void MathBraceInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathBraceInset::write(WriteStream & os) const
+void InsetMathBrace::write(WriteStream & os) const
 {
        os << '{' << cell(0) << '}';
 }
 
 
-void MathBraceInset::normalize(NormalStream & os) const
+void InsetMathBrace::normalize(NormalStream & os) const
 {
        os << "[block " << cell(0) << ']';
 }
 
 
-void MathBraceInset::maple(MapleStream & os) const
+void InsetMathBrace::maple(MapleStream & os) const
 {
        os << cell(0);
 }
 
 
-void MathBraceInset::octave(OctaveStream & os) const
+void InsetMathBrace::octave(OctaveStream & os) const
 {
        os << cell(0);
 }
 
 
-void MathBraceInset::mathmlize(MathMLStream & os) const
+void InsetMathBrace::mathmlize(MathMLStream & os) const
 {
        os << MTag("mrow") << cell(0) << ETag("mrow");
 }
 
 
-void MathBraceInset::mathematica(MathematicaStream & os) const
+void InsetMathBrace::mathematica(MathematicaStream & os) const
 {
        os << cell(0);
 }
 
 
-void MathBraceInset::infoize(std::ostream & os) const
+void InsetMathBrace::infoize(std::ostream & os) const
 {
        os << "Nested Block: ";
 }
index c6c0af1747a9594a19e54b9c0f7180f1addc0d98..1eb393999980d94b4481dcbba471ab86d33767fa 100644 (file)
 
 
 /// Extra nesting
-class MathBraceInset : public MathNestInset {
+class InsetMathBrace : public InsetMathNest {
 public:
        ///
-       MathBraceInset();
+       InsetMathBrace();
        ///
-       MathBraceInset(MathArray const & ar);
+       InsetMathBrace(MathArray const & ar);
        ///
-       MathBraceInset const * asBraceInset() const { return this; }
+       InsetMathBrace const * asBraceInset() const { return this; }
        /// we write extra braces in any case...
        bool extraBraces() const { return true; }
        ///
index 60ad0d57b27890a1dd06ea6a4414b5380b8ee3ad..0e1695075db3684178547c68d6bb8ab925dff249 100644 (file)
@@ -37,36 +37,36 @@ using std::string;
 using std::auto_ptr;
 
 
-MathCasesInset::MathCasesInset(row_type n)
-       : MathGridInset(2, n, 'c', "ll")
+InsetMathCases::InsetMathCases(row_type n)
+       : InsetMathGrid(2, n, 'c', "ll")
 {}
 
 
-auto_ptr<InsetBase> MathCasesInset::doClone() const
+auto_ptr<InsetBase> InsetMathCases::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathCasesInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathCases(*this));
 }
 
 
-void MathCasesInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathCases::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       MathGridInset::metrics(mi);
+       InsetMathGrid::metrics(mi);
        dim_.wid += 8;
        dim = dim_;
 }
 
 
-void MathCasesInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathCases::draw(PainterInfo & pi, int x, int y) const
 {
        mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 6, dim_.height(), "{");
-       MathGridInset::drawWithMargin(pi, x, y, 8, 0);
+       InsetMathGrid::drawWithMargin(pi, x, y, 8, 0);
        setPosCache(pi, x, y);
 }
 
 
-void MathCasesInset::doDispatch(LCursor & cur, FuncRequest & cmd)
+void InsetMathCases::doDispatch(LCursor & cur, FuncRequest & cmd)
 {
-       //lyxerr << "*** MathCasesInset: request: " << cmd << endl;
+       //lyxerr << "*** InsetMathCases: request: " << cmd << endl;
        switch (cmd.action) {
        case LFUN_TABULAR_FEATURE: {
                recordUndo(cur);
@@ -77,12 +77,12 @@ void MathCasesInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                }
        }
        default:
-               MathGridInset::doDispatch(cur, cmd);
+               InsetMathGrid::doDispatch(cur, cmd);
        }
 }
 
 
-bool MathCasesInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+bool InsetMathCases::getStatus(LCursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
        switch (cmd.action) {
@@ -97,47 +97,47 @@ bool MathCasesInset::getStatus(LCursor & cur, FuncRequest const & cmd,
                }
        }
        default:
-               return MathGridInset::getStatus(cur, cmd, flag);
+               return InsetMathGrid::getStatus(cur, cmd, flag);
        }
 }
 
 
-void MathCasesInset::write(WriteStream & os) const
+void InsetMathCases::write(WriteStream & os) const
 {
        if (os.fragile())
                os << "\\protect";
        os << "\\begin{cases}\n";
-       MathGridInset::write(os);
+       InsetMathGrid::write(os);
        if (os.fragile())
                os << "\\protect";
        os << "\\end{cases}";
 }
 
 
-void MathCasesInset::normalize(NormalStream & os) const
+void InsetMathCases::normalize(NormalStream & os) const
 {
        os << "[cases ";
-       MathGridInset::normalize(os);
+       InsetMathGrid::normalize(os);
        os << ']';
 }
 
 
-void MathCasesInset::maple(MapleStream & os) const
+void InsetMathCases::maple(MapleStream & os) const
 {
        os << "cases(";
-       MathGridInset::maple(os);
+       InsetMathGrid::maple(os);
        os << ')';
 }
 
 
-void MathCasesInset::infoize(std::ostream & os) const
+void InsetMathCases::infoize(std::ostream & os) const
 {
        os << "Cases ";
 }
 
 
-void MathCasesInset::validate(LaTeXFeatures & features) const
+void InsetMathCases::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
-       MathGridInset::validate(features);
+       InsetMathGrid::validate(features);
 }
index f28776c51b72d6c2c73553ad155abd1e2404ad2b..d868fba09b297171ed934bd49ecf6bf7a3bff2e5 100644 (file)
 
 class LaTeXFeatures;
 
-class MathCasesInset : public MathGridInset {
+class InsetMathCases : public InsetMathGrid {
 public:
        ///
-       explicit MathCasesInset(row_type rows = 1u);
+       explicit InsetMathCases(row_type rows = 1u);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index 290815d88bb7e80ea3ddd8863a96cc206b62231c..309bf4a63c5fbabdb5da1bc32457791ed3006a39 100644 (file)
@@ -40,19 +40,19 @@ namespace {
 }
 
 
-MathCharInset::MathCharInset(char c)
+InsetMathChar::InsetMathChar(char c)
        : char_(c)
 {}
 
 
 
-auto_ptr<InsetBase> MathCharInset::doClone() const
+auto_ptr<InsetBase> InsetMathChar::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathCharInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathChar(*this));
 }
 
 
-void MathCharInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathChar::metrics(MetricsInfo & mi, Dimension & dim) const
 {
 #if 1
        if (char_ == '=' && has_math_fonts) {
@@ -77,13 +77,13 @@ void MathCharInset::metrics(MetricsInfo & mi, Dimension & dim) const
        mathed_char_dim(font_, char_, dim_);
        if (isBinaryOp(char_, code_))
                width_ += 2 * font_metrics::width(' ', font_);
-       lyxerr << "MathCharInset::metrics: " << dim << endl;
+       lyxerr << "InsetMathChar::metrics: " << dim << endl;
 #endif
        width_ = dim.wid;
 }
 
 
-void MathCharInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathChar::draw(PainterInfo & pi, int x, int y) const
 {
        //lyxerr << "drawing '" << char_ << "' font: " << pi.base.fontname << endl;
        int const em = mathed_char_width(pi.base.font, 'M');
@@ -110,7 +110,7 @@ void MathCharInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathCharInset::metricsT(TextMetricsInfo const &, Dimension & dim) const
+void InsetMathChar::metricsT(TextMetricsInfo const &, Dimension & dim) const
 {
        dim.wid = 1;
        dim.asc = 1;
@@ -118,32 +118,32 @@ void MathCharInset::metricsT(TextMetricsInfo const &, Dimension & dim) const
 }
 
 
-void MathCharInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathChar::drawT(TextPainter & pain, int x, int y) const
 {
        //lyxerr << "drawing text '" << char_ << "' code: " << code_ << endl;
        pain.draw(x, y, char_);
 }
 
 
-void MathCharInset::write(WriteStream & os) const
+void InsetMathChar::write(WriteStream & os) const
 {
        os << char_;
 }
 
 
-void MathCharInset::normalize(NormalStream & os) const
+void InsetMathChar::normalize(NormalStream & os) const
 {
        os << "[char " << char_ << " mathalpha]";
 }
 
 
-void MathCharInset::octave(OctaveStream & os) const
+void InsetMathChar::octave(OctaveStream & os) const
 {
        os << char_;
 }
 
 
-void MathCharInset::mathmlize(MathMLStream & ms) const
+void InsetMathChar::mathmlize(MathMLStream & ms) const
 {
        switch (char_) {
                case '<': ms << "&lt;"; break;
@@ -154,7 +154,7 @@ void MathCharInset::mathmlize(MathMLStream & ms) const
 }
 
 
-bool MathCharInset::isRelOp() const
+bool InsetMathChar::isRelOp() const
 {
        return char_ == '=' || char_ == '<' || char_ == '>';
 }
index a40f577d472f180a88377d511f93dc53e426bcc3..cf8ca1fc62d538788f6e47b70118fd93343ae26b 100644 (file)
 
 
 /// The base character inset.
-class MathCharInset : public MathInset {
+class InsetMathChar : public InsetMath {
 public:
        ///
-       explicit MathCharInset(char c);
+       explicit InsetMathChar(char c);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
@@ -40,7 +40,7 @@ public:
        ///
        void mathmlize(MathMLStream & ms) const;
        /// identifies Charinsets
-       MathCharInset const * asCharInset() const { return this; }
+       InsetMathChar const * asCharInset() const { return this; }
        ///
        char getChar() const { return char_; }
        ///
index e630ebc95dc04a0208ddc99d80271bf02551a639..d05f44ad98e2ed8c00deb2b95068366c3d931d46 100644 (file)
@@ -35,24 +35,24 @@ bool normalcolor(string const & color)
 } // namespace anon
 
 
-MathColorInset::MathColorInset(bool oldstyle, LColor_color const & color)
-       : MathNestInset(1), oldstyle_(oldstyle),
+InsetMathColor::InsetMathColor(bool oldstyle, LColor_color const & color)
+       : InsetMathNest(1), oldstyle_(oldstyle),
          color_(lcolor.getLaTeXName(color))
 {}
 
 
-MathColorInset::MathColorInset(bool oldstyle, string const & color)
-       : MathNestInset(1), oldstyle_(oldstyle), color_(color)
+InsetMathColor::InsetMathColor(bool oldstyle, string const & color)
+       : InsetMathNest(1), oldstyle_(oldstyle), color_(color)
 {}
 
 
-auto_ptr<InsetBase> MathColorInset::doClone() const
+auto_ptr<InsetBase> InsetMathColor::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathColorInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathColor(*this));
 }
 
 
-void MathColorInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathColor::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
@@ -60,7 +60,7 @@ void MathColorInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathColorInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathColor::draw(PainterInfo & pi, int x, int y) const
 {
        LColor_color origcol = pi.base.font.color();
        pi.base.font.setColor(lcolor.getFromLaTeXName(color_));
@@ -71,15 +71,15 @@ void MathColorInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathColorInset::validate(LaTeXFeatures & features) const
+void InsetMathColor::validate(LaTeXFeatures & features) const
 {
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
        if (!normalcolor(color_))
                features.require("color");
 }
 
 
-void MathColorInset::write(WriteStream & os) const
+void InsetMathColor::write(WriteStream & os) const
 {
        if (normalcolor(color_))
                // reset to default color inside another color inset
@@ -91,13 +91,13 @@ void MathColorInset::write(WriteStream & os) const
 }
 
 
-void MathColorInset::normalize(NormalStream & os) const
+void InsetMathColor::normalize(NormalStream & os) const
 {
        os << "[color " << color_ << ' ' << cell(0) << ']';
 }
 
 
-void MathColorInset::infoize(std::ostream & os) const
+void InsetMathColor::infoize(std::ostream & os) const
 {
        os << "Color: " << color_;
 }
index 6eec693f4f90c4ad36ffbfb60711b6107946fc76..539345faa911beb6bbf8ffb9f32b3ac83029bcdc 100644 (file)
 
 /// Change colours.
 
-class MathColorInset : public MathNestInset {
+class InsetMathColor : public InsetMathNest {
 public:
        /// Create a color inset from LyX color number
-       explicit MathColorInset(bool oldstyle,
+       explicit InsetMathColor(bool oldstyle,
                LColor_color const & color = LColor::none);
        /// Create a color inset from LaTeX color name
-       explicit MathColorInset(bool oldstyle, std::string const & color);
+       explicit InsetMathColor(bool oldstyle, std::string const & color);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        /// we write extra braces in any case...
index 790871ccbe1204683796be45d5e66d7bf47b6699..11c09080bbbdb250b627b64dc44f5088f7e694f7 100644 (file)
@@ -20,25 +20,25 @@ using std::string;
 using std::auto_ptr;
 
 
-MathCommentInset::MathCommentInset()
-       : MathNestInset(1)
+InsetMathComment::InsetMathComment()
+       : InsetMathNest(1)
 {}
 
 
-MathCommentInset::MathCommentInset(string const & str)
-       : MathNestInset(1)
+InsetMathComment::InsetMathComment(string const & str)
+       : InsetMathNest(1)
 {
        asArray(str, cell(0));
 }
 
 
-auto_ptr<InsetBase> MathCommentInset::doClone() const
+auto_ptr<InsetBase> InsetMathComment::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathCommentInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathComment(*this));
 }
 
 
-void MathCommentInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
@@ -46,52 +46,52 @@ void MathCommentInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathCommentInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathComment::draw(PainterInfo & pi, int x, int y) const
 {
        cell(0).draw(pi, x + 1, y);
        drawMarkers(pi, x, y);
 }
 
 
-void MathCommentInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
+void InsetMathComment::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 {
        cell(0).metricsT(mi, dim);
 }
 
 
-void MathCommentInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathComment::drawT(TextPainter & pain, int x, int y) const
 {
        cell(0).drawT(pain, x, y);
 }
 
 
-void MathCommentInset::write(WriteStream & os) const
+void InsetMathComment::write(WriteStream & os) const
 {
        os << '%' << cell(0) << "\n";
 }
 
 
-void MathCommentInset::maple(MapleStream & os) const
+void InsetMathComment::maple(MapleStream & os) const
 {
        os << '#' << cell(0) << "\n";
 }
 
 
-void MathCommentInset::mathematica(MathematicaStream &) const
+void InsetMathComment::mathematica(MathematicaStream &) const
 {}
 
 
-void MathCommentInset::octave(OctaveStream &) const
+void InsetMathComment::octave(OctaveStream &) const
 {}
 
 
-void MathCommentInset::mathmlize(MathMLStream & os) const
+void InsetMathComment::mathmlize(MathMLStream & os) const
 {
        os << MTag("comment") << cell(0) << cell(1) << ETag("comment");
 }
 
 
-void MathCommentInset::infoize(std::ostream & os) const
+void InsetMathComment::infoize(std::ostream & os) const
 {
        os << "Comment";
 }
index 509ae0c6610b6d8ea48ebb864dea41377c345028..40653b0826f7143f52bf58782d44fcece794a8e3 100644 (file)
 class latexkeys;
 
 /// Inset for end-of-line comments
-class MathCommentInset : public MathNestInset {
+class InsetMathComment : public InsetMathNest {
 public:
        ///
-       MathCommentInset();
+       InsetMathComment();
        ///
-       explicit MathCommentInset(std::string const &);
+       explicit InsetMathComment(std::string const &);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index eddbbf7ce17b4654616df51d1a079ecd04692254..2c836e2a865b64bd78aad5d7f54e5b7249512421 100644 (file)
 #include "support/std_ostream.h"
 
 
-MathDecorationInset::MathDecorationInset(latexkeys const * key)
-       : MathNestInset(1), key_(key)
+InsetMathDecoration::InsetMathDecoration(latexkeys const * key)
+       : InsetMathNest(1), key_(key)
 {
 //     lyxerr << " creating deco " << key->name << std::endl;
 }
 
 
-std::auto_ptr<InsetBase> MathDecorationInset::doClone() const
+std::auto_ptr<InsetBase> InsetMathDecoration::doClone() const
 {
-       return std::auto_ptr<InsetBase>(new MathDecorationInset(*this));
+       return std::auto_ptr<InsetBase>(new InsetMathDecoration(*this));
 }
 
 
-bool MathDecorationInset::upper() const
+bool InsetMathDecoration::upper() const
 {
        return key_->name.substr(0, 5) != "under";
 }
 
 
-bool MathDecorationInset::isScriptable() const
+bool InsetMathDecoration::isScriptable() const
 {
        return
                        key_->name == "overbrace" ||
@@ -57,7 +57,7 @@ bool MathDecorationInset::isScriptable() const
 }
 
 
-bool MathDecorationInset::protect() const
+bool InsetMathDecoration::protect() const
 {
        return
                        key_->name == "overbrace" ||
@@ -71,7 +71,7 @@ bool MathDecorationInset::protect() const
 }
 
 
-bool MathDecorationInset::wide() const
+bool InsetMathDecoration::wide() const
 {
        return
                        key_->name == "overline" ||
@@ -89,7 +89,7 @@ bool MathDecorationInset::wide() const
 }
 
 
-bool MathDecorationInset::ams() const
+bool InsetMathDecoration::ams() const
 {
        return
                        key_->name == "overleftrightarrow" ||
@@ -99,7 +99,7 @@ bool MathDecorationInset::ams() const
 }
 
 
-void MathDecorationInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
 
@@ -119,7 +119,7 @@ void MathDecorationInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathDecorationInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathDecoration::draw(PainterInfo & pi, int x, int y) const
 {
        cell(0).draw(pi, x + 1, y);
        if (wide())
@@ -132,7 +132,7 @@ void MathDecorationInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathDecorationInset::write(WriteStream & os) const
+void InsetMathDecoration::write(WriteStream & os) const
 {
        if (os.fragile() && protect())
                os << "\\protect";
@@ -140,21 +140,21 @@ void MathDecorationInset::write(WriteStream & os) const
 }
 
 
-void MathDecorationInset::normalize(NormalStream & os) const
+void InsetMathDecoration::normalize(NormalStream & os) const
 {
        os << "[deco " << key_->name << ' ' <<  cell(0) << ']';
 }
 
 
-void MathDecorationInset::infoize(std::ostream & os) const
+void InsetMathDecoration::infoize(std::ostream & os) const
 {
        os << "Deco: " << key_->name;
 }
 
 
-void MathDecorationInset::validate(LaTeXFeatures & features) const
+void InsetMathDecoration::validate(LaTeXFeatures & features) const
 {
        if (ams())
                features.require("amsmath");
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
 }
index 2878523e2e6342b63febe04f9f98cf69c920d580..4dbdb60f4bc8683213dfb5031debf4c1e60e2191 100644 (file)
 class latexkeys;
 
 /// Decorations and accents over (below) a math object
-class MathDecorationInset : public MathNestInset {
+class InsetMathDecoration : public InsetMathNest {
 public:
        ///
-       explicit MathDecorationInset(latexkeys const * key);
+       explicit InsetMathDecoration(latexkeys const * key);
        ///
        void draw(PainterInfo &, int x, int y) const;
        ///
index 1e179f8bed40c726f8f774682688f531f15dce09..460e3350f2f8e3caf4fd2f5e625aa42c494ee100 100644 (file)
@@ -51,40 +51,40 @@ string convertDelimToLatexName(string const & name)
 
 
 
-MathDelimInset::MathDelimInset(string const & l, string const & r)
-       : MathNestInset(1), left_(l), right_(r)
+InsetMathDelim::InsetMathDelim(string const & l, string const & r)
+       : InsetMathNest(1), left_(l), right_(r)
 {}
 
 
-MathDelimInset::MathDelimInset
+InsetMathDelim::InsetMathDelim
                (string const & l, string const & r, MathArray const & ar)
-       : MathNestInset(1), left_(l), right_(r)
+       : InsetMathNest(1), left_(l), right_(r)
 {
        cell(0) = ar;
 }
 
 
-auto_ptr<InsetBase> MathDelimInset::doClone() const
+auto_ptr<InsetBase> InsetMathDelim::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathDelimInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathDelim(*this));
 }
 
 
-void MathDelimInset::write(WriteStream & os) const
+void InsetMathDelim::write(WriteStream & os) const
 {
        os << "\\left" << convertDelimToLatexName(left_) << cell(0)
           << "\\right" << convertDelimToLatexName(right_);
 }
 
 
-void MathDelimInset::normalize(NormalStream & os) const
+void InsetMathDelim::normalize(NormalStream & os) const
 {
        os << "[delim " << convertDelimToLatexName(left_) << ' '
           << convertDelimToLatexName(right_) << ' ' << cell(0) << ']';
 }
 
 
-void MathDelimInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathDelim::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi);
        Dimension t;
@@ -104,7 +104,7 @@ void MathDelimInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathDelimInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathDelim::draw(PainterInfo & pi, int x, int y) const
 {
        int const b = y - dim_.asc;
        cell(0).draw(pi, x + dw_ + 4, y);
@@ -115,25 +115,25 @@ void MathDelimInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-bool MathDelimInset::isParenthesis() const
+bool InsetMathDelim::isParenthesis() const
 {
        return left_ == "(" && right_ == ")";
 }
 
 
-bool MathDelimInset::isBrackets() const
+bool InsetMathDelim::isBrackets() const
 {
        return left_ == "[" && right_ == "]";
 }
 
 
-bool MathDelimInset::isAbs() const
+bool InsetMathDelim::isAbs() const
 {
        return left_ == "|" && right_ == "|";
 }
 
 
-void MathDelimInset::maple(MapleStream & os) const
+void InsetMathDelim::maple(MapleStream & os) const
 {
        if (isAbs()) {
                if (cell(0).size() == 1 && cell(0).front()->asMatrixInset())
@@ -145,7 +145,7 @@ void MathDelimInset::maple(MapleStream & os) const
                os << left_ << cell(0) << right_;
 }
 
-void MathDelimInset::maxima(MaximaStream & os) const
+void InsetMathDelim::maxima(MaximaStream & os) const
 {
        if (isAbs()) {
                if (cell(0).size() == 1 && cell(0).front()->asMatrixInset())
@@ -158,7 +158,7 @@ void MathDelimInset::maxima(MaximaStream & os) const
 }
 
 
-void MathDelimInset::mathematica(MathematicaStream & os) const
+void InsetMathDelim::mathematica(MathematicaStream & os) const
 {
        if (isAbs()) {
                if (cell(0).size() == 1 && cell(0).front()->asMatrixInset())
@@ -171,14 +171,14 @@ void MathDelimInset::mathematica(MathematicaStream & os) const
 }
 
 
-void MathDelimInset::mathmlize(MathMLStream & os) const
+void InsetMathDelim::mathmlize(MathMLStream & os) const
 {
        os << "<fenced open=\"" << left_ << "\" close=\""
                << right_ << "\">" << cell(0) << "</fenced>";
 }
 
 
-void MathDelimInset::octave(OctaveStream & os) const
+void InsetMathDelim::octave(OctaveStream & os) const
 {
        if (isAbs())
                os << "det(" << cell(0) << ')';
index 41b1f7044a1cbd1f563c4c41654e7aca5c8f1b41..baefcd347dbca5615640f2ac4827968538c2b1af 100644 (file)
 
 
 /// A delimiter
-class MathDelimInset : public MathNestInset {
+class InsetMathDelim : public InsetMathNest {
 public:
        ///
-       MathDelimInset(std::string const & left, std::string const & right);
+       InsetMathDelim(std::string const & left, std::string const & right);
        ///
-       MathDelimInset(std::string const & left, std::string const & right, MathArray const &);
+       InsetMathDelim(std::string const & left, std::string const & right, MathArray const &);
        ///
-       MathDelimInset * asDelimInset() { return this; }
+       InsetMathDelim * asDelimInset() { return this; }
        ///
-       MathDelimInset const * asDelimInset() const { return this; }
+       InsetMathDelim const * asDelimInset() const { return this; }
        /// is it (...)?
        bool isParenthesis() const;
        /// is it [...]?
index 164b3c705bba8d37fa89135675140831a903110d..d73d470c49aa6393570515b2f967111e4344013f 100644 (file)
@@ -23,18 +23,18 @@ using std::max;
 using std::auto_ptr;
 
 
-MathDfracInset::MathDfracInset()
-       : MathFracInset()
+InsetMathDFrac::InsetMathDFrac()
+       : InsetMathFrac()
 {}
 
 
-auto_ptr<InsetBase> MathDfracInset::doClone() const
+auto_ptr<InsetBase> InsetMathDFrac::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathDfracInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathDFrac(*this));
 }
 
 
-void MathDfracInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathDFrac::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi);
        cell(1).metrics(mi);
@@ -45,7 +45,7 @@ void MathDfracInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathDfracInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathDFrac::draw(PainterInfo & pi, int x, int y) const
 {
        int m = x + dim_.wid / 2;
        cell(0).draw(pi, m - cell(0).width() / 2, y - cell(0).descent() - 2 - 5);
@@ -55,20 +55,20 @@ void MathDfracInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-string MathDfracInset::name() const
+string InsetMathDFrac::name() const
 {
        return "dfrac";
 }
 
 
-void MathDfracInset::mathmlize(MathMLStream & os) const
+void InsetMathDFrac::mathmlize(MathMLStream & os) const
 {
        os << MTag("mdfrac") << cell(0) << cell(1) << ETag("mdfrac");
 }
 
 
-void MathDfracInset::validate(LaTeXFeatures & features) const
+void InsetMathDFrac::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
 }
index 1a24b1b5e616ae0077b071cf18c864b5f7e2aa2b..e294f25c7e200e512a87848d36a40cf458fd2ade 100644 (file)
 
 
 /// \dfrac support
-class MathDfracInset : public MathFracInset {
+class InsetMathDFrac : public InsetMathFrac {
 public:
        ///
-       MathDfracInset();
+       InsetMathDFrac();
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index a8f4f35ede9b177adcb8cb81a3481a178bd45378..3882df30e992e5827358459b04dbd6bcf423a4ad 100644 (file)
@@ -19,24 +19,24 @@ using std::auto_ptr;
 using std::endl;
 
 
-MathDiffInset::MathDiffInset()
-       : MathNestInset(1)
+InsetMathDiff::InsetMathDiff()
+       : InsetMathNest(1)
 {}
 
 
-auto_ptr<InsetBase> MathDiffInset::doClone() const
+auto_ptr<InsetBase> InsetMathDiff::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathDiffInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathDiff(*this));
 }
 
 
-void MathDiffInset::addDer(MathArray const & der)
+void InsetMathDiff::addDer(MathArray const & der)
 {
        cells_.push_back(der);
 }
 
 
-void MathDiffInset::normalize(NormalStream & os) const
+void InsetMathDiff::normalize(NormalStream & os) const
 {
        os << "[diff";
        for (idx_type idx = 0; idx < nargs(); ++idx)
@@ -45,19 +45,19 @@ void MathDiffInset::normalize(NormalStream & os) const
 }
 
 
-void MathDiffInset::metrics(MetricsInfo &, Dimension &) const
+void InsetMathDiff::metrics(MetricsInfo &, Dimension &) const
 {
        lyxerr << "should not happen" << endl;
 }
 
 
-void MathDiffInset::draw(PainterInfo &, int, int) const
+void InsetMathDiff::draw(PainterInfo &, int, int) const
 {
        lyxerr << "should not happen" << endl;
 }
 
 
-void MathDiffInset::maple(MapleStream & os) const
+void InsetMathDiff::maple(MapleStream & os) const
 {
        os << "diff(";
        for (idx_type idx = 0; idx < nargs(); ++idx) {
@@ -69,7 +69,7 @@ void MathDiffInset::maple(MapleStream & os) const
 }
 
 
-void MathDiffInset::maxima(MaximaStream & os) const
+void InsetMathDiff::maxima(MaximaStream & os) const
 {
        os << "diff(";
        for (idx_type idx = 0; idx < nargs(); ++idx) {
@@ -83,7 +83,7 @@ void MathDiffInset::maxima(MaximaStream & os) const
 }
 
 
-void MathDiffInset::mathematica(MathematicaStream & os) const
+void InsetMathDiff::mathematica(MathematicaStream & os) const
 {
        os << "D[";
        for (idx_type idx = 0; idx < nargs(); ++idx) {
@@ -95,7 +95,7 @@ void MathDiffInset::mathematica(MathematicaStream & os) const
 }
 
 
-void MathDiffInset::mathmlize(MathMLStream & os) const
+void InsetMathDiff::mathmlize(MathMLStream & os) const
 {
        os << "diff(";
        for (idx_type idx = 0; idx < nargs(); ++idx) {
@@ -107,7 +107,7 @@ void MathDiffInset::mathmlize(MathMLStream & os) const
 }
 
 
-void MathDiffInset::write(WriteStream &) const
+void InsetMathDiff::write(WriteStream &) const
 {
        lyxerr << "should not happen" << endl;
 }
index 7e5a190ce0ea9cbfc20a9d634221458915fda95b..034e1ef90fd0ed607ee91d0e8e30605c61ce4160 100644 (file)
 
 #include "math_nestinset.h"
 
-class MathDiffInset : public MathNestInset {
+class InsetMathDiff : public InsetMathNest {
 public:
        ///
-       MathDiffInset();
+       InsetMathDiff();
        ///
        void addDer(MathArray const & der);
        ///
index 939e4b89a82a63b41da6dc726a9c665f5bb683fb..2908fbc3dd813d689691f8edd79f647357023a9e 100644 (file)
 #include "debug.h"
 
 
-MathDimInset::MathDimInset()
+InsetMathDim::InsetMathDim()
 {}
 
 
-int MathDimInset::ascent() const
+int InsetMathDim::ascent() const
 {
        return dim_.asc;
 }
 
 
-int MathDimInset::descent() const
+int InsetMathDim::descent() const
 {
        return dim_.des;
 }
 
 
-int MathDimInset::width() const
+int InsetMathDim::width() const
 {
        return dim_.wid;
 }
 
 
-void MathDimInset::setPosCache(PainterInfo const &, int x, int y) const
+void InsetMathDim::setPosCache(PainterInfo const &, int x, int y) const
 {
-       //lyxerr << "MathDimInset: cache to " << x << " " << y << std::endl;
+       //lyxerr << "InsetMathDim: cache to " << x << " " << y << std::endl;
        theCoords.insets().add(this, x, y);
 }
index 3294e8f12e83cfddd4d3cc3a7bcb6a02fcaa9ff8..990516d03d2a21c0f28a5e3ea7a2c81a01a04671 100644 (file)
@@ -19,10 +19,10 @@ class PainterInfo;
 
 
 /// things that need the dimension cache
-class MathDimInset : public MathInset {
+class InsetMathDim : public InsetMath {
 public:
        ///
-       MathDimInset();
+       InsetMathDim();
 
        ///
        Dimension dimensions() const { return dim_; }
index 1c7b4ff3a97f9f9ee94dca7cd2b90685b7aeb7c5..9411f11096329f168239976fce603362604f01ec 100644 (file)
@@ -21,18 +21,18 @@ using std::string;
 using std::auto_ptr;
 
 
-MathDotsInset::MathDotsInset(latexkeys const * key)
+InsetMathDots::InsetMathDots(latexkeys const * key)
        : key_(key)
 {}
 
 
-auto_ptr<InsetBase> MathDotsInset::doClone() const
+auto_ptr<InsetBase> InsetMathDots::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathDotsInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathDots(*this));
 }
 
 
-void MathDotsInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathDots::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        mathed_char_dim(mi.base.font, 'M', dim);
        dh_ = 0;
@@ -51,7 +51,7 @@ void MathDotsInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathDotsInset::draw(PainterInfo & pain, int x, int y) const
+void InsetMathDots::draw(PainterInfo & pain, int x, int y) const
 {
        mathed_draw_deco(pain, x + 2, y - dh_, dim_.width() - 2, dim_.ascent(),
                key_->name);
@@ -65,7 +65,7 @@ void MathDotsInset::draw(PainterInfo & pain, int x, int y) const
 }
 
 
-string MathDotsInset::name() const
+string InsetMathDots::name() const
 {
        return key_->name;
 }
index 90cd39ade86ab74b25c5f58e170913184b25b3a4..f923f5d4674970601183519ab22528804c346dcc 100644 (file)
 class latexkeys;
 
 /// The different kinds of ellipsis
-class MathDotsInset : public MathDimInset {
+class InsetMathDots : public InsetMathDim {
 public:
        ///
-       explicit MathDotsInset(latexkeys const * l);
+       explicit InsetMathDots(latexkeys const * l);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index 14942be2b16635486096c4a8afbb1590d5a4cf5f..98e69b864aef21793b196095f25f293c667e4e4d 100644 (file)
@@ -21,18 +21,18 @@ using std::string;
 using std::auto_ptr;
 
 
-MathEnvInset::MathEnvInset(string const & name)
-       : MathNestInset(1), name_(name)
+InsetMathEnv::InsetMathEnv(string const & name)
+       : InsetMathNest(1), name_(name)
 {}
 
 
-auto_ptr<InsetBase> MathEnvInset::doClone() const
+auto_ptr<InsetBase> InsetMathEnv::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathEnvInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathEnv(*this));
 }
 
 
-void MathEnvInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathEnv::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
@@ -40,26 +40,26 @@ void MathEnvInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathEnvInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathEnv::draw(PainterInfo & pi, int x, int y) const
 {
        cell(0).draw(pi, x + 1, y);
        drawMarkers(pi, x, y);
 }
 
 
-void MathEnvInset::write(WriteStream & os) const
+void InsetMathEnv::write(WriteStream & os) const
 {
        os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
 }
 
 
-void MathEnvInset::normalize(NormalStream & os) const
+void InsetMathEnv::normalize(NormalStream & os) const
 {
        os << "[env " << name_ << ' ' << cell(0) << ']';
 }
 
 
-void MathEnvInset::infoize(std::ostream & os) const
+void InsetMathEnv::infoize(std::ostream & os) const
 {
        os << "Env: " << name_;
 }
index ab32bda5e6da01a31977084d615e03f7d25ed480..4bf3298acf33bfb6cb10ed671ec0092bb7b26cfd 100644 (file)
 
 
 /// Environtments á la \begin{something}...\end{something}
-class MathEnvInset : public MathNestInset {
+class InsetMathEnv : public InsetMathNest {
 public:
        ///
-       MathEnvInset(std::string const & name_);
+       InsetMathEnv(std::string const & name_);
        ///
        void draw(PainterInfo &, int x, int y) const;
        ///
index c3b9a829890565da5b06e23f42860ef6c0b7f069..348d82d1f19715bb038e39b0840cdb354771ba46 100644 (file)
@@ -21,43 +21,43 @@ using std::string;
 using std::auto_ptr;
 
 
-MathExFuncInset::MathExFuncInset(string const & name)
-       : MathNestInset(1), name_(name)
+InsetMathExFunc::InsetMathExFunc(string const & name)
+       : InsetMathNest(1), name_(name)
 {}
 
 
-MathExFuncInset::MathExFuncInset(string const & name, MathArray const & ar)
-       : MathNestInset(1), name_(name)
+InsetMathExFunc::InsetMathExFunc(string const & name, MathArray const & ar)
+       : InsetMathNest(1), name_(name)
 {
        cell(0) = ar;
 }
 
 
-auto_ptr<InsetBase> MathExFuncInset::doClone() const
+auto_ptr<InsetBase> InsetMathExFunc::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathExFuncInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathExFunc(*this));
 }
 
 
-void MathExFuncInset::metrics(MetricsInfo & mi, Dimension & /*dim*/) const
+void InsetMathExFunc::metrics(MetricsInfo & mi, Dimension & /*dim*/) const
 {
        mathed_string_dim(mi.base.font, name_, dim_);
 }
 
 
-void MathExFuncInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathExFunc::draw(PainterInfo & pi, int x, int y) const
 {
        drawStrBlack(pi, x, y, name_);
 }
 
 
-string MathExFuncInset::name() const
+string InsetMathExFunc::name() const
 {
        return name_;
 }
 
 
-void MathExFuncInset::maple(MapleStream & os) const
+void InsetMathExFunc::maple(MapleStream & os) const
 {
        if (name_ == "det")
                os << "linalg[det](" << cell(0) << ')';
@@ -66,7 +66,7 @@ void MathExFuncInset::maple(MapleStream & os) const
 }
 
 
-void MathExFuncInset::maxima(MaximaStream & os) const
+void InsetMathExFunc::maxima(MaximaStream & os) const
 {
        if (name_ == "det")
                os << "determinant(" << cell(0) << ')';
@@ -107,19 +107,19 @@ string asMathematicaName(string const & name)
 }
 
 
-void MathExFuncInset::mathematica(MathematicaStream & os) const
+void InsetMathExFunc::mathematica(MathematicaStream & os) const
 {
        os << asMathematicaName(name_) << '[' << cell(0) << ']';
 }
 
 
-void MathExFuncInset::mathmlize(MathMLStream & os) const
+void InsetMathExFunc::mathmlize(MathMLStream & os) const
 {
        os << MTag(name_.c_str()) << cell(0) << ETag(name_.c_str());
 }
 
 
-void MathExFuncInset::octave(OctaveStream & os) const
+void InsetMathExFunc::octave(OctaveStream & os) const
 {
        os << name_ << '(' << cell(0) << ')';
 }
index d999d9af0dd6d2e43dd40887ba88fa83030a9a2c..c0caf64951ce4adc0a78ffb05e6a788ec983493b 100644 (file)
 // f(x) in one block (as opposed to 'f','(','x',')' or 'f','x')
 // for interfacing external programs
 
-class MathExFuncInset : public MathNestInset {
+class InsetMathExFunc : public InsetMathNest {
 public:
        ///
-       explicit MathExFuncInset(std::string const & name);
+       explicit InsetMathExFunc(std::string const & name);
        ///
-       MathExFuncInset(std::string const & name, MathArray const & ar);
+       InsetMathExFunc(std::string const & name, MathArray const & ar);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index bd4afb918a8c1c933056fbdd26419a6981656855..a0900bbfbe692711da0af530b4c97c26b7588134 100644 (file)
@@ -25,8 +25,8 @@ using std::auto_ptr;
 using std::endl;
 
 
-MathExIntInset::MathExIntInset(string const & name)
-       : MathNestInset(4), symbol_(name)
+InsetMathExInt::InsetMathExInt(string const & name)
+       : InsetMathNest(4), symbol_(name)
 {}
 
 // 0 - core
@@ -35,19 +35,19 @@ MathExIntInset::MathExIntInset(string const & name)
 // 3 - upper
 
 
-auto_ptr<InsetBase> MathExIntInset::doClone() const
+auto_ptr<InsetBase> InsetMathExInt::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathExIntInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathExInt(*this));
 }
 
 
-void MathExIntInset::symbol(string const & symbol)
+void InsetMathExInt::symbol(string const & symbol)
 {
        symbol_ = symbol;
 }
 
 
-bool MathExIntInset::hasScripts() const
+bool InsetMathExInt::hasScripts() const
 {
        // take empty upper bound as "no scripts"
        return !cell(3).empty();
@@ -55,26 +55,26 @@ bool MathExIntInset::hasScripts() const
 
 
 
-void MathExIntInset::normalize(NormalStream & os) const
+void InsetMathExInt::normalize(NormalStream & os) const
 {
        os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
           << cell(2) << ' ' << cell(3) << ']';
 }
 
 
-void MathExIntInset::metrics(MetricsInfo &, Dimension &) const
+void InsetMathExInt::metrics(MetricsInfo &, Dimension &) const
 {
        lyxerr << "should not happen" << endl;
 }
 
 
-void MathExIntInset::draw(PainterInfo &, int, int) const
+void InsetMathExInt::draw(PainterInfo &, int, int) const
 {
        lyxerr << "should not happen" << endl;
 }
 
 
-void MathExIntInset::maple(MapleStream & os) const
+void InsetMathExInt::maple(MapleStream & os) const
 {
        os << symbol_ << '(';
        if (cell(0).size())
@@ -88,7 +88,7 @@ void MathExIntInset::maple(MapleStream & os) const
 }
 
 
-void MathExIntInset::maxima(MaximaStream & os) const
+void InsetMathExInt::maxima(MaximaStream & os) const
 {
        if ( symbol_ == "int" )
                os << "integrate(";
@@ -105,7 +105,7 @@ void MathExIntInset::maxima(MaximaStream & os) const
                os << cell(1) << ')';
 }
 
-void MathExIntInset::mathematica(MathematicaStream & os) const
+void InsetMathExInt::mathematica(MathematicaStream & os) const
 {
        if ( symbol_ == "int" )
                os << "Integrate[";
@@ -125,9 +125,9 @@ void MathExIntInset::mathematica(MathematicaStream & os) const
 }
 
 
-void MathExIntInset::mathmlize(MathMLStream & os) const
+void InsetMathExInt::mathmlize(MathMLStream & os) const
 {
-       boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
+       boost::scoped_ptr<InsetMathSymbol> sym(new InsetMathSymbol(symbol_));
        //if (hasScripts())
        //      mathmlize(sym, os);
        //else
@@ -138,7 +138,7 @@ void MathExIntInset::mathmlize(MathMLStream & os) const
 }
 
 
-void MathExIntInset::write(WriteStream &) const
+void InsetMathExInt::write(WriteStream &) const
 {
        lyxerr << "should not happen" << endl;
 }
index 8047fe21c86ae45656b19c2e92e67a87febc10cf..ea589e99832bff650abebbed39c971d106e06e79 100644 (file)
 
 
 // cell(0) is stuff before the 'd', cell(1) the stuff after
-class MathExIntInset : public MathNestInset {
+class InsetMathExInt : public InsetMathNest {
 public:
        ///
-       explicit MathExIntInset(std::string const & name_);
+       explicit InsetMathExInt(std::string const & name_);
        ///
        void symbol(std::string const &);
        ///
index b6e087eb48d81f2ba909e6e4f8592665f385e46c..6849fd952c3d345cfa0193207f06043b7672f139 100644 (file)
@@ -175,7 +175,7 @@ void extractStrings(MathArray & ar)
                if (!ar[i]->asCharInset())
                        continue;
                string s = charSequence(ar.begin() + i, ar.end());
-               ar[i] = MathAtom(new MathStringInset(s));
+               ar[i] = MathAtom(new InsetMathString(s));
                ar.erase(i + 1, i + s.size());
        }
        //lyxerr << "\nStrings to: " << ar << endl;
@@ -194,13 +194,13 @@ void extractMatrices(MathArray & ar)
                        continue;
                if (!arr.front()->asGridInset())
                        continue;
-               ar[i] = MathAtom(new MathMatrixInset(*(arr.front()->asGridInset())));
+               ar[i] = MathAtom(new InsetMathMatrix(*(arr.front()->asGridInset())));
        }
 
        // second pass for AMS "pmatrix" etc
        for (size_t i = 0; i < ar.size(); ++i)
                if (ar[i]->asAMSArrayInset())
-                       ar[i] = MathAtom(new MathMatrixInset(*(ar[i]->asGridInset())));
+                       ar[i] = MathAtom(new InsetMathMatrix(*(ar[i]->asGridInset())));
        //lyxerr << "\nMatrices to: " << ar << endl;
 }
 
@@ -335,7 +335,7 @@ void splitScripts(MathArray & ar)
 {
        //lyxerr << "\nScripts from: " << ar << endl;
        for (size_t i = 0; i < ar.size(); ++i) {
-               MathScriptInset const * script = ar[i]->asScriptInset();
+               InsetMathScript const * script = ar[i]->asScriptInset();
 
                // is this a script inset and do we also have a superscript?
                if (!script || !script->hasUp())
@@ -347,15 +347,15 @@ void splitScripts(MathArray & ar)
 
                if (script->nuc().size() == 1) {
                        // leave alone sums and integrals
-                       MathSymbolInset const * sym =
+                       InsetMathSymbol const * sym =
                                script->nuc().front()->asSymbolInset();
                        if (sym && (sym->name() == "sum" || sym->name() == "int"))
                                continue;
                }
 
                // create extra script inset and move superscript over
-               MathScriptInset * p = ar[i].nucleus()->asScriptInset();
-               auto_ptr<MathScriptInset> q(new MathScriptInset(true));
+               InsetMathScript * p = ar[i].nucleus()->asScriptInset();
+               auto_ptr<InsetMathScript> q(new InsetMathScript(true));
                swap(q->up(), p->up());
                p->removeScript(true);
 
@@ -390,12 +390,12 @@ void extractExps(MathArray & ar)
                        continue;
 
                // we need an exponent but no subscript
-               MathScriptInset const * sup = ar[i + 1]->asScriptInset();
+               InsetMathScript const * sup = ar[i + 1]->asScriptInset();
                if (!sup || sup->hasDown())
                        continue;
 
                // create a proper exp-inset as replacement
-               ar[i] = MathAtom(new MathExFuncInset("exp", sup->cell(1)));
+               ar[i] = MathAtom(new InsetMathExFunc("exp", sup->cell(1)));
                ar.erase(i + 1);
        }
        //lyxerr << "\nExps to: " << ar << endl;
@@ -409,12 +409,12 @@ void extractDets(MathArray & ar)
 {
        //lyxerr << "\ndet from: " << ar << endl;
        for (MathArray::iterator it = ar.begin(); it != ar.end(); ++it) {
-               MathDelimInset const * del = (*it)->asDelimInset();
+               InsetMathDelim const * del = (*it)->asDelimInset();
                if (!del)
                        continue;
                if (!del->isAbs())
                        continue;
-               *it = MathAtom(new MathExFuncInset("det", del->cell(0)));
+               *it = MathAtom(new InsetMathExFunc("det", del->cell(0)));
        }
        //lyxerr << "\ndet to: " << ar << endl;
 }
@@ -455,7 +455,7 @@ void extractNumbers(MathArray & ar)
 
                string s = digitSequence(ar.begin() + i, ar.end());
 
-               ar[i] = MathAtom(new MathNumberInset(s));
+               ar[i] = MathAtom(new InsetMathNumber(s));
                ar.erase(i + 1, i + s.size());
        }
        //lyxerr << "\nNumbers to: " << ar << endl;
@@ -481,7 +481,7 @@ bool testCloseParen(MathAtom const & at)
 
 MathAtom replaceParenDelims(const MathArray & ar)
 {
-       return MathAtom(new MathDelimInset("(", ")", ar));
+       return MathAtom(new InsetMathDelim("(", ")", ar));
 }
 
 
@@ -499,11 +499,11 @@ bool testCloseBracket(MathAtom const & at)
 
 MathAtom replaceBracketDelims(const MathArray & ar)
 {
-       return MathAtom(new MathDelimInset("[", "]", ar));
+       return MathAtom(new InsetMathDelim("[", "]", ar));
 }
 
 
-// replace '('...')' and '['...']' sequences by a real MathDelimInset
+// replace '('...')' and '['...']' sequences by a real InsetMathDelim
 void extractDelims(MathArray & ar)
 {
        //lyxerr << "\nDelims from: " << ar << endl;
@@ -519,7 +519,7 @@ void extractDelims(MathArray & ar)
 //
 
 
-// replace 'f' '(...)' and 'f' '^n' '(...)' sequences by a real MathExFuncInset
+// replace 'f' '(...)' and 'f' '^n' '(...)' sequences by a real InsetMathExFunc
 // assume 'extractDelims' ran before
 void extractFunctions(MathArray & ar)
 {
@@ -545,7 +545,7 @@ void extractFunctions(MathArray & ar)
                                continue;
                        // guess so, if this is followed by
                        // a DelimInset with a single item in the cell
-                       MathDelimInset const * del = (*jt)->asDelimInset();
+                       InsetMathDelim const * del = (*jt)->asDelimInset();
                        if (!del || del->cell(0).size() != 1)
                                continue;
                        // fall trough into main branch
@@ -557,7 +557,7 @@ void extractFunctions(MathArray & ar)
                extractScript(exp, jt, ar.end(), true);
 
                // create a proper inset as replacement
-               auto_ptr<MathExFuncInset> p(new MathExFuncInset(name));
+               auto_ptr<InsetMathExFunc> p(new InsetMathExFunc(name));
 
                // jt points to the "argument". Get hold of this.
                MathArray::iterator st = extractArgument(p->cell(0), jt, ar.end(), true);
@@ -608,7 +608,7 @@ bool testIntDiff(MathAtom const & at)
 }
 
 
-// replace '\int' ['_^'] x 'd''x'(...)' sequences by a real MathExIntInset
+// replace '\int' ['_^'] x 'd''x'(...)' sequences by a real InsetMathExInt
 // assume 'extractDelims' ran before
 void extractIntegrals(MathArray & ar)
 {
@@ -633,7 +633,7 @@ void extractIntegrals(MathArray & ar)
                        continue;
 
                // core ist part from behind the scripts to the 'd'
-               auto_ptr<MathExIntInset> p(new MathExIntInset("int"));
+               auto_ptr<InsetMathExInt> p(new InsetMathExInt("int"));
 
                // handle scripts if available
                if (!testIntSymbol(*it)) {
@@ -699,7 +699,7 @@ bool testSum(MathAtom const & at)
 }
 
 
-// replace '\sum' ['_^'] f(x) sequences by a real MathExIntInset
+// replace '\sum' ['_^'] f(x) sequences by a real InsetMathExInt
 // assume 'extractDelims' ran before
 void extractSums(MathArray & ar)
 {
@@ -716,10 +716,10 @@ void extractSums(MathArray & ar)
                        continue;
 
                // create a proper inset as replacement
-               auto_ptr<MathExIntInset> p(new MathExIntInset("sum"));
+               auto_ptr<InsetMathExInt> p(new InsetMathExInt("sum"));
 
                // collect lower bound and summation index
-               MathScriptInset const * sub = ar[i]->asScriptInset();
+               InsetMathScript const * sub = ar[i]->asScriptInset();
                if (sub && sub->hasDown()) {
                        // try to figure out the summation index from the subscript
                        MathArray const & ar = sub->down();
@@ -762,7 +762,7 @@ bool testDiffItem(MathAtom const & at)
                return true;
 
        // we may have d^n .../d and splitScripts() has not yet seen it
-       MathScriptInset const * sup = at->asScriptInset();
+       InsetMathScript const * sup = at->asScriptInset();
        if (sup && !sup->hasDown() && sup->hasUp() && sup->nuc().size() == 1) {
                MathAtom const & ma = sup->nuc().front();
                return testString(ma, "d") || testSymbol(ma, "partial");
@@ -796,14 +796,14 @@ void extractDiff(MathArray & ar)
                if (!testDiffFrac(*it))
                        continue;
 
-               MathFracInset const * f = (*it)->asFracInset();
+               InsetMathFrac const * f = (*it)->asFracInset();
                if (!f) {
                        lyxerr << "should not happen" << endl;
                        continue;
                }
 
                // create a proper diff inset
-               auto_ptr<MathDiffInset> diff(new MathDiffInset);
+               auto_ptr<InsetMathDiff> diff(new InsetMathDiff);
 
                // collect function, let jt point behind last used item
                MathArray::iterator jt = it + 1;
@@ -836,7 +836,7 @@ void extractDiff(MathArray & ar)
 
                        // point before this
                        MathArray::iterator st = et - 1;
-                       MathScriptInset const * script = (*st)->asScriptInset();
+                       InsetMathScript const * script = (*st)->asScriptInset();
                        if (script && script->hasUp()) {
                                // things like   d.../dx^n
                                int mult = 1;
@@ -872,7 +872,7 @@ bool testRightArrow(MathAtom const & at)
 
 
 
-// replace '\lim_{x->x0} f(x)' sequences by a real MathLimInset
+// replace '\lim_{x->x0} f(x)' sequences by a real InsetMathLim
 // assume 'extractDelims' ran before
 void extractLims(MathArray & ar)
 {
@@ -881,7 +881,7 @@ void extractLims(MathArray & ar)
                MathArray::iterator it = ar.begin() + i;
 
                // must be a script inset with a subscript (without superscript)
-               MathScriptInset const * sub = (*it)->asScriptInset();
+               InsetMathScript const * sub = (*it)->asScriptInset();
                if (!sub || !sub->hasDown() || sub->hasUp() || sub->nuc().size() != 1)
                        continue;
 
@@ -907,7 +907,7 @@ void extractLims(MathArray & ar)
                ar.erase(it + 1, tt);
 
                // create a proper inset as replacement
-               *it = MathAtom(new MathLimInset(f, x, x0));
+               *it = MathAtom(new InsetMathLim(f, x, x0));
        }
        //lyxerr << "\nLimits to: " << ar << endl;
 }
@@ -1280,13 +1280,13 @@ namespace {
                out = out.substr(6);
 
                // parse output as matrix or single number
-               MathAtom at(new MathArrayInset("array", out));
-               MathArrayInset const * mat = at->asArrayInset();
+               MathAtom at(new InsetMathArray("array", out));
+               InsetMathArray const * mat = at->asArrayInset();
                MathArray res;
                if (mat->ncols() == 1 && mat->nrows() == 1)
                        res.append(mat->cell(0));
                else {
-                       res.push_back(MathAtom(new MathDelimInset("(", ")")));
+                       res.push_back(MathAtom(new InsetMathDelim("(", ")")));
                        res.back().nucleus()->cell(0).push_back(at);
                }
                return res;
index 97da7b6b152a360effaa43e918f1c0d9bddfb71f..d8ea93e818ae0901b2435734188605fc634026ee 100644 (file)
@@ -241,7 +241,7 @@ latexkeys const * in_word_set(string const & str)
 }
 
 
-MathAtom createMathInset(string const & s)
+MathAtom createInsetMath(string const & s)
 {
        //lyxerr << "creating inset with name: '" << s << '\'' << endl;
        latexkeys const * l = in_word_set(s);
@@ -251,36 +251,36 @@ MathAtom createMathInset(string const & s)
                if (inset == "ref")
                        return MathAtom(new RefInset(l->name));
                if (inset == "overset")
-                       return MathAtom(new MathOversetInset);
+                       return MathAtom(new InsetMathOverset);
                if (inset == "underset")
-                       return MathAtom(new MathUndersetInset);
+                       return MathAtom(new InsetMathUnderset);
                if (inset == "decoration")
-                       return MathAtom(new MathDecorationInset(l));
+                       return MathAtom(new InsetMathDecoration(l));
                if (inset == "space")
-                       return MathAtom(new MathSpaceInset(l->name));
+                       return MathAtom(new InsetMathSpace(l->name));
                if (inset == "dots")
-                       return MathAtom(new MathDotsInset(l));
+                       return MathAtom(new InsetMathDots(l));
                if (inset == "mbox")
-                       // return MathAtom(new MathMBoxInset);
-                       // MathMBoxInset is proposed to replace MathBoxInset,
+                       // return MathAtom(new InsetMathMBox);
+                       // InsetMathMBox is proposed to replace InsetMathBox,
                        // but is not ready yet (it needs a BufferView for
                        // construction)
-                       return MathAtom(new MathBoxInset(l->name));
+                       return MathAtom(new InsetMathBox(l->name));
 //             if (inset == "fbox")
-//                     return MathAtom(new MathFboxInset(l));
+//                     return MathAtom(new InsetMathFBox(l));
                if (inset == "style")
-                       return MathAtom(new MathSizeInset(l));
+                       return MathAtom(new InsetMathSize(l));
                if (inset == "font")
-                       return MathAtom(new MathFontInset(l));
+                       return MathAtom(new InsetMathFont(l));
                if (inset == "oldfont")
-                       return MathAtom(new MathFontOldInset(l));
+                       return MathAtom(new InsetMathFontOld(l));
                if (inset == "matrix")
-                       return MathAtom(new MathAMSArrayInset(s));
+                       return MathAtom(new InsetMathAMSArray(s));
                if (inset == "big")
-                       // we can't create a MathBigInset, since the argument
+                       // we can't create a InsetMathBig, since the argument
                        // is missing.
-                       return MathAtom(new MathUnknownInset(s));
-               return MathAtom(new MathSymbolInset(l));
+                       return MathAtom(new InsetMathUnknown(s));
+               return MathAtom(new InsetMathSymbol(l));
        }
 
        if (s.size() == 2 && s[0] == '#' && s[1] >= '1' && s[1] <= '9')
@@ -289,65 +289,65 @@ MathAtom createMathInset(string const & s)
                        && s[2] >= '1' && s[2] <= '9')
                return MathAtom(new MathMacroArgument(s[2] - '0'));
        if (s == "boxed")
-               return MathAtom(new MathBoxedInset());
+               return MathAtom(new InsetMathBoxed());
        if (s == "fbox")
-               return MathAtom(new MathFboxInset());
+               return MathAtom(new InsetMathFBox());
        if (s == "framebox")
-               return MathAtom(new MathFrameboxInset);
+               return MathAtom(new InsetMathFrameBox);
        if (s == "makebox")
-               return MathAtom(new MathMakeboxInset);
+               return MathAtom(new InsetMathMakebox);
        if (s == "kern")
-               return MathAtom(new MathKernInset);
+               return MathAtom(new InsetMathKern);
        if (s == "xymatrix")
-               return MathAtom(new MathXYMatrixInset);
+               return MathAtom(new InsetMathXYMatrix);
        if (s == "xrightarrow" || s == "xleftarrow")
-               return MathAtom(new MathXArrowInset(s));
+               return MathAtom(new InsetMathXArrow(s));
        if (s == "split" || s == "gathered" || s == "aligned" || s == "alignedat")
-               return MathAtom(new MathSplitInset(s));
+               return MathAtom(new InsetMathSplit(s));
        if (s == "cases")
-               return MathAtom(new MathCasesInset);
+               return MathAtom(new InsetMathCases);
        if (s == "substack")
-               return MathAtom(new MathSubstackInset);
+               return MathAtom(new InsetMathSubstack);
        if (s == "subarray" || s == "array")
-               return MathAtom(new MathArrayInset(s, 1, 1));
+               return MathAtom(new InsetMathArray(s, 1, 1));
        if (s == "sqrt")
-               return MathAtom(new MathSqrtInset);
+               return MathAtom(new InsetMathSqrt);
        if (s == "root")
-               return MathAtom(new MathRootInset);
+               return MathAtom(new InsetMathRoot);
        if (s == "tabular")
-               return MathAtom(new MathTabularInset(s, 1, 1));
+               return MathAtom(new InsetMathTabular(s, 1, 1));
        if (s == "stackrel")
-               return MathAtom(new MathStackrelInset);
+               return MathAtom(new InsetMathStackrel);
        if (s == "binom" || s == "choose")
-               return MathAtom(new MathBinomInset(s == "choose"));
+               return MathAtom(new InsetMathBinom(s == "choose"));
        if (s == "frac")
-               return MathAtom(new MathFracInset);
+               return MathAtom(new InsetMathFrac);
        if (s == "over")
-               return MathAtom(new MathFracInset(MathFracInset::OVER));
+               return MathAtom(new InsetMathFrac(InsetMathFrac::OVER));
        if (s == "nicefrac")
-               return MathAtom(new MathFracInset(MathFracInset::NICEFRAC));
+               return MathAtom(new InsetMathFrac(InsetMathFrac::NICEFRAC));
        //if (s == "infer")
        //      return MathAtom(new MathInferInset);
        if (s == "atop")
-               return MathAtom(new MathFracInset(MathFracInset::ATOP));
+               return MathAtom(new InsetMathFrac(InsetMathFrac::ATOP));
        if (s == "lefteqn")
-               return MathAtom(new MathLefteqnInset);
+               return MathAtom(new InsetMathLefteqn);
        if (s == "boldsymbol")
-               return MathAtom(new MathBoldsymbolInset);
+               return MathAtom(new InsetMathBoldSymbol);
        if (s == "color" || s == "normalcolor")
-               return MathAtom(new MathColorInset(true));
+               return MathAtom(new InsetMathColor(true));
        if (s == "textcolor")
-               return MathAtom(new MathColorInset(false));
+               return MathAtom(new InsetMathColor(false));
        if (s == "dfrac")
-               return MathAtom(new MathDfracInset);
+               return MathAtom(new InsetMathDFrac);
        if (s == "tfrac")
-               return MathAtom(new MathTfracInset);
+               return MathAtom(new InsetMathTFrac);
        if (s == "hphantom")
-               return MathAtom(new MathPhantomInset(MathPhantomInset::hphantom));
+               return MathAtom(new InsetMathPhantom(InsetMathPhantom::hphantom));
        if (s == "phantom")
-               return MathAtom(new MathPhantomInset(MathPhantomInset::phantom));
+               return MathAtom(new InsetMathPhantom(InsetMathPhantom::phantom));
        if (s == "vphantom")
-               return MathAtom(new MathPhantomInset(MathPhantomInset::vphantom));
+               return MathAtom(new InsetMathPhantom(InsetMathPhantom::vphantom));
 
        if (MacroTable::globalMacros().has(s))
                return MathAtom(new MathMacro(s,
@@ -357,11 +357,11 @@ MathAtom createMathInset(string const & s)
        //              MacroTable::localMacros().get(s).numargs()));
 
        //lyxerr << "creating unknown inset '" << s << "'" << endl;
-       return MathAtom(new MathUnknownInset(s));
+       return MathAtom(new InsetMathUnknown(s));
 }
 
 
-bool createMathInset_fromDialogStr(string const & str, MathArray & ar)
+bool createInsetMath_fromDialogStr(string const & str, MathArray & ar)
 {
        // An example str:
        // "ref LatexCommand \\ref{sec:Title}\n\\end_inset\n\n";
index e5aac336b02166743fb7ad999419cd5a4f0852a1..20fd5c9ad9a96b7a35155f25c18dea38205da4be 100644 (file)
@@ -18,12 +18,12 @@ class MathAtom;
 class MathArray;
 
 
-MathAtom createMathInset(std::string const &);
+MathAtom createInsetMath(std::string const &);
 
 /** Fills ar with the contents of str.
  *  str is created by the frontend dialog's and returned to the LyX core.
  *  The function returns true if successful.
  */
-bool createMathInset_fromDialogStr(std::string const &, MathArray &);
+bool createInsetMath_fromDialogStr(std::string const &, MathArray &);
 
 #endif
index 6fbbb38c8b5d0d185578b011f87a2fbed30ad083..d6c16e14f7fc908f87cfc57cf4d762a4db9d01e8 100644 (file)
 using std::auto_ptr;
 
 
-MathFboxInset::MathFboxInset()
-       : MathNestInset(1)
+InsetMathFBox::InsetMathFBox()
+       : InsetMathNest(1)
 {}
 
 
-auto_ptr<InsetBase> MathFboxInset::doClone() const
+auto_ptr<InsetBase> InsetMathFBox::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathFboxInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathFBox(*this));
 }
 
 
-MathInset::mode_type MathFboxInset::currentMode() const
+InsetMath::mode_type InsetMathFBox::currentMode() const
 {
        return TEXT_MODE;
 }
 
 
-void MathFboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathFBox::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
        cell(0).metrics(mi, dim);
@@ -49,7 +49,7 @@ void MathFboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathFboxInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathFBox::draw(PainterInfo & pi, int x, int y) const
 {
        pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
                dim_.width() - 2, dim_.height() - 2, LColor::foreground);
@@ -59,19 +59,19 @@ void MathFboxInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathFboxInset::write(WriteStream & os) const
+void InsetMathFBox::write(WriteStream & os) const
 {
        os << "\\fbox{" << cell(0) << '}';
 }
 
 
-void MathFboxInset::normalize(NormalStream & os) const
+void InsetMathFBox::normalize(NormalStream & os) const
 {
        os << "[fbox " << cell(0) << ']';
 }
 
 
-void MathFboxInset::infoize(std::ostream & os) const
+void InsetMathFBox::infoize(std::ostream & os) const
 {
        os << "FBox: ";
 }
index 405a7c5b2782c6abc02829f6b3a742b539ed212c..2865ae31623583f2654c6d261ce1f8572ac2f309 100644 (file)
 
 
 /// Non-AMS-style frame
-class MathFboxInset : public MathNestInset {
+class InsetMathFBox : public InsetMathNest {
 public:
        ///
-       MathFboxInset();
+       InsetMathFBox();
        ///
        mode_type currentMode() const;
        ///
index ae35161d5e8dc3eac1199223d7dbc25a51d6ea94..f7980368df11e42edb46f20ff888e2294f632fb3 100644 (file)
@@ -21,18 +21,18 @@ using std::string;
 using std::auto_ptr;
 
 
-MathFontInset::MathFontInset(latexkeys const * key)
-       : MathNestInset(1), key_(key)
+InsetMathFont::InsetMathFont(latexkeys const * key)
+       : InsetMathNest(1), key_(key)
 {}
 
 
-auto_ptr<InsetBase> MathFontInset::doClone() const
+auto_ptr<InsetBase> InsetMathFont::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathFontInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathFont(*this));
 }
 
 
-MathInset::mode_type MathFontInset::currentMode() const
+InsetMath::mode_type InsetMathFont::currentMode() const
 {
        if (key_->extra == "mathmode")
                return MATH_MODE;
@@ -42,7 +42,7 @@ MathInset::mode_type MathFontInset::currentMode() const
 }
 
 
-void MathFontInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathFont::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, key_->name.c_str());
        cell(0).metrics(mi, dim);
@@ -51,7 +51,7 @@ void MathFontInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathFontInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathFont::draw(PainterInfo & pi, int x, int y) const
 {
        FontSetChanger dummy(pi.base, key_->name.c_str());
        cell(0).draw(pi, x + 1, y);
@@ -60,27 +60,27 @@ void MathFontInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathFontInset::metricsT(TextMetricsInfo const & mi, Dimension &) const
+void InsetMathFont::metricsT(TextMetricsInfo const & mi, Dimension &) const
 {
        cell(0).metricsT(mi, dim_);
 }
 
 
-void MathFontInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathFont::drawT(TextPainter & pain, int x, int y) const
 {
        cell(0).drawT(pain, x, y);
 }
 
 
-string MathFontInset::name() const
+string InsetMathFont::name() const
 {
        return key_->name;
 }
 
 
-void MathFontInset::validate(LaTeXFeatures & features) const
+void InsetMathFont::validate(LaTeXFeatures & features) const
 {
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
        // Make sure amssymb is put in preamble if Blackboard Bold or
        // Fraktur used:
        if (key_->name == "mathfrak" || key_->name == "mathbb")
@@ -92,7 +92,7 @@ void MathFontInset::validate(LaTeXFeatures & features) const
 }
 
 
-void MathFontInset::infoize(std::ostream & os) const
+void InsetMathFont::infoize(std::ostream & os) const
 {
        os << "Font: " << key_->name;
 }
index efe6ce2033b032db71660a79ffd2f48c80dfb3c8..6e6b567dc65a6b53cd08c04174f5ff97d5062a57 100644 (file)
 class latexkeys;
 
 /// Inset for font changes
-class MathFontInset : public MathNestInset {
+class InsetMathFont : public InsetMathNest {
 public:
        ///
-       explicit MathFontInset(latexkeys const * key);
+       explicit InsetMathFont(latexkeys const * key);
        ///
-       MathFontInset * asFontInset() { return this; }
+       InsetMathFont * asFontInset() { return this; }
        ///
-       MathFontInset const * asFontInset() const { return this; }
+       InsetMathFont const * asFontInset() const { return this; }
        /// are we in math mode, text mode, or unsure?
        mode_type currentMode() const;
        ///
index e339c27ac3a2c668cb0441cfd3447eb3abc82809..54c183fc465824e3a96496aa79259c069a528f4b 100644 (file)
 using std::auto_ptr;
 
 
-MathFontOldInset::MathFontOldInset(latexkeys const * key)
-       : MathNestInset(1), key_(key)
+InsetMathFontOld::InsetMathFontOld(latexkeys const * key)
+       : InsetMathNest(1), key_(key)
 {
        //lock(true);
 }
 
 
-auto_ptr<InsetBase> MathFontOldInset::doClone() const
+auto_ptr<InsetBase> InsetMathFontOld::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathFontOldInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathFontOld(*this));
 }
 
 
-void MathFontOldInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathFontOld::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, key_->name.c_str());
        cell(0).metrics(mi, dim);
@@ -42,7 +42,7 @@ void MathFontOldInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathFontOldInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathFontOld::draw(PainterInfo & pi, int x, int y) const
 {
        FontSetChanger dummy(pi.base, key_->name.c_str());
        cell(0).draw(pi, x + 1, y);
@@ -50,31 +50,31 @@ void MathFontOldInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathFontOldInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
+void InsetMathFontOld::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 {
        cell(0).metricsT(mi, dim);
 }
 
 
-void MathFontOldInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathFontOld::drawT(TextPainter & pain, int x, int y) const
 {
        cell(0).drawT(pain, x, y);
 }
 
 
-void MathFontOldInset::write(WriteStream & os) const
+void InsetMathFontOld::write(WriteStream & os) const
 {
        os << "{\\" << key_->name << ' ' << cell(0) << '}';
 }
 
 
-void MathFontOldInset::normalize(NormalStream & os) const
+void InsetMathFontOld::normalize(NormalStream & os) const
 {
        os << "[font " << key_->name << ' ' << cell(0) << ']';
 }
 
 
-void MathFontOldInset::infoize(std::ostream & os) const
+void InsetMathFontOld::infoize(std::ostream & os) const
 {
        os << "Font: " << key_->name;
 }
index 0db0702c1ecca171d0caeb8e4dcd38c9ca575ecd..b29c3190f6ea9071becb2947eda9c6ee5509cd2a 100644 (file)
 class latexkeys;
 
 /// Old-style font changes
-class MathFontOldInset : public MathNestInset {
+class InsetMathFontOld : public InsetMathNest {
 public:
        ///
-       explicit MathFontOldInset(latexkeys const * key);
+       explicit InsetMathFontOld(latexkeys const * key);
        /// we are in text mode.
        mode_type currentMode() const { return TEXT_MODE; }
        /// we write extra braces in any case...
index f55f7fe8d402f212a06fe5c3b0b664607ea7b744..555657cc37b6c53781edfcccb41b8db8681706c9 100644 (file)
 #include "cursor.h"
 
 
-MathFracbaseInset::MathFracbaseInset()
-       : MathNestInset(2)
+InsetMathFracBase::InsetMathFracBase()
+       : InsetMathNest(2)
 {}
 
 
-bool MathFracbaseInset::idxRight(LCursor &) const
+bool InsetMathFracBase::idxRight(LCursor &) const
 {
        return false;
 }
 
 
-bool MathFracbaseInset::idxLeft(LCursor &) const
+bool InsetMathFracBase::idxLeft(LCursor &) const
 {
        return false;
 }
 
 
-bool MathFracbaseInset::idxUpDown(LCursor & cur, bool up) const
+bool InsetMathFracBase::idxUpDown(LCursor & cur, bool up) const
 {
-       MathInset::idx_type target = !up; // up ? 0 : 1, since upper cell has idx 0
+       InsetMath::idx_type target = !up; // up ? 0 : 1, since upper cell has idx 0
        if (cur.idx() == target)
                return false;
        cur.idx() = target;
index 5339db82711a8b6c187f039bcf731845fadfe961..8a200b5a979ba244a52441082d0d594255c01b8b 100644 (file)
 #include "math_nestinset.h"
 
 
-class MathFracbaseInset : public MathNestInset {
+class InsetMathFracBase : public InsetMathNest {
 public:
        ///
-       MathFracbaseInset();
+       InsetMathFracBase();
        ///
        bool idxUpDown(LCursor &, bool up) const;
        ///
index e709d190d721d7f9688c262e9807395139d94788..e13e114a87285d18ddc88fc42c8e80280a09e99e 100644 (file)
@@ -25,30 +25,30 @@ using std::max;
 using std::auto_ptr;
 
 
-MathFracInset::MathFracInset(Kind kind)
+InsetMathFrac::InsetMathFrac(Kind kind)
        : kind_(kind)
 {}
 
 
-auto_ptr<InsetBase> MathFracInset::doClone() const
+auto_ptr<InsetBase> InsetMathFrac::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathFracInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathFrac(*this));
 }
 
 
-MathFracInset * MathFracInset::asFracInset()
+InsetMathFrac * InsetMathFrac::asFracInset()
 {
        return kind_ == ATOP ? 0 : this;
 }
 
 
-MathFracInset const * MathFracInset::asFracInset() const
+InsetMathFrac const * InsetMathFrac::asFracInset() const
 {
        return kind_ == ATOP ? 0 : this;
 }
 
 
-void MathFracInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FracChanger dummy(mi.base);
        cell(0).metrics(mi);
@@ -67,7 +67,7 @@ void MathFracInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathFracInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathFrac::draw(PainterInfo & pi, int x, int y) const
 {
        setPosCache(pi, x, y);
        int m = x + dim_.wid / 2;
@@ -94,7 +94,7 @@ void MathFracInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathFracInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
+void InsetMathFrac::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 {
        cell(0).metricsT(mi, dim);
        cell(1).metricsT(mi, dim);
@@ -105,7 +105,7 @@ void MathFracInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 }
 
 
-void MathFracInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathFrac::drawT(TextPainter & pain, int x, int y) const
 {
        int m = x + dim_.width() / 2;
        cell(0).drawT(pain, m - cell(0).width() / 2, y - cell(0).descent() - 1);
@@ -116,7 +116,7 @@ void MathFracInset::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void MathFracInset::write(WriteStream & os) const
+void InsetMathFrac::write(WriteStream & os) const
 {
        switch (kind_) {
        case ATOP:
@@ -128,13 +128,13 @@ void MathFracInset::write(WriteStream & os) const
                break;
        case FRAC:
        case NICEFRAC:
-               MathNestInset::write(os);
+               InsetMathNest::write(os);
                break;
        }
 }
 
 
-string MathFracInset::name() const
+string InsetMathFrac::name() const
 {
        switch (kind_) {
        case FRAC:
@@ -151,40 +151,40 @@ string MathFracInset::name() const
 }
 
 
-bool MathFracInset::extraBraces() const
+bool InsetMathFrac::extraBraces() const
 {
        return kind_ == ATOP || kind_ == OVER;
 }
 
 
-void MathFracInset::maple(MapleStream & os) const
+void InsetMathFrac::maple(MapleStream & os) const
 {
        os << '(' << cell(0) << ")/(" << cell(1) << ')';
 }
 
 
-void MathFracInset::mathematica(MathematicaStream & os) const
+void InsetMathFrac::mathematica(MathematicaStream & os) const
 {
        os << '(' << cell(0) << ")/(" << cell(1) << ')';
 }
 
 
-void MathFracInset::octave(OctaveStream & os) const
+void InsetMathFrac::octave(OctaveStream & os) const
 {
        os << '(' << cell(0) << ")/(" << cell(1) << ')';
 }
 
 
-void MathFracInset::mathmlize(MathMLStream & os) const
+void InsetMathFrac::mathmlize(MathMLStream & os) const
 {
        os << MTag("mfrac") << cell(0) << cell(1) << ETag("mfrac");
 }
 
 
-void MathFracInset::validate(LaTeXFeatures & features) const
+void InsetMathFrac::validate(LaTeXFeatures & features) const
 {
        if (kind_ == NICEFRAC)
                features.require("nicefrac");
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
 }
 
index 53abf281849b4b8597fad3f03d30bf1aa6f7cece..c46d726aca9e287cacf91276233beb1fb5068ac1 100644 (file)
@@ -17,7 +17,7 @@
 
 
 /// Fraction like objects (frac, binom)
-class MathFracInset : public MathFracbaseInset {
+class InsetMathFrac : public InsetMathFracBase {
 public:
        ///
        enum Kind {
@@ -28,7 +28,7 @@ public:
        };
 
        ///
-       explicit MathFracInset(Kind kind = FRAC);
+       explicit InsetMathFrac(Kind kind = FRAC);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
@@ -38,9 +38,9 @@ public:
        ///
        void drawT(TextPainter &, int x, int y) const;
        /// identifies FracInsets
-       MathFracInset * asFracInset();
+       InsetMathFrac * asFracInset();
        /// identifies FracInsets
-       MathFracInset const * asFracInset() const;
+       InsetMathFrac const * asFracInset() const;
        ///
        std::string name() const;
        ///
index bb6badd6bb7590b1404052c1f5fa8de8f591ccd3..4414ba8170b0386db93cd23daeeaddf991dd996b 100644 (file)
 using std::auto_ptr;
 
 
-MathFrameboxInset::MathFrameboxInset()
-       : MathNestInset(3)
+InsetMathFrameBox::InsetMathFrameBox()
+       : InsetMathNest(3)
 {}
 
 
-auto_ptr<InsetBase> MathFrameboxInset::doClone() const
+auto_ptr<InsetBase> InsetMathFrameBox::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathFrameboxInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathFrameBox(*this));
 }
 
 
-void MathFrameboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathFrameBox::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
        w_ = mathed_char_width(mi.base.font, '[');
-       MathNestInset::metrics(mi);
+       InsetMathNest::metrics(mi);
        dim  = cell(0).dim();
        dim += cell(1).dim();
        dim += cell(2).dim();
@@ -44,7 +44,7 @@ void MathFrameboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathFrameboxInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathFrameBox::draw(PainterInfo & pi, int x, int y) const
 {
        FontSetChanger dummy(pi.base, "textnormal");
        pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
@@ -70,7 +70,7 @@ void MathFrameboxInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathFrameboxInset::write(WriteStream & os) const
+void InsetMathFrameBox::write(WriteStream & os) const
 {
        os << "\\framebox";
        os << '[' << cell(0) << ']';
@@ -80,7 +80,7 @@ void MathFrameboxInset::write(WriteStream & os) const
 }
 
 
-void MathFrameboxInset::normalize(NormalStream & os) const
+void InsetMathFrameBox::normalize(NormalStream & os) const
 {
        os << "[framebox " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
 }
index 7c7ea77b00d7f9356cf0a2c491d79ff56f1774e4..513ee60a0df9e29d0d0f60ea6defabfc915d21a7 100644 (file)
 
 
 /// Extra nesting
-class MathFrameboxInset : public MathNestInset {
+class InsetMathFrameBox : public InsetMathNest {
 public:
        ///
-       MathFrameboxInset();
+       InsetMathFrameBox();
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index c4dbf502de35b7565125121a468e6ada3e9e2114..08a9517ee184693d801ad8e0cb87d11bc673551f 100644 (file)
@@ -50,7 +50,7 @@ using std::vector;
 
 class GridInsetMailer : public MailInset {
 public:
-       GridInsetMailer(MathGridInset & inset) : inset_(inset) {}
+       GridInsetMailer(InsetMathGrid & inset) : inset_(inset) {}
        ///
        virtual string const & name() const
        {
@@ -70,11 +70,11 @@ public:
 
 protected:
        InsetBase & inset() const { return inset_; }
-       MathGridInset & inset_;
+       InsetMathGrid & inset_;
 };
 
 
-void mathed_parse_normal(MathGridInset &, string const & argument);
+void mathed_parse_normal(InsetMathGrid &, string const & argument);
 
 namespace {
 
@@ -102,7 +102,7 @@ int extractInt(istream & is)
 //////////////////////////////////////////////////////////////
 
 
-MathGridInset::CellInfo::CellInfo()
+InsetMathGrid::CellInfo::CellInfo()
        : dummy_(false)
 {}
 
@@ -112,13 +112,13 @@ MathGridInset::CellInfo::CellInfo()
 //////////////////////////////////////////////////////////////
 
 
-MathGridInset::RowInfo::RowInfo()
+InsetMathGrid::RowInfo::RowInfo()
        : lines_(0), skip_(0)
 {}
 
 
 
-int MathGridInset::RowInfo::skipPixels() const
+int InsetMathGrid::RowInfo::skipPixels() const
 {
        return crskip_.inBP();
 }
@@ -128,7 +128,7 @@ int MathGridInset::RowInfo::skipPixels() const
 //////////////////////////////////////////////////////////////
 
 
-MathGridInset::ColInfo::ColInfo()
+InsetMathGrid::ColInfo::ColInfo()
        : align_('c'), lines_(0)
 {}
 
@@ -136,8 +136,8 @@ MathGridInset::ColInfo::ColInfo()
 //////////////////////////////////////////////////////////////
 
 
-MathGridInset::MathGridInset(char v, string const & h)
-       : MathNestInset(guessColumns(h)),
+InsetMathGrid::InsetMathGrid(char v, string const & h)
+       : InsetMathNest(guessColumns(h)),
          rowinfo_(2),
          colinfo_(guessColumns(h) + 1),
          cellinfo_(1 * guessColumns(h))
@@ -149,8 +149,8 @@ MathGridInset::MathGridInset(char v, string const & h)
 }
 
 
-MathGridInset::MathGridInset()
-       : MathNestInset(1),
+InsetMathGrid::InsetMathGrid()
+       : InsetMathNest(1),
          rowinfo_(1 + 1),
                colinfo_(1 + 1),
                cellinfo_(1),
@@ -160,8 +160,8 @@ MathGridInset::MathGridInset()
 }
 
 
-MathGridInset::MathGridInset(col_type m, row_type n)
-       : MathNestInset(m * n),
+InsetMathGrid::InsetMathGrid(col_type m, row_type n)
+       : InsetMathNest(m * n),
          rowinfo_(n + 1),
                colinfo_(m + 1),
                cellinfo_(m * n),
@@ -171,8 +171,8 @@ MathGridInset::MathGridInset(col_type m, row_type n)
 }
 
 
-MathGridInset::MathGridInset(col_type m, row_type n, char v, string const & h)
-       : MathNestInset(m * n),
+InsetMathGrid::InsetMathGrid(col_type m, row_type n, char v, string const & h)
+       : InsetMathNest(m * n),
          rowinfo_(n + 1),
          colinfo_(m + 1),
                cellinfo_(m * n),
@@ -184,26 +184,26 @@ MathGridInset::MathGridInset(col_type m, row_type n, char v, string const & h)
 }
 
 
-MathGridInset::~MathGridInset()
+InsetMathGrid::~InsetMathGrid()
 {
        GridInsetMailer mailer(*this);
        mailer.hideDialog();
 }
 
 
-auto_ptr<InsetBase> MathGridInset::doClone() const
+auto_ptr<InsetBase> InsetMathGrid::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathGridInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathGrid(*this));
 }
 
 
-MathInset::idx_type MathGridInset::index(row_type row, col_type col) const
+InsetMath::idx_type InsetMathGrid::index(row_type row, col_type col) const
 {
        return col + ncols() * row;
 }
 
 
-void MathGridInset::setDefaults()
+void InsetMathGrid::setDefaults()
 {
        if (ncols() <= 0)
                lyxerr << "positive number of columns expected" << endl;
@@ -216,7 +216,7 @@ void MathGridInset::setDefaults()
 }
 
 
-void MathGridInset::halign(string const & hh)
+void InsetMathGrid::halign(string const & hh)
 {
        col_type col = 0;
        for (string::const_iterator it = hh.begin(); it != hh.end(); ++it) {
@@ -245,7 +245,7 @@ void MathGridInset::halign(string const & hh)
 }
 
 
-MathGridInset::col_type MathGridInset::guessColumns(string const & hh) const
+InsetMathGrid::col_type InsetMathGrid::guessColumns(string const & hh) const
 {
        col_type col = 0;
        for (string::const_iterator it = hh.begin(); it != hh.end(); ++it)
@@ -259,19 +259,19 @@ MathGridInset::col_type MathGridInset::guessColumns(string const & hh) const
 }
 
 
-void MathGridInset::halign(char h, col_type col)
+void InsetMathGrid::halign(char h, col_type col)
 {
        colinfo_[col].align_ = h;
 }
 
 
-char MathGridInset::halign(col_type col) const
+char InsetMathGrid::halign(col_type col) const
 {
        return colinfo_[col].align_;
 }
 
 
-string MathGridInset::halign() const
+string InsetMathGrid::halign() const
 {
        string res;
        for (col_type col = 0; col < ncols(); ++col) {
@@ -282,58 +282,58 @@ string MathGridInset::halign() const
 }
 
 
-void MathGridInset::valign(char c)
+void InsetMathGrid::valign(char c)
 {
        v_align_ = c;
 }
 
 
-char MathGridInset::valign() const
+char InsetMathGrid::valign() const
 {
        return v_align_;
 }
 
 
-MathGridInset::col_type MathGridInset::ncols() const
+InsetMathGrid::col_type InsetMathGrid::ncols() const
 {
        return colinfo_.size() - 1;
 }
 
 
-MathGridInset::row_type MathGridInset::nrows() const
+InsetMathGrid::row_type InsetMathGrid::nrows() const
 {
        return rowinfo_.size() - 1;
 }
 
 
-MathGridInset::col_type MathGridInset::col(idx_type idx) const
+InsetMathGrid::col_type InsetMathGrid::col(idx_type idx) const
 {
        return idx % ncols();
 }
 
 
-MathGridInset::row_type MathGridInset::row(idx_type idx) const
+InsetMathGrid::row_type InsetMathGrid::row(idx_type idx) const
 {
        return idx / ncols();
 }
 
 
-void MathGridInset::vcrskip(LyXLength const & crskip, row_type row)
+void InsetMathGrid::vcrskip(LyXLength const & crskip, row_type row)
 {
        rowinfo_[row].crskip_ = crskip;
 }
 
 
-LyXLength MathGridInset::vcrskip(row_type row) const
+LyXLength InsetMathGrid::vcrskip(row_type row) const
 {
        return rowinfo_[row].crskip_;
 }
 
 
-void MathGridInset::metrics(MetricsInfo & mi) const
+void InsetMathGrid::metrics(MetricsInfo & mi) const
 {
        // let the cells adjust themselves
-       MathNestInset::metrics(mi);
+       InsetMathNest::metrics(mi);
 
        // compute absolute sizes of vertical structure
        for (row_type row = 0; row < nrows(); ++row) {
@@ -470,19 +470,19 @@ void MathGridInset::metrics(MetricsInfo & mi) const
 }
 
 
-void MathGridInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathGrid::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        metrics(mi);
        dim = dim_;
 }
 
 
-void MathGridInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathGrid::draw(PainterInfo & pi, int x, int y) const
 {
        drawWithMargin(pi, x, y, 0, 0);
 }
 
-void MathGridInset::drawWithMargin(PainterInfo & pi, int x, int y,
+void InsetMathGrid::drawWithMargin(PainterInfo & pi, int x, int y,
        int lmargin, int rmargin) const
 {
        for (idx_type idx = 0; idx < nargs(); ++idx)
@@ -510,10 +510,10 @@ void MathGridInset::drawWithMargin(PainterInfo & pi, int x, int y,
 }
 
 
-void MathGridInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
+void InsetMathGrid::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 {
        // let the cells adjust themselves
-       //MathNestInset::metrics(mi);
+       //InsetMathNest::metrics(mi);
        for (idx_type i = 0; i < nargs(); ++i)
                cell(i).metricsT(mi, dim);
 
@@ -599,14 +599,14 @@ void MathGridInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 }
 
 
-void MathGridInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathGrid::drawT(TextPainter & pain, int x, int y) const
 {
        for (idx_type idx = 0; idx < nargs(); ++idx)
                cell(idx).drawT(pain, x + cellXOffset(idx), y + cellYOffset(idx));
 }
 
 
-string MathGridInset::eolString(row_type row, bool emptyline, bool fragile) const
+string InsetMathGrid::eolString(row_type row, bool emptyline, bool fragile) const
 {
        string eol;
 
@@ -629,7 +629,7 @@ string MathGridInset::eolString(row_type row, bool emptyline, bool fragile) cons
 }
 
 
-string MathGridInset::eocString(col_type col, col_type lastcol) const
+string InsetMathGrid::eocString(col_type col, col_type lastcol) const
 {
        if (col + 1 == lastcol)
                return string();
@@ -637,7 +637,7 @@ string MathGridInset::eocString(col_type col, col_type lastcol) const
 }
 
 
-void MathGridInset::addRow(row_type row)
+void InsetMathGrid::addRow(row_type row)
 {
        rowinfo_.insert(rowinfo_.begin() + row + 1, RowInfo());
        cells_.insert
@@ -647,7 +647,7 @@ void MathGridInset::addRow(row_type row)
 }
 
 
-void MathGridInset::appendRow()
+void InsetMathGrid::appendRow()
 {
        rowinfo_.push_back(RowInfo());
        //cells_.insert(cells_.end(), ncols(), MathArray());
@@ -658,7 +658,7 @@ void MathGridInset::appendRow()
 }
 
 
-void MathGridInset::delRow(row_type row)
+void InsetMathGrid::delRow(row_type row)
 {
        if (nrows() == 1)
                return;
@@ -673,7 +673,7 @@ void MathGridInset::delRow(row_type row)
 }
 
 
-void MathGridInset::copyRow(row_type row)
+void InsetMathGrid::copyRow(row_type row)
 {
        addRow(row);
        for (col_type col = 0; col < ncols(); ++col)
@@ -681,7 +681,7 @@ void MathGridInset::copyRow(row_type row)
 }
 
 
-void MathGridInset::swapRow(row_type row)
+void InsetMathGrid::swapRow(row_type row)
 {
        if (nrows() == 1)
                return;
@@ -692,7 +692,7 @@ void MathGridInset::swapRow(row_type row)
 }
 
 
-void MathGridInset::addCol(col_type newcol)
+void InsetMathGrid::addCol(col_type newcol)
 {
        const col_type nc = ncols();
        const row_type nr = nrows();
@@ -716,7 +716,7 @@ void MathGridInset::addCol(col_type newcol)
 }
 
 
-void MathGridInset::delCol(col_type col)
+void InsetMathGrid::delCol(col_type col)
 {
        if (ncols() == 1)
                return;
@@ -735,7 +735,7 @@ void MathGridInset::delCol(col_type col)
 }
 
 
-void MathGridInset::copyCol(col_type col)
+void InsetMathGrid::copyCol(col_type col)
 {
        addCol(col);
        for (row_type row = 0; row < nrows(); ++row)
@@ -743,7 +743,7 @@ void MathGridInset::copyCol(col_type col)
 }
 
 
-void MathGridInset::swapCol(col_type col)
+void InsetMathGrid::swapCol(col_type col)
 {
        if (ncols() == 1)
                return;
@@ -754,7 +754,7 @@ void MathGridInset::swapCol(col_type col)
 }
 
 
-int MathGridInset::cellXOffset(idx_type idx) const
+int InsetMathGrid::cellXOffset(idx_type idx) const
 {
        col_type c = col(idx);
        int x = colinfo_[c].offset_;
@@ -767,13 +767,13 @@ int MathGridInset::cellXOffset(idx_type idx) const
 }
 
 
-int MathGridInset::cellYOffset(idx_type idx) const
+int InsetMathGrid::cellYOffset(idx_type idx) const
 {
        return rowinfo_[row(idx)].offset_;
 }
 
 
-bool MathGridInset::idxUpDown(LCursor & cur, bool up) const
+bool InsetMathGrid::idxUpDown(LCursor & cur, bool up) const
 {
        if (up) {
                if (cur.row() == 0)
@@ -789,7 +789,7 @@ bool MathGridInset::idxUpDown(LCursor & cur, bool up) const
 }
 
 
-bool MathGridInset::idxLeft(LCursor & cur) const
+bool InsetMathGrid::idxLeft(LCursor & cur) const
 {
        // leave matrix if on the left hand edge
        if (cur.col() == 0)
@@ -800,7 +800,7 @@ bool MathGridInset::idxLeft(LCursor & cur) const
 }
 
 
-bool MathGridInset::idxRight(LCursor & cur) const
+bool InsetMathGrid::idxRight(LCursor & cur) const
 {
        // leave matrix if on the right hand edge
        if (cur.col() + 1 == ncols())
@@ -811,7 +811,7 @@ bool MathGridInset::idxRight(LCursor & cur) const
 }
 
 
-bool MathGridInset::idxFirst(LCursor & cur) const
+bool InsetMathGrid::idxFirst(LCursor & cur) const
 {
        switch (v_align_) {
                case 't':
@@ -828,7 +828,7 @@ bool MathGridInset::idxFirst(LCursor & cur) const
 }
 
 
-bool MathGridInset::idxLast(LCursor & cur) const
+bool InsetMathGrid::idxLast(LCursor & cur) const
 {
        switch (v_align_) {
                case 't':
@@ -845,7 +845,7 @@ bool MathGridInset::idxLast(LCursor & cur) const
 }
 
 
-bool MathGridInset::idxDelete(idx_type & idx)
+bool InsetMathGrid::idxDelete(idx_type & idx)
 {
        // nothing to do if we have just one row
        if (nrows() == 1)
@@ -880,7 +880,7 @@ bool MathGridInset::idxDelete(idx_type & idx)
 
 // reimplement old behaviour when pressing Delete in the last position
 // of a cell
-void MathGridInset::idxGlue(idx_type idx)
+void InsetMathGrid::idxGlue(idx_type idx)
 {
        col_type c = col(idx);
        if (c + 1 == ncols()) {
@@ -898,19 +898,19 @@ void MathGridInset::idxGlue(idx_type idx)
 }
 
 
-MathGridInset::RowInfo const & MathGridInset::rowinfo(row_type row) const
+InsetMathGrid::RowInfo const & InsetMathGrid::rowinfo(row_type row) const
 {
        return rowinfo_[row];
 }
 
 
-MathGridInset::RowInfo & MathGridInset::rowinfo(row_type row)
+InsetMathGrid::RowInfo & InsetMathGrid::rowinfo(row_type row)
 {
        return rowinfo_[row];
 }
 
 
-bool MathGridInset::idxBetween(idx_type idx, idx_type from, idx_type to) const
+bool InsetMathGrid::idxBetween(idx_type idx, idx_type from, idx_type to) const
 {
        row_type const ri = row(idx);
        row_type const r1 = min(row(from), row(to));
@@ -923,7 +923,7 @@ bool MathGridInset::idxBetween(idx_type idx, idx_type from, idx_type to) const
 
 
 
-void MathGridInset::normalize(NormalStream & os) const
+void InsetMathGrid::normalize(NormalStream & os) const
 {
        os << "[grid ";
        for (row_type row = 0; row < nrows(); ++row) {
@@ -936,7 +936,7 @@ void MathGridInset::normalize(NormalStream & os) const
 }
 
 
-void MathGridInset::mathmlize(MathMLStream & os) const
+void InsetMathGrid::mathmlize(MathMLStream & os) const
 {
        os << MTag("mtable");
        for (row_type row = 0; row < nrows(); ++row) {
@@ -949,7 +949,7 @@ void MathGridInset::mathmlize(MathMLStream & os) const
 }
 
 
-void MathGridInset::write(WriteStream & os) const
+void InsetMathGrid::write(WriteStream & os) const
 {
        string eol;
        for (row_type row = 0; row < nrows(); ++row) {
@@ -983,37 +983,37 @@ void MathGridInset::write(WriteStream & os) const
 }
 
 
-int MathGridInset::colsep() const
+int InsetMathGrid::colsep() const
 {
        return 6;
 }
 
 
-int MathGridInset::rowsep() const
+int InsetMathGrid::rowsep() const
 {
        return 6;
 }
 
 
-int MathGridInset::hlinesep() const
+int InsetMathGrid::hlinesep() const
 {
        return 3;
 }
 
 
-int MathGridInset::vlinesep() const
+int InsetMathGrid::vlinesep() const
 {
        return 3;
 }
 
 
-int MathGridInset::border() const
+int InsetMathGrid::border() const
 {
        return 1;
 }
 
 
-void MathGridInset::splitCell(LCursor & cur)
+void InsetMathGrid::splitCell(LCursor & cur)
 {
        if (cur.idx() == cur.lastidx())
                return;
@@ -1026,9 +1026,9 @@ void MathGridInset::splitCell(LCursor & cur)
 }
 
 
-void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
+void InsetMathGrid::doDispatch(LCursor & cur, FuncRequest & cmd)
 {
-       //lyxerr << "*** MathGridInset: request: " << cmd << endl;
+       //lyxerr << "*** InsetMathGrid: request: " << cmd << endl;
        switch (cmd.action) {
 
        case LFUN_MOUSE_RELEASE:
@@ -1036,7 +1036,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                //      GridInsetMailer(*this).showDialog();
                //      return DispatchResult(true, true);
                //}
-               MathNestInset::doDispatch(cur, cmd);
+               InsetMathNest::doDispatch(cur, cmd);
                break;
 
        case LFUN_INSET_DIALOG_UPDATE:
@@ -1209,7 +1209,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                istringstream is(lyx::to_utf8(cmd.argument()));
                int n = 0;
                is >> n;
-               MathGridInset grid(1, 1);
+               InsetMathGrid grid(1, 1);
                mathed_parse_normal(grid, lyx::cap::getSelection(cur.buffer(), n));
                if (grid.nargs() == 1) {
                        // single cell/part of cell
@@ -1230,7 +1230,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                                }
                                // append the left over horizontal cells to the last column
                                idx_type i = index(r + cur.row(), ncols() - 1);
-                               for (MathInset::col_type c = numcols; c < grid.ncols(); ++c)
+                               for (InsetMath::col_type c = numcols; c < grid.ncols(); ++c)
                                        cell(i).append(grid.cell(grid.index(r, c)));
                        }
                        // append the left over vertical cells to the last _cell_
@@ -1289,12 +1289,12 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                break;
 
        default:
-               MathNestInset::doDispatch(cur, cmd);
+               InsetMathNest::doDispatch(cur, cmd);
        }
 }
 
 
-bool MathGridInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+bool InsetMathGrid::getStatus(LCursor & cur, FuncRequest const & cmd,
                FuncStatus & status) const
 {
        switch (cmd.action) {
@@ -1385,6 +1385,6 @@ bool MathGridInset::getStatus(LCursor & cur, FuncRequest const & cmd,
                return true;
 
        default:
-               return MathNestInset::getStatus(cur, cmd, status);
+               return InsetMathNest::getStatus(cur, cmd, status);
        }
 }
index 317bb92b2176fb471c420d7b928b963d35fad51e..38d0b02a9f50143ecad427556b42990b54ac0022 100644 (file)
@@ -19,7 +19,7 @@
 /** Gridded math inset base class.
  *  This is the base to all grid-like editable math objects
  */
-class MathGridInset : public MathNestInset {
+class InsetMathGrid : public InsetMathNest {
 public:
 
        /// additional per-cell information
@@ -82,15 +82,15 @@ public:
 
 public:
        /// sets nrows and ncols to 1
-       MathGridInset();
+       InsetMathGrid();
        /// constructor from columns description, creates one row
-       MathGridInset(char valign, std::string const & halign);
+       InsetMathGrid(char valign, std::string const & halign);
        /// Note: columns first!
-       MathGridInset(col_type m, row_type n);
+       InsetMathGrid(col_type m, row_type n);
        ///
-       MathGridInset(col_type m, row_type n, char valign, std::string const & halign);
+       InsetMathGrid(col_type m, row_type n, char valign, std::string const & halign);
        /// Ensures that the dialog is closed.
-       ~MathGridInset();
+       ~InsetMathGrid();
        ///
        void metrics(MetricsInfo & mi) const;
        ///
@@ -131,9 +131,9 @@ public:
        ///
        CellInfo & cellinfo(idx_type idx) { return cellinfo_[idx]; }
        /// identifies GridInset
-       MathGridInset * asGridInset() { return this; }
+       InsetMathGrid * asGridInset() { return this; }
        /// identifies GridInset
-       MathGridInset const * asGridInset() const { return this; }
+       InsetMathGrid const * asGridInset() const { return this; }
        ///
        col_type ncols() const;
        ///
index 9d6380d0faba1469460e07310bcc6a1a9f891e05..b119f582e4578e77deef69af786d0b58b83d03d5 100644 (file)
 
 #include <config.h>
 
+#include "math_arrayinset.h"
 #include "math_charinset.h"
 #include "math_colorinset.h"
 #include "math_data.h"
+#include "math_deliminset.h"
 #include "math_extern.h"
 #include "math_factory.h"
 #include "math_hullinset.h"
 #include "math_mathmlstream.h"
+#include "math_parser.h"
+#include "math_spaceinset.h"
 #include "math_streamstr.h"
 #include "math_support.h"
+#include "ref_inset.h"
+
+#include "bufferview_funcs.h"
+#include "lyxtext.h"
 
 #include "buffer.h"
 #include "bufferparams.h"
@@ -48,6 +56,7 @@
 #include "graphics/PreviewImage.h"
 #include "graphics/PreviewLoader.h"
 
+#include "support/lyxlib.h"
 #include "support/lstrings.h"
 
 #include <boost/bind.hpp>
@@ -150,21 +159,21 @@ std::string hullName(HullType type)
 }
 
 
-MathHullInset::MathHullInset()
-       : MathGridInset(1, 1), type_(hullNone), nonum_(1), label_(1),
+InsetMathHull::InsetMathHull()
+       : InsetMathGrid(1, 1), type_(hullNone), nonum_(1), label_(1),
          preview_(new RenderPreview(this))
 {
-       //lyxerr << "sizeof MathInset: " << sizeof(MathInset) << endl;
+       //lyxerr << "sizeof InsetMath: " << sizeof(InsetMath) << endl;
        //lyxerr << "sizeof MetricsInfo: " << sizeof(MetricsInfo) << endl;
-       //lyxerr << "sizeof MathCharInset: " << sizeof(MathCharInset) << endl;
+       //lyxerr << "sizeof InsetMathChar: " << sizeof(InsetMathChar) << endl;
        //lyxerr << "sizeof LyXFont: " << sizeof(LyXFont) << endl;
        initMath();
        setDefaults();
 }
 
 
-MathHullInset::MathHullInset(HullType type)
-       : MathGridInset(getCols(type), 1), type_(type), nonum_(1), label_(1),
+InsetMathHull::InsetMathHull(HullType type)
+       : InsetMathGrid(getCols(type), 1), type_(type), nonum_(1), label_(1),
          preview_(new RenderPreview(this))
 {
        initMath();
@@ -172,28 +181,28 @@ MathHullInset::MathHullInset(HullType type)
 }
 
 
-MathHullInset::MathHullInset(MathHullInset const & other)
-       : MathGridInset(other),
+InsetMathHull::InsetMathHull(InsetMathHull const & other)
+       : InsetMathGrid(other),
          type_(other.type_), nonum_(other.nonum_), label_(other.label_),
          preview_(new RenderPreview(this))
 {}
 
 
-MathHullInset::~MathHullInset()
+InsetMathHull::~InsetMathHull()
 {}
 
 
-auto_ptr<InsetBase> MathHullInset::doClone() const
+auto_ptr<InsetBase> InsetMathHull::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathHullInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathHull(*this));
 }
 
 
-MathHullInset & MathHullInset::operator=(MathHullInset const & other)
+InsetMathHull & InsetMathHull::operator=(InsetMathHull const & other)
 {
        if (this == &other)
                return *this;
-       *static_cast<MathGridInset*>(this) = MathGridInset(other);
+       *static_cast<InsetMathGrid*>(this) = InsetMathGrid(other);
        type_  = other.type_;
        nonum_ = other.nonum_;
        label_ = other.label_;
@@ -203,17 +212,17 @@ MathHullInset & MathHullInset::operator=(MathHullInset const & other)
 }
 
 
-InsetBase * MathHullInset::editXY(LCursor & cur, int x, int y)
+InsetBase * InsetMathHull::editXY(LCursor & cur, int x, int y)
 {
        if (use_preview_) {
                edit(cur, true);
                return this;
        }
-       return MathNestInset::editXY(cur, x, y);
+       return InsetMathNest::editXY(cur, x, y);
 }
 
 
-MathInset::mode_type MathHullInset::currentMode() const
+InsetMath::mode_type InsetMathHull::currentMode() const
 {
        if (type_ == hullNone)
                return UNDECIDED_MODE;
@@ -222,7 +231,7 @@ MathInset::mode_type MathHullInset::currentMode() const
 }
 
 
-bool MathHullInset::idxFirst(LCursor & cur) const
+bool InsetMathHull::idxFirst(LCursor & cur) const
 {
        cur.idx() = 0;
        cur.pos() = 0;
@@ -230,7 +239,7 @@ bool MathHullInset::idxFirst(LCursor & cur) const
 }
 
 
-bool MathHullInset::idxLast(LCursor & cur) const
+bool InsetMathHull::idxLast(LCursor & cur) const
 {
        cur.idx() = nargs() - 1;
        cur.pos() = cur.lastpos();
@@ -238,7 +247,7 @@ bool MathHullInset::idxLast(LCursor & cur) const
 }
 
 
-char MathHullInset::defaultColAlign(col_type col)
+char InsetMathHull::defaultColAlign(col_type col)
 {
        if (type_ == hullEqnArray)
                return "rcl"[col];
@@ -248,7 +257,7 @@ char MathHullInset::defaultColAlign(col_type col)
 }
 
 
-int MathHullInset::defaultColSpace(col_type col)
+int InsetMathHull::defaultColSpace(col_type col)
 {
        if (type_ == hullAlign || type_ == hullAlignAt)
                return 0;
@@ -260,13 +269,13 @@ int MathHullInset::defaultColSpace(col_type col)
 }
 
 
-char const * MathHullInset::standardFont() const
+char const * InsetMathHull::standardFont() const
 {
        return type_ == hullNone ? "lyxnochange" : "mathnormal";
 }
 
 
-bool MathHullInset::previewState(BufferView * bv) const
+bool InsetMathHull::previewState(BufferView * bv) const
 {
        if (!editing(bv) && RenderPreview::status() == LyXRC::PREVIEW_ON) {
                lyx::graphics::PreviewImage const * pimage =
@@ -277,7 +286,7 @@ bool MathHullInset::previewState(BufferView * bv) const
 }
 
 
-void MathHullInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathHull::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        if (previewState(mi.base.bv)) {
                preview_->metrics(mi, dim);
@@ -293,7 +302,7 @@ void MathHullInset::metrics(MetricsInfo & mi, Dimension & dim) const
        StyleChanger dummy2(mi.base, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
 
        // let the cells adjust themselves
-       MathGridInset::metrics(mi, dim);
+       InsetMathGrid::metrics(mi, dim);
 
        if (display()) {
                dim.asc += displayMargin();
@@ -321,7 +330,7 @@ void MathHullInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathHullInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathHull::draw(PainterInfo & pi, int x, int y) const
 {
        use_preview_ = previewState(pi.base.bv);
 
@@ -334,7 +343,7 @@ void MathHullInset::draw(PainterInfo & pi, int x, int y) const
 
        FontSetChanger dummy1(pi.base, standardFont());
        StyleChanger dummy2(pi.base, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
-       MathGridInset::draw(pi, x + 1, y);
+       InsetMathGrid::draw(pi, x + 1, y);
 
        if (numberedType()) {
                int const xx = x + colinfo_.back().offset_ + colinfo_.back().width_ + 20;
@@ -350,10 +359,10 @@ void MathHullInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathHullInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
+void InsetMathHull::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 {
        if (display()) {
-               MathGridInset::metricsT(mi, dim);
+               InsetMathGrid::metricsT(mi, dim);
        } else {
                ostringstream os;
                WriteStream wi(os, false, true);
@@ -365,10 +374,10 @@ void MathHullInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 }
 
 
-void MathHullInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathHull::drawT(TextPainter & pain, int x, int y) const
 {
        if (display()) {
-               MathGridInset::drawT(pain, x, y);
+               InsetMathGrid::drawT(pain, x, y);
        } else {
                ostringstream os;
                WriteStream wi(os, false, true);
@@ -380,7 +389,7 @@ void MathHullInset::drawT(TextPainter & pain, int x, int y) const
 
 namespace {
 
-string const latex_string(MathHullInset const & inset)
+string const latex_string(InsetMathHull const & inset)
 {
        ostringstream ls;
        WriteStream wi(ls, false, false);
@@ -391,7 +400,7 @@ string const latex_string(MathHullInset const & inset)
 } // namespace anon
 
 
-void MathHullInset::addPreview(lyx::graphics::PreviewLoader & ploader) const
+void InsetMathHull::addPreview(lyx::graphics::PreviewLoader & ploader) const
 {
        if (RenderPreview::status() == LyXRC::PREVIEW_ON) {
                string const snippet = latex_string(*this);
@@ -400,7 +409,7 @@ void MathHullInset::addPreview(lyx::graphics::PreviewLoader & ploader) const
 }
 
 
-bool MathHullInset::notifyCursorLeaves(LCursor & cur)
+bool InsetMathHull::notifyCursorLeaves(LCursor & cur)
 {
        if (RenderPreview::status() == LyXRC::PREVIEW_ON) {
                Buffer const & buffer = cur.buffer();
@@ -412,33 +421,33 @@ bool MathHullInset::notifyCursorLeaves(LCursor & cur)
 }
 
 
-string MathHullInset::label(row_type row) const
+string InsetMathHull::label(row_type row) const
 {
        BOOST_ASSERT(row < nrows());
        return label_[row];
 }
 
 
-void MathHullInset::label(row_type row, string const & label)
+void InsetMathHull::label(row_type row, string const & label)
 {
        //lyxerr << "setting label '" << label << "' for row " << row << endl;
        label_[row] = label;
 }
 
 
-void MathHullInset::numbered(row_type row, bool num)
+void InsetMathHull::numbered(row_type row, bool num)
 {
        nonum_[row] = !num;
 }
 
 
-bool MathHullInset::numbered(row_type row) const
+bool InsetMathHull::numbered(row_type row) const
 {
        return !nonum_[row];
 }
 
 
-bool MathHullInset::ams() const
+bool InsetMathHull::ams() const
 {
        return
                type_ == hullAlign ||
@@ -451,13 +460,13 @@ bool MathHullInset::ams() const
 }
 
 
-bool MathHullInset::display() const
+bool InsetMathHull::display() const
 {
        return type_ != hullSimple && type_ != hullNone;
 }
 
 
-void MathHullInset::getLabelList(Buffer const &, vector<string> & labels) const
+void InsetMathHull::getLabelList(Buffer const &, vector<string> & labels) const
 {
        for (row_type row = 0; row < nrows(); ++row)
                if (!label_[row].empty() && nonum_[row] != 1)
@@ -465,7 +474,7 @@ void MathHullInset::getLabelList(Buffer const &, vector<string> & labels) const
 }
 
 
-bool MathHullInset::numberedType() const
+bool InsetMathHull::numberedType() const
 {
        if (type_ == hullNone)
                return false;
@@ -480,7 +489,7 @@ bool MathHullInset::numberedType() const
 }
 
 
-void MathHullInset::validate(LaTeXFeatures & features) const
+void InsetMathHull::validate(LaTeXFeatures & features) const
 {
        if (ams())
                features.require("amsmath");
@@ -494,11 +503,11 @@ void MathHullInset::validate(LaTeXFeatures & features) const
        features.require("boldsymbol");
        //features.binom      = true;
 
-       MathGridInset::validate(features);
+       InsetMathGrid::validate(features);
 }
 
 
-void MathHullInset::header_write(WriteStream & os) const
+void InsetMathHull::header_write(WriteStream & os) const
 {
        bool n = numberedType();
 
@@ -536,7 +545,7 @@ hullFlAlign
 }
 
 
-void MathHullInset::footer_write(WriteStream & os) const
+void InsetMathHull::footer_write(WriteStream & os) const
 {
        bool n = numberedType();
 
@@ -566,7 +575,7 @@ hullFlAlign
 }
 
 
-bool MathHullInset::rowChangeOK() const
+bool InsetMathHull::rowChangeOK() const
 {
        return
                type_ == hullEqnArray || type_ == hullAlign ||
@@ -576,7 +585,7 @@ bool MathHullInset::rowChangeOK() const
 }
 
 
-bool MathHullInset::colChangeOK() const
+bool InsetMathHull::colChangeOK() const
 {
        return
                type_ == hullAlign || type_ == hullFlAlign ||type_ == hullAlignAt ||
@@ -584,17 +593,17 @@ bool MathHullInset::colChangeOK() const
 }
 
 
-void MathHullInset::addRow(row_type row)
+void InsetMathHull::addRow(row_type row)
 {
        if (!rowChangeOK())
                return;
        nonum_.insert(nonum_.begin() + row + 1, !numberedType());
        label_.insert(label_.begin() + row + 1, string());
-       MathGridInset::addRow(row);
+       InsetMathGrid::addRow(row);
 }
 
 
-void MathHullInset::swapRow(row_type row)
+void InsetMathHull::swapRow(row_type row)
 {
        if (nrows() <= 1)
                return;
@@ -602,15 +611,15 @@ void MathHullInset::swapRow(row_type row)
                --row;
        swap(nonum_[row], nonum_[row + 1]);
        swap(label_[row], label_[row + 1]);
-       MathGridInset::swapRow(row);
+       InsetMathGrid::swapRow(row);
 }
 
 
-void MathHullInset::delRow(row_type row)
+void InsetMathHull::delRow(row_type row)
 {
        if (nrows() <= 1 || !rowChangeOK())
                return;
-       MathGridInset::delRow(row);
+       InsetMathGrid::delRow(row);
        // The last dummy row has no number info nor a label.
        // Test nrows() + 1 because we have already erased the row.
        if (row == nrows() + 1)
@@ -620,23 +629,23 @@ void MathHullInset::delRow(row_type row)
 }
 
 
-void MathHullInset::addCol(col_type col)
+void InsetMathHull::addCol(col_type col)
 {
        if (!colChangeOK())
                return;
-       MathGridInset::addCol(col);
+       InsetMathGrid::addCol(col);
 }
 
 
-void MathHullInset::delCol(col_type col)
+void InsetMathHull::delCol(col_type col)
 {
        if (ncols() <= 1 || !colChangeOK())
                return;
-       MathGridInset::delCol(col);
+       InsetMathGrid::delCol(col);
 }
 
 
-string MathHullInset::nicelabel(row_type row) const
+string InsetMathHull::nicelabel(row_type row) const
 {
        if (nonum_[row])
                return string();
@@ -646,21 +655,21 @@ string MathHullInset::nicelabel(row_type row) const
 }
 
 
-void MathHullInset::glueall()
+void InsetMathHull::glueall()
 {
        MathArray ar;
        for (idx_type i = 0; i < nargs(); ++i)
                ar.append(cell(i));
-       *this = MathHullInset(hullSimple);
+       *this = InsetMathHull(hullSimple);
        cell(0) = ar;
        setDefaults();
 }
 
 
-void MathHullInset::splitTo2Cols()
+void InsetMathHull::splitTo2Cols()
 {
        BOOST_ASSERT(ncols() == 1);
-       MathGridInset::addCol(1);
+       InsetMathGrid::addCol(1);
        for (row_type row = 0; row < nrows(); ++row) {
                idx_type const i = 2 * row;
                pos_type pos = firstRelOp(cell(i));
@@ -670,12 +679,12 @@ void MathHullInset::splitTo2Cols()
 }
 
 
-void MathHullInset::splitTo3Cols()
+void InsetMathHull::splitTo3Cols()
 {
        BOOST_ASSERT(ncols() < 3);
        if (ncols() < 2)
                splitTo2Cols();
-       MathGridInset::addCol(1);
+       InsetMathGrid::addCol(1);
        for (row_type row = 0; row < nrows(); ++row) {
                idx_type const i = 3 * row + 1;
                if (cell(i).size()) {
@@ -686,7 +695,7 @@ void MathHullInset::splitTo3Cols()
 }
 
 
-void MathHullInset::changeCols(col_type cols)
+void InsetMathHull::changeCols(col_type cols)
 {
        if (ncols() == cols)
                return;
@@ -697,7 +706,7 @@ void MathHullInset::changeCols(col_type cols)
                else {
                        splitTo3Cols();
                        while (ncols() < cols)
-                               MathGridInset::addCol(ncols() - 1);
+                               InsetMathGrid::addCol(ncols() - 1);
                }
                return;
        }
@@ -711,25 +720,25 @@ void MathHullInset::changeCols(col_type cols)
        }
        // delete columns
        while (ncols() > cols) {
-               MathGridInset::delCol(ncols() - 1);
+               InsetMathGrid::delCol(ncols() - 1);
        }
 }
 
 
-HullType MathHullInset::getType() const
+HullType InsetMathHull::getType() const
 {
        return type_;
 }
 
 
-void MathHullInset::setType(HullType type)
+void InsetMathHull::setType(HullType type)
 {
        type_ = type;
        setDefaults();
 }
 
 
-void MathHullInset::mutate(HullType newtype)
+void InsetMathHull::mutate(HullType newtype)
 {
        //lyxerr << "mutating from '" << type_ << "' to '" << newtype << "'" << endl;
 
@@ -873,7 +882,7 @@ void MathHullInset::mutate(HullType newtype)
 }
 
 
-string MathHullInset::eolString(row_type row, bool emptyline, bool fragile) const
+string InsetMathHull::eolString(row_type row, bool emptyline, bool fragile) const
 {
        string res;
        if (numberedType()) {
@@ -882,46 +891,46 @@ string MathHullInset::eolString(row_type row, bool emptyline, bool fragile) cons
                if (nonum_[row] && (type_ != hullMultline))
                        res += "\\nonumber ";
        }
-       return res + MathGridInset::eolString(row, emptyline, fragile);
+       return res + InsetMathGrid::eolString(row, emptyline, fragile);
 }
 
 
-void MathHullInset::write(WriteStream & os) const
+void InsetMathHull::write(WriteStream & os) const
 {
        header_write(os);
-       MathGridInset::write(os);
+       InsetMathGrid::write(os);
        footer_write(os);
 }
 
 
-void MathHullInset::normalize(NormalStream & os) const
+void InsetMathHull::normalize(NormalStream & os) const
 {
        os << "[formula " << type_ << ' ';
-       MathGridInset::normalize(os);
+       InsetMathGrid::normalize(os);
        os << "] ";
 }
 
 
-void MathHullInset::mathmlize(MathMLStream & os) const
+void InsetMathHull::mathmlize(MathMLStream & os) const
 {
-       MathGridInset::mathmlize(os);
+       InsetMathGrid::mathmlize(os);
 }
 
 
-void MathHullInset::infoize(ostream & os) const
+void InsetMathHull::infoize(ostream & os) const
 {
        os << "Type: " << type_;
 }
 
 
-void MathHullInset::check() const
+void InsetMathHull::check() const
 {
        BOOST_ASSERT(nonum_.size() == nrows());
        BOOST_ASSERT(label_.size() == nrows());
 }
 
 
-void MathHullInset::doExtern(LCursor & cur, FuncRequest & func)
+void InsetMathHull::doExtern(LCursor & cur, FuncRequest & func)
 {
        string lang;
        string extra;
@@ -942,7 +951,7 @@ void MathHullInset::doExtern(LCursor & cur, FuncRequest & func)
 #endif
 
        MathArray eq;
-       eq.push_back(MathAtom(new MathCharInset('=')));
+       eq.push_back(MathAtom(new InsetMathChar('=')));
 
        // go to first item in line
        cur.idx() -= cur.idx() % ncols();
@@ -1000,7 +1009,7 @@ void MathHullInset::doExtern(LCursor & cur, FuncRequest & func)
 }
 
 
-void MathHullInset::doDispatch(LCursor & cur, FuncRequest & cmd)
+void InsetMathHull::doDispatch(LCursor & cur, FuncRequest & cmd)
 {
        //lyxerr << "action: " << cmd.action << endl;
        switch (cmd.action) {
@@ -1010,7 +1019,7 @@ void MathHullInset::doDispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_FINISHED_UP:
        case LFUN_FINISHED_DOWN:
                //lyxerr << "action: " << cmd.action << endl;
-               MathGridInset::doDispatch(cur, cmd);
+               InsetMathGrid::doDispatch(cur, cmd);
                notifyCursorLeaves(cur);
                cur.undispatched();
                break;
@@ -1029,7 +1038,7 @@ void MathHullInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                        cur.idx() = 0;
                        cur.pos() = cur.lastpos();
                }
-               MathGridInset::doDispatch(cur, cmd);
+               InsetMathGrid::doDispatch(cur, cmd);
                break;
 
        case LFUN_MATH_NUMBER:
@@ -1100,7 +1109,7 @@ void MathHullInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                        break;
                }
                MathArray ar;
-               if (createMathInset_fromDialogStr(lyx::to_utf8(cmd.argument()), ar)) {
+               if (createInsetMath_fromDialogStr(lyx::to_utf8(cmd.argument()), ar)) {
                        recordUndo(cur);
                        cur.insert(ar);
                } else
@@ -1139,13 +1148,13 @@ void MathHullInset::doDispatch(LCursor & cur, FuncRequest & cmd)
        }
 
        default:
-               MathGridInset::doDispatch(cur, cmd);
+               InsetMathGrid::doDispatch(cur, cmd);
                break;
        }
 }
 
 
-bool MathHullInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+bool InsetMathHull::getStatus(LCursor & cur, FuncRequest const & cmd,
                FuncStatus & status) const
 {
        switch (cmd.action) {
@@ -1168,7 +1177,7 @@ bool MathHullInset::getStatus(LCursor & cur, FuncRequest const & cmd,
                status.enabled(type_ != hullSimple);
                return true;
        case LFUN_INSET_INSERT: {
-               // Don't test createMathInset_fromDialogStr(), since
+               // Don't test createInsetMath_fromDialogStr(), since
                // getStatus is not called with a valid reference and the
                // dialog would not be applyable.
                string const name = cmd.getArg(0);
@@ -1223,37 +1232,23 @@ bool MathHullInset::getStatus(LCursor & cur, FuncRequest const & cmd,
                        status.enabled(false);
                        return true;
                }
-               return MathGridInset::getStatus(cur, cmd, status);
+               return InsetMathGrid::getStatus(cur, cmd, status);
        }
        default:
-               return MathGridInset::getStatus(cur, cmd, status);
+               return InsetMathGrid::getStatus(cur, cmd, status);
        }
 
        // This cannot really happen, but inserted to shut-up gcc
-       return MathGridInset::getStatus(cur, cmd, status);
+       return InsetMathGrid::getStatus(cur, cmd, status);
 }
 
 
 /////////////////////////////////////////////////////////////////////
 
-#include "math_arrayinset.h"
-#include "math_deliminset.h"
-#include "math_factory.h"
-#include "math_parser.h"
-#include "math_spaceinset.h"
-#include "ref_inset.h"
-
-#include "bufferview_funcs.h"
-#include "lyxtext.h"
-
-#include "frontends/LyXView.h"
-#include "frontends/Dialogs.h"
-
-#include "support/lyxlib.h"
 
 
 // simply scrap this function if you want
-void MathHullInset::mutateToText()
+void InsetMathHull::mutateToText()
 {
 #if 0
        // translate to latex
@@ -1274,48 +1269,48 @@ void MathHullInset::mutateToText()
 }
 
 
-void MathHullInset::handleFont(LCursor & cur, string const & arg,
+void InsetMathHull::handleFont(LCursor & cur, string const & arg,
        string const & font)
 {
        // this whole function is a hack and won't work for incremental font
        // changes...
        recordUndo(cur);
-       if (cur.inset().asMathInset()->name() == font)
+       if (cur.inset().asInsetMath()->name() == font)
                cur.handleFont(font);
        else {
-               cur.handleNest(createMathInset(font));
+               cur.handleNest(createInsetMath(font));
                cur.insert(arg);
        }
 }
 
 
-void MathHullInset::handleFont2(LCursor & cur, string const & arg)
+void InsetMathHull::handleFont2(LCursor & cur, string const & arg)
 {
        recordUndo(cur);
        LyXFont font;
        bool b;
        bv_funcs::string2font(arg, font, b);
        if (font.color() != LColor::inherit) {
-               MathAtom at = MathAtom(new MathColorInset(true, font.color()));
+               MathAtom at = MathAtom(new InsetMathColor(true, font.color()));
                cur.handleNest(at, 0);
        }
 }
 
 
-void MathHullInset::edit(LCursor & cur, bool left)
+void InsetMathHull::edit(LCursor & cur, bool left)
 {
        cur.push(*this);
        left ? idxFirst(cur) : idxLast(cur);
 }
 
 
-docstring const MathHullInset::editMessage() const
+docstring const InsetMathHull::editMessage() const
 {
        return _("Math editor mode");
 }
 
 
-void MathHullInset::revealCodes(LCursor & cur) const
+void InsetMathHull::revealCodes(LCursor & cur) const
 {
        if (!cur.inMathed())
                return;
@@ -1351,7 +1346,7 @@ void MathHullInset::revealCodes(LCursor & cur) const
 }
 
 
-InsetBase::Code MathHullInset::lyxCode() const
+InsetBase::Code InsetMathHull::lyxCode() const
 {
        return MATH_CODE;
 }
@@ -1361,13 +1356,13 @@ InsetBase::Code MathHullInset::lyxCode() const
 
 
 #if 0
-bool MathHullInset::searchForward(BufferView * bv, string const & str,
+bool InsetMathHull::searchForward(BufferView * bv, string const & str,
                                     bool, bool)
 {
 #ifdef WITH_WARNINGS
 #warning completely broken
 #endif
-       static MathHullInset * lastformula = 0;
+       static InsetMathHull * lastformula = 0;
        static CursorBase current = DocIterator(ibegin(nucleus()));
        static MathArray ar;
        static string laststr;
@@ -1386,7 +1381,7 @@ bool MathHullInset::searchForward(BufferView * bv, string const & str,
 
        for (DocIterator it = current; it != iend(nucleus()); increment(it)) {
                CursorSlice & top = it.back();
-               MathArray const & a = top.asMathInset()->cell(top.idx_);
+               MathArray const & a = top.asInsetMath()->cell(top.idx_);
                if (a.matchpart(ar, top.pos_)) {
                        bv->cursor().setSelection(it, ar.size());
                        current = it;
@@ -1403,7 +1398,7 @@ bool MathHullInset::searchForward(BufferView * bv, string const & str,
 #endif
 
 
-void MathHullInset::write(Buffer const &, std::ostream & os) const
+void InsetMathHull::write(Buffer const &, std::ostream & os) const
 {
        WriteStream wi(os, false, false);
        os << "Formula ";
@@ -1411,7 +1406,7 @@ void MathHullInset::write(Buffer const &, std::ostream & os) const
 }
 
 
-void MathHullInset::read(Buffer const &, LyXLex & lex)
+void InsetMathHull::read(Buffer const &, LyXLex & lex)
 {
        MathAtom at;
        mathed_parse_normal(at, lex);
@@ -1419,7 +1414,7 @@ void MathHullInset::read(Buffer const &, LyXLex & lex)
 }
 
 
-int MathHullInset::plaintext(Buffer const &, ostream & os,
+int InsetMathHull::plaintext(Buffer const &, ostream & os,
                        OutputParams const &) const
 {
        if (0 && display()) {
@@ -1440,7 +1435,7 @@ int MathHullInset::plaintext(Buffer const &, ostream & os,
 }
 
 
-int MathHullInset::docbook(Buffer const & buf, ostream & os,
+int InsetMathHull::docbook(Buffer const & buf, ostream & os,
                          OutputParams const & runparams) const
 {
        MathMLStream ms(os);
@@ -1463,11 +1458,11 @@ int MathHullInset::docbook(Buffer const & buf, ostream & os,
                // \ensuremath{} or \begin{display}\end{display}
                // so we strip LyX' math environment
                WriteStream wi(ls, false, false);
-               MathGridInset::write(wi);
+               InsetMathGrid::write(wi);
                ms << subst(subst(ls.str(), "&", "&amp;"), "<", "&lt;");
                ms << ETag("alt");
                ms << MTag("math");
-               MathGridInset::mathmlize(ms);
+               InsetMathGrid::mathmlize(ms);
                ms << ETag("math");
        } else {
                ms << MTag("alt role=\"tex\"");
@@ -1492,7 +1487,7 @@ int MathHullInset::docbook(Buffer const & buf, ostream & os,
 }
 
 
-int MathHullInset::textString(Buffer const & buf, ostream & os,
+int InsetMathHull::textString(Buffer const & buf, ostream & os,
                       OutputParams const & op) const
 {
        return plaintext(buf, os, op);
index 5f0edb5c61f9f6e3da663dddfc2fc613f0654e9b..99e4fd4fb680b2a10b893dbf9e417a87ccbb149c 100644 (file)
@@ -19,16 +19,16 @@ class RenderPreview;
 
 
 /// This provides an interface between "LyX insets" and "LyX math insets"
-class MathHullInset : public MathGridInset {
+class InsetMathHull : public InsetMathGrid {
 public:
        ///
-       MathHullInset();
+       InsetMathHull();
        ///
-       explicit MathHullInset(HullType type);
+       explicit InsetMathHull(HullType type);
        ///
-       ~MathHullInset();
+       ~InsetMathHull();
        ///
-       MathHullInset & operator=(MathHullInset const &);
+       InsetMathHull & operator=(InsetMathHull const &);
        ///
        mode_type currentMode() const;
        ///
@@ -57,9 +57,9 @@ public:
        ///
        void validate(LaTeXFeatures & features) const;
        /// identifies HullInset
-       MathHullInset const * asHullInset() const { return this; }
+       InsetMathHull const * asHullInset() const { return this; }
        /// identifies HullInset
-       MathHullInset * asHullInset() { return this; }
+       InsetMathHull * asHullInset() { return this; }
 
        /// add a row
        void addRow(row_type row);
@@ -120,7 +120,7 @@ public:
        static int displayMargin() { return 12; }
 
 protected:
-       MathHullInset(MathHullInset const &);
+       InsetMathHull(InsetMathHull const &);
 
        virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
 
index 2f04f7a9b76c1e72ffec5850136e493968cf3c46..fc5d35a653a01819329b633def284c468a547717 100644 (file)
@@ -25,7 +25,7 @@ using std::ostream;
 using std::endl;
 
 
-MathArray & MathInset::cell(idx_type)
+MathArray & InsetMath::cell(idx_type)
 {
        static MathArray dummyCell;
        lyxerr << BOOST_CURRENT_FUNCTION << ": I don't have any cell" << endl;
@@ -33,7 +33,7 @@ MathArray & MathInset::cell(idx_type)
 }
 
 
-MathArray const & MathInset::cell(idx_type) const
+MathArray const & InsetMath::cell(idx_type) const
 {
        static MathArray dummyCell;
        lyxerr << BOOST_CURRENT_FUNCTION << ": I don't have any cell" << endl;
@@ -41,7 +41,7 @@ MathArray const & MathInset::cell(idx_type) const
 }
 
 
-void MathInset::dump() const
+void InsetMath::dump() const
 {
        lyxerr << "---------------------------------------------" << endl;
        WriteStream wi(lyxerr, false, true);
@@ -50,24 +50,24 @@ void MathInset::dump() const
 }
 
 
-void MathInset::metricsT(TextMetricsInfo const &, Dimension &) const
+void InsetMath::metricsT(TextMetricsInfo const &, Dimension &) const
 {
 #ifdef WITH_WARNINGS
-       lyxerr << "MathInset::metricsT(Text) called directly!" << endl;
+       lyxerr << "InsetMath::metricsT(Text) called directly!" << endl;
 #endif
 }
 
 
-void MathInset::drawT(TextPainter &, int, int) const
+void InsetMath::drawT(TextPainter &, int, int) const
 {
 #ifdef WITH_WARNINGS
-       lyxerr << "MathInset::drawT(Text) called directly!" << endl;
+       lyxerr << "InsetMath::drawT(Text) called directly!" << endl;
 #endif
 }
 
 
 
-void MathInset::write(WriteStream & os) const
+void InsetMath::write(WriteStream & os) const
 {
        string const s = name();
        os << '\\' << s.c_str();
@@ -78,54 +78,54 @@ void MathInset::write(WriteStream & os) const
 }
 
 
-void MathInset::normalize(NormalStream & os) const
+void InsetMath::normalize(NormalStream & os) const
 {
        os << '[' << name().c_str() << "] ";
 }
 
 
-void MathInset::octave(OctaveStream & os) const
+void InsetMath::octave(OctaveStream & os) const
 {
        NormalStream ns(os.os());
        normalize(ns);
 }
 
 
-void MathInset::maple(MapleStream & os) const
+void InsetMath::maple(MapleStream & os) const
 {
        NormalStream ns(os.os());
        normalize(ns);
 }
 
 
-void MathInset::maxima(MaximaStream & os) const
+void InsetMath::maxima(MaximaStream & os) const
 {
        MapleStream ns(os.os());
        maple(ns);
 }
 
 
-void MathInset::mathematica(MathematicaStream & os) const
+void InsetMath::mathematica(MathematicaStream & os) const
 {
        NormalStream ns(os.os());
        normalize(ns);
 }
 
 
-void MathInset::mathmlize(MathMLStream & os) const
+void InsetMath::mathmlize(MathMLStream & os) const
 {
        NormalStream ns(os.os());
        normalize(ns);
 }
 
 
-HullType MathInset::getType() const
+HullType InsetMath::getType() const
 {
        return hullNone;
 }
 
 
-string MathInset::name() const
+string InsetMath::name() const
 {
        return "unknown";
 }
index c3bf7330a610cab5d39a72532176ee57720dd7dd..09972c2e58430e68882d66104258c1ebec625227 100644 (file)
@@ -44,30 +44,30 @@ the math objects.
 
 Math insets do not know there parents, a cursor position or things
 like that. The are dumb object that are contained in other math insets
-(MathNestInsets, in fact) thus forming a tree. The root of this tree is
-always a MathHullInset, which provides an interface to the Outer World by
+(InsetMathNests, in fact) thus forming a tree. The root of this tree is
+always a InsetMathHull, which provides an interface to the Outer World by
 inclusion in the "real LyX insets" FormulaInset and FormulaMacroInset.
 
 */
 
 class OutputParams;
-class MathArrayInset;
-class MathAMSArrayInset;
-class MathBraceInset;
-class MathCharInset;
-class MathDelimInset;
-class MathFracInset;
-class MathFontInset;
-class MathGridInset;
-class MathHullInset;
-class MathMatrixInset;
-class MathNestInset;
-class MathParboxInset;
-class MathScriptInset;
-class MathStringInset;
-class MathSpaceInset;
-class MathSymbolInset;
-class MathUnknownInset;
+class InsetMathArray;
+class InsetMathAMSArray;
+class InsetMathBrace;
+class InsetMathChar;
+class InsetMathDelim;
+class InsetMathFrac;
+class InsetMathFont;
+class InsetMathGrid;
+class InsetMathHull;
+class InsetMathMatrix;
+class InsetMathNest;
+class InsetMathParbox;
+class InsetMathScript;
+class InsetMathString;
+class InsetMathSpace;
+class InsetMathSymbol;
+class InsetMathUnknown;
 
 class RefInset;
 
@@ -90,10 +90,10 @@ class TextMetricsInfo;
 class ReplaceData;
 
 
-class MathInset : public InsetBase {
+class InsetMath : public InsetBase {
 public:
        /// identification as math inset
-       MathInset * asMathInset() { return this; }
+       InsetMath * asInsetMath() { return this; }
        /// this is overridden in math text insets (i.e. mbox)
        bool inMathed() const { return true; }
 
@@ -109,39 +109,39 @@ public:
        virtual MathArray const & cell(idx_type) const;
 
        /// identifies certain types of insets
-       virtual MathAMSArrayInset       * asAMSArrayInset()       { return 0; }
-       virtual MathAMSArrayInset const * asAMSArrayInset() const { return 0; }
-       virtual MathArrayInset          * asArrayInset()          { return 0; }
-       virtual MathArrayInset const    * asArrayInset() const    { return 0; }
-       virtual MathBraceInset const    * asBraceInset() const    { return 0; }
-       virtual MathCharInset const     * asCharInset() const     { return 0; }
-       virtual MathDelimInset          * asDelimInset()          { return 0; }
-       virtual MathDelimInset const    * asDelimInset() const    { return 0; }
-       virtual MathFracInset           * asFracInset()           { return 0; }
-       virtual MathFracInset const     * asFracInset() const     { return 0; }
-       virtual MathFontInset           * asFontInset()           { return 0; }
-       virtual MathFontInset const     * asFontInset() const     { return 0; }
-       virtual MathGridInset           * asGridInset()           { return 0; }
-       virtual MathGridInset const     * asGridInset() const     { return 0; }
-       virtual MathHullInset           * asHullInset()           { return 0; }
-       virtual MathHullInset const     * asHullInset() const     { return 0; }
+       virtual InsetMathAMSArray       * asAMSArrayInset()       { return 0; }
+       virtual InsetMathAMSArray const * asAMSArrayInset() const { return 0; }
+       virtual InsetMathArray          * asArrayInset()          { return 0; }
+       virtual InsetMathArray const    * asArrayInset() const    { return 0; }
+       virtual InsetMathBrace const    * asBraceInset() const    { return 0; }
+       virtual InsetMathChar const     * asCharInset() const     { return 0; }
+       virtual InsetMathDelim          * asDelimInset()          { return 0; }
+       virtual InsetMathDelim const    * asDelimInset() const    { return 0; }
+       virtual InsetMathFrac           * asFracInset()           { return 0; }
+       virtual InsetMathFrac const     * asFracInset() const     { return 0; }
+       virtual InsetMathFont           * asFontInset()           { return 0; }
+       virtual InsetMathFont const     * asFontInset() const     { return 0; }
+       virtual InsetMathGrid           * asGridInset()           { return 0; }
+       virtual InsetMathGrid const     * asGridInset() const     { return 0; }
+       virtual InsetMathHull           * asHullInset()           { return 0; }
+       virtual InsetMathHull const     * asHullInset() const     { return 0; }
        virtual MathMacro               * asMacro()               { return 0; }
        virtual MathMacro const         * asMacro() const         { return 0; }
        virtual MathMacroTemplate       * asMacroTemplate()       { return 0; }
        virtual MathMacroTemplate const * asMacroTemplate() const { return 0; }
-       virtual MathMatrixInset const   * asMatrixInset() const   { return 0; }
-       virtual MathNestInset           * asNestInset()           { return 0; }
-       virtual MathNestInset const     * asNestInset() const     { return 0; }
-       virtual MathParboxInset         * asParboxInset()         { return 0; }
-       virtual MathScriptInset         * asScriptInset()         { return 0; }
-       virtual MathScriptInset const   * asScriptInset() const   { return 0; }
-       virtual MathSpaceInset          * asSpaceInset()          { return 0; }
-       virtual MathSpaceInset const    * asSpaceInset() const    { return 0; }
-       virtual MathStringInset         * asStringInset()         { return 0; }
-       virtual MathStringInset const   * asStringInset() const   { return 0; }
-       virtual MathSymbolInset const   * asSymbolInset() const   { return 0; }
-       virtual MathUnknownInset        * asUnknownInset()        { return 0; }
-       virtual MathUnknownInset const  * asUnknownInset() const  { return 0; }
+       virtual InsetMathMatrix const   * asMatrixInset() const   { return 0; }
+       virtual InsetMathNest           * asNestInset()           { return 0; }
+       virtual InsetMathNest const     * asNestInset() const     { return 0; }
+       virtual InsetMathParbox         * asParboxInset()         { return 0; }
+       virtual InsetMathScript         * asScriptInset()         { return 0; }
+       virtual InsetMathScript const   * asScriptInset() const   { return 0; }
+       virtual InsetMathSpace          * asSpaceInset()          { return 0; }
+       virtual InsetMathSpace const    * asSpaceInset() const    { return 0; }
+       virtual InsetMathString         * asStringInset()         { return 0; }
+       virtual InsetMathString const   * asStringInset() const   { return 0; }
+       virtual InsetMathSymbol const   * asSymbolInset() const   { return 0; }
+       virtual InsetMathUnknown        * asUnknownInset()        { return 0; }
+       virtual InsetMathUnknown const  * asUnknownInset() const  { return 0; }
        virtual RefInset                * asRefInset()            { return 0; }
 
        /// identifies things that can get scripts
index d5e533997710a111ed9dff1465734ab6bdb9b59c..3dfd4706991fd1e1bfbee762c7def3104e7119c5 100644 (file)
@@ -20,27 +20,27 @@ using std::string;
 using std::auto_ptr;
 
 
-MathKernInset::MathKernInset()
+InsetMathKern::InsetMathKern()
 {}
 
 
-MathKernInset::MathKernInset(LyXLength const & w)
+InsetMathKern::InsetMathKern(LyXLength const & w)
        : wid_(w)
 {}
 
 
-MathKernInset::MathKernInset(string const & s)
+InsetMathKern::InsetMathKern(string const & s)
        : wid_(s)
 {}
 
 
-auto_ptr<InsetBase> MathKernInset::doClone() const
+auto_ptr<InsetBase> InsetMathKern::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathKernInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathKern(*this));
 }
 
 
-void MathKernInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathKern::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        wid_pix_ = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
        dim.wid = wid_pix_;
@@ -49,23 +49,23 @@ void MathKernInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-int MathKernInset::width() const
+int InsetMathKern::width() const
 {
        return wid_pix_;
 }
 
 
-void MathKernInset::draw(PainterInfo &, int, int) const
+void InsetMathKern::draw(PainterInfo &, int, int) const
 {}
 
 
-void MathKernInset::write(WriteStream & os) const
+void InsetMathKern::write(WriteStream & os) const
 {
        os << "\\kern" << wid_.asLatexString() << ' ';
 }
 
 
-void MathKernInset::normalize(NormalStream & os) const
+void InsetMathKern::normalize(NormalStream & os) const
 {
        os << "[kern " << wid_.asLatexString() << ']';
 }
index a8c4c9c0bd9366132a1ad6ea9510fbda79c95252..94aebac5295e6c35e8b2f2d809c391ecd97d46a7 100644 (file)
 /// The \kern primitive
 /// Some hack for visual effects
 
-class MathKernInset : public MathInset {
+class InsetMathKern : public InsetMath {
 public:
        ///
-       MathKernInset();
+       InsetMathKern();
        ///
-       explicit MathKernInset(LyXLength const & wid);
+       explicit InsetMathKern(LyXLength const & wid);
        ///
-       explicit MathKernInset(std::string const & wid);
+       explicit InsetMathKern(std::string const & wid);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index 46771075a9dfc11bfef616edb983709084d390e9..cdd8970ac726fc17b1a6501bff0ceaab66522ff7 100644 (file)
@@ -19,18 +19,18 @@ using std::string;
 using std::auto_ptr;
 
 
-MathLefteqnInset::MathLefteqnInset()
-       : MathNestInset(1)
+InsetMathLefteqn::InsetMathLefteqn()
+       : InsetMathNest(1)
 {}
 
 
-auto_ptr<InsetBase> MathLefteqnInset::doClone() const
+auto_ptr<InsetBase> InsetMathLefteqn::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathLefteqnInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathLefteqn(*this));
 }
 
 
-void MathLefteqnInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathLefteqn::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        dim.asc += 2;
@@ -41,20 +41,20 @@ void MathLefteqnInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathLefteqnInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathLefteqn::draw(PainterInfo & pi, int x, int y) const
 {
        cell(0).draw(pi, x + 2, y);
        drawMarkers(pi, x, y);
 }
 
 
-string MathLefteqnInset::name() const
+string InsetMathLefteqn::name() const
 {
        return "lefteqn";
 }
 
 
-void MathLefteqnInset::infoize(std::ostream & os) const
+void InsetMathLefteqn::infoize(std::ostream & os) const
 {
        os << "Lefteqn ";
 }
index d5fe40ee6b2ffc05daa3cae46eb8b4ca4d0a8176..3ab40172397c40e093bd87a210a8ef29d97aee51 100644 (file)
 
 /// Support for LaTeX's \\lefteqn command
 
-class MathLefteqnInset : public MathNestInset {
+class InsetMathLefteqn : public InsetMathNest {
 public:
        ///
-       MathLefteqnInset();
+       InsetMathLefteqn();
        ///
        std::string name() const;
        ///
index 0139db1b4c649fbbeba300aed58fa68319c99c7e..c1355e2598536606ffbcbfffbf62abf46d6fc515 100644 (file)
@@ -19,9 +19,9 @@ using std::auto_ptr;
 using std::endl;
 
 
-MathLimInset::MathLimInset
+InsetMathLim::InsetMathLim
        (MathArray const & f, MathArray const & x, MathArray const & x0)
-       : MathNestInset(3)
+       : InsetMathNest(3)
 {
        cell(0) = f;
        cell(1) = x;
@@ -29,55 +29,55 @@ MathLimInset::MathLimInset
 }
 
 
-auto_ptr<InsetBase> MathLimInset::doClone() const
+auto_ptr<InsetBase> InsetMathLim::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathLimInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathLim(*this));
 }
 
 
-void MathLimInset::normalize(NormalStream & os) const
+void InsetMathLim::normalize(NormalStream & os) const
 {
        os << "[lim " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
 }
 
 
-void MathLimInset::metrics(MetricsInfo &, Dimension &) const
+void InsetMathLim::metrics(MetricsInfo &, Dimension &) const
 {
        lyxerr << "should not happen" << endl;
 }
 
 
-void MathLimInset::draw(PainterInfo &, int, int) const
+void InsetMathLim::draw(PainterInfo &, int, int) const
 {
        lyxerr << "should not happen" << endl;
 }
 
 
-void MathLimInset::maple(MapleStream & os) const
+void InsetMathLim::maple(MapleStream & os) const
 {
        os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
 }
 
 
-void MathLimInset::maxima(MaximaStream & os) const
+void InsetMathLim::maxima(MaximaStream & os) const
 {
        os << "limit(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
 }
 
 
-void MathLimInset::mathematica(MathematicaStream & os) const
+void InsetMathLim::mathematica(MathematicaStream & os) const
 {
        os << "Limit[" << cell(0) << ',' << cell(1) << "-> " << cell(2) << ']';
 }
 
 
-void MathLimInset::mathmlize(MathMLStream & os) const
+void InsetMathLim::mathmlize(MathMLStream & os) const
 {
        os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
 }
 
 
-void MathLimInset::write(WriteStream &) const
+void InsetMathLim::write(WriteStream &) const
 {
        lyxerr << "should not happen" << endl;
 }
index 39fc87de80ccc0e1b8a882c6bafdcee02b85e858..7e4eb44e38d09bffa376077b1bf2058aaf9214f2 100644 (file)
 
 #include "math_nestinset.h"
 
-class MathLimInset : public MathNestInset {
+class InsetMathLim : public InsetMathNest {
 public:
        ///
-       MathLimInset(MathArray const & f, MathArray const & x, MathArray const & x0);
+       InsetMathLim(MathArray const & f, MathArray const & x, MathArray const & x0);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index a424d252e2ef7f9b0c975caccbffb5bfb13f1009..19ec6a3ebefa81e619ddfdefd964c6ae0219de7a 100644 (file)
@@ -32,7 +32,7 @@ using std::endl;
 
 
 MathMacro::MathMacro(string const & name, int numargs)
-       : MathNestInset(numargs), name_(name)
+       : InsetMathNest(numargs), name_(name)
 {}
 
 
@@ -51,9 +51,9 @@ string MathMacro::name() const
 void MathMacro::cursorPos(CursorSlice const & sl, bool boundary, int & x,
                int & y) const
 {
-       // We may have 0 arguments, but MathNestInset requires at least one.
+       // We may have 0 arguments, but InsetMathNest requires at least one.
        if (nargs() > 0)
-               MathNestInset::cursorPos(sl, boundary, x, y);
+               InsetMathNest::cursorPos(sl, boundary, x, y);
 }
 
 
@@ -116,9 +116,9 @@ void MathMacro::draw(PainterInfo & pi, int x, int y) const
 
 void MathMacro::drawSelection(PainterInfo & pi, int x, int y) const
 {
-       // We may have 0 arguments, but MathNestInset requires at least one.
+       // We may have 0 arguments, but InsetMathNest requires at least one.
        if (nargs() > 0)
-               MathNestInset::drawSelection(pi, x, y);
+               InsetMathNest::drawSelection(pi, x, y);
 }
 
 
@@ -131,17 +131,17 @@ void MathMacro::validate(LaTeXFeatures & features) const
 
 InsetBase * MathMacro::editXY(LCursor & cur, int x, int y)
 {
-       // We may have 0 arguments, but MathNestInset requires at least one.
+       // We may have 0 arguments, but InsetMathNest requires at least one.
        if (nargs() > 0) {
                // Prevent crash due to cold coordcache
                // FIXME: This is only a workaround, the call of
-               // MathNestInset::editXY is correct. The correct fix would
+               // InsetMathNest::editXY is correct. The correct fix would
                // ensure that the coordcache of the arguments is valid.
                if (!editing(&cur.bv())) {
                        edit(cur, true);
                        return this;
                }
-               return MathNestInset::editXY(cur, x, y);
+               return InsetMathNest::editXY(cur, x, y);
        }
        return this;
 }
index 6afbab1b3f620009c3147029d671a5a12c9ebe9d..102a9a0904be3a7762b4a78f5ba023ba7e330944 100644 (file)
@@ -20,7 +20,7 @@
 
 
 /// This class contains the data for a macro.
-class MathMacro : public MathNestInset {
+class MathMacro : public InsetMathNest {
 public:
        /// A macro can be built from an existing template
        MathMacro(std::string const & name, int numargs);
index 0db549d7abe84662ab89c25afb29523a5329b7d9..56c57f7c5a6bbea7d1eda12be771e8edee5c74e5 100644 (file)
@@ -17,7 +17,7 @@
 
 
 /// A macro argument.
-class MathMacroArgument : public MathDimInset {
+class MathMacroArgument : public InsetMathDim {
 public:
        ///
        explicit MathMacroArgument(std::size_t);
index f7bb45efcb5c3aa099dfdb255f10dbfde3dd1364..74bc46bd8831774132614f51292d084115c8f8f9 100644 (file)
@@ -44,7 +44,7 @@ MacroData::MacroData(string const & def, int numargs, string const & disp)
 
 void MacroData::expand(vector<MathArray> const & args, MathArray & to) const
 {
-       MathSqrtInset inset; // Hack. Any inset with a cell would do.
+       InsetMathSqrt inset; // Hack. Any inset with a cell would do.
        asArray(disp_.empty() ? def_ : disp_, inset.cell(0));
        //lyxerr << "MathData::expand: args: " << args << endl;
        //lyxerr << "MathData::expand: ar: " << inset.cell(0) << endl;
@@ -54,7 +54,7 @@ void MacroData::expand(vector<MathArray> const & args, MathArray & to) const
                if (it.nextInset()->lyxCode() != InsetBase::MATHMACROARG_CODE)
                        continue;
                //it.cell().erase(it.pos());
-               //it.cell().insert(it.pos(), it.nextInset()->asMathInset()
+               //it.cell().insert(it.pos(), it.nextInset()->asInsetMath()
                size_t n = static_cast<MathMacroArgument*>(it.nextInset())->number();
                if (n <= args.size()) {
                        it.cell().erase(it.pos());
index 3607a35d1b8fa0bff9d66faaba2caab5e06a193b..717d0bc65df45bfeb9309028ea05a352d8b2d9a3 100644 (file)
@@ -36,7 +36,7 @@ using std::endl;
 
 
 MathMacroTemplate::MathMacroTemplate()
-       : MathNestInset(2), numargs_(0), name_(), type_("newcommand")
+       : InsetMathNest(2), numargs_(0), name_(), type_("newcommand")
 {
        initMath();
 }
@@ -44,7 +44,7 @@ MathMacroTemplate::MathMacroTemplate()
 
 MathMacroTemplate::MathMacroTemplate(string const & nm, int numargs,
                string const & type, MathArray const & ar1, MathArray const & ar2)
-       : MathNestInset(2), numargs_(numargs), name_(nm), type_(type)
+       : InsetMathNest(2), numargs_(numargs), name_(nm), type_(type)
 {
        initMath();
 
@@ -57,7 +57,7 @@ MathMacroTemplate::MathMacroTemplate(string const & nm, int numargs,
 
 
 MathMacroTemplate::MathMacroTemplate(std::istream & is)
-       : MathNestInset(2), numargs_(0), name_()
+       : InsetMathNest(2), numargs_(0), name_()
 {
        initMath();
 
index 6b471088d9bbdb01d40746e7007a5146d6fe04c6..d2c2a4ed226cb78dc6461c263d02a82c7c19567a 100644 (file)
@@ -20,7 +20,7 @@
 #include "support/types.h"
 
 /// This class contains the macro definition.
-class MathMacroTemplate : public MathNestInset {
+class MathMacroTemplate : public InsetMathNest {
 public:
        ///
        MathMacroTemplate();
index a3d6d4b480b07b0a1875c6ff541c3089b38063b2..c83715f7f30e852c3345d964aff2104b65d3dcdb 100644 (file)
 using std::auto_ptr;
 
 
-MathMakeboxInset::MathMakeboxInset()
-       : MathNestInset(3)
+InsetMathMakebox::InsetMathMakebox()
+       : InsetMathNest(3)
 {}
 
 
-auto_ptr<InsetBase> MathMakeboxInset::doClone() const
+auto_ptr<InsetBase> InsetMathMakebox::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathMakeboxInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathMakebox(*this));
 }
 
 
-void MathMakeboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathMakebox::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
        w_ = mathed_char_width(mi.base.font, '[');
-       MathNestInset::metrics(mi);
+       InsetMathNest::metrics(mi);
        dim   = cell(0).dim();
        dim  += cell(1).dim();
        dim  += cell(2).dim();
@@ -45,7 +45,7 @@ void MathMakeboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathMakeboxInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathMakebox::draw(PainterInfo & pi, int x, int y) const
 {
        FontSetChanger dummy(pi.base, "textnormal");
        drawMarkers(pi, x, y);
@@ -69,7 +69,7 @@ void MathMakeboxInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathMakeboxInset::write(WriteStream & os) const
+void InsetMathMakebox::write(WriteStream & os) const
 {
        os << "\\makebox";
        os << '[' << cell(0) << ']';
@@ -79,13 +79,13 @@ void MathMakeboxInset::write(WriteStream & os) const
 }
 
 
-void MathMakeboxInset::normalize(NormalStream & os) const
+void InsetMathMakebox::normalize(NormalStream & os) const
 {
        os << "[makebox " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
 }
 
 
-void MathMakeboxInset::infoize(std::ostream & os) const
+void InsetMathMakebox::infoize(std::ostream & os) const
 {
        os << "Makebox (width: " << cell(0)
            << " pos: " << cell(1) << ")";
index 5ddf3618e38547fd018e225817bc4b23630914f9..cf7b4bbe4dea063a7f50b996974f185300805295 100644 (file)
 #include "math_nestinset.h"
 
 /// Extra nesting: \\makebox.
-// consolidate with MathFrameboxInset?
+// consolidate with InsetMathFrameBox?
 
-class MathMakeboxInset : public MathNestInset {
+class InsetMathMakebox : public InsetMathNest {
 public:
        ///
-       MathMakeboxInset();
+       InsetMathMakebox();
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index 65df407fba4de5ab5c8db87269fe2559e36ebe0f..8369e047cfe63c7bbcb9022b64c210c3362dff89 100644 (file)
@@ -22,7 +22,7 @@
 #include <iosfwd>
 
 class MathArray;
-class MathInset;
+class InsetMath;
 class MathAtom;
 
 //
index 961c0ed51e45bf2b59f270be6f7e3c57d4814338..2fa7f10d0861d8c2a4d5c23a21acd9c6bff2cbc5 100644 (file)
 using std::auto_ptr;
 
 
-MathMatrixInset::MathMatrixInset(MathGridInset const & p)
-       : MathGridInset(p)
+InsetMathMatrix::InsetMathMatrix(InsetMathGrid const & p)
+       : InsetMathGrid(p)
 {}
 
 
-auto_ptr<InsetBase> MathMatrixInset::doClone() const
+auto_ptr<InsetBase> InsetMathMatrix::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathMatrixInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathMatrix(*this));
 }
 
 
-void MathMatrixInset::write(WriteStream & os) const
+void InsetMathMatrix::write(WriteStream & os) const
 {
-       MathGridInset::write(os);
+       InsetMathGrid::write(os);
 }
 
 
-void MathMatrixInset::normalize(NormalStream & os) const
+void InsetMathMatrix::normalize(NormalStream & os) const
 {
-       MathGridInset::normalize(os);
+       InsetMathGrid::normalize(os);
 }
 
 
-void MathMatrixInset::maple(MapleStream & os) const
+void InsetMathMatrix::maple(MapleStream & os) const
 {
        os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
        for (idx_type idx = 0; idx < nargs(); ++idx) {
@@ -52,7 +52,7 @@ void MathMatrixInset::maple(MapleStream & os) const
 }
 
 
-void MathMatrixInset::maxima(MaximaStream & os) const
+void InsetMathMatrix::maxima(MaximaStream & os) const
 {
        os << "matrix(";
        for (row_type row = 0; row < nrows(); ++row) {
@@ -70,7 +70,7 @@ void MathMatrixInset::maxima(MaximaStream & os) const
 }
 
 
-void MathMatrixInset::mathematica(MathematicaStream & os) const
+void InsetMathMatrix::mathematica(MathematicaStream & os) const
 {
        os << '{';
        for (row_type row = 0; row < nrows(); ++row) {
@@ -88,13 +88,13 @@ void MathMatrixInset::mathematica(MathematicaStream & os) const
 }
 
 
-void MathMatrixInset::mathmlize(MathMLStream & os) const
+void InsetMathMatrix::mathmlize(MathMLStream & os) const
 {
-       MathGridInset::mathmlize(os);
+       InsetMathGrid::mathmlize(os);
 }
 
 
-void MathMatrixInset::octave(OctaveStream & os) const
+void InsetMathMatrix::octave(OctaveStream & os) const
 {
        os << '[';
        for (row_type row = 0; row < nrows(); ++row) {
index 2935c644130c12ca9b50cc82684445aec5d4b7e3..95de7a48d37dd94c3264eeb35dab8cc4541c42ab 100644 (file)
 
 // "shortcut" for DelimInset("(",ArrayInset,")")
 
-class MathMatrixInset : public MathGridInset {
+class InsetMathMatrix : public InsetMathGrid {
 public:
        ///
-       explicit MathMatrixInset(MathGridInset const &);
+       explicit InsetMathMatrix(InsetMathGrid const &);
        ///
-       explicit MathMatrixInset(std::string const & str);
+       explicit InsetMathMatrix(std::string const & str);
        /// identifies MatrixInsets
-       MathMatrixInset const * asMatrixInset() const { return this; }
+       InsetMathMatrix const * asMatrixInset() const { return this; }
 
        ///
        void write(WriteStream & os) const;
index fd2f1e25b4d02a5951a2fd99951853bbca916fc6..7b7c16ee84c83b812815d412f4838a45d4df461a 100644 (file)
@@ -29,7 +29,7 @@ using std::auto_ptr;
 using std::endl;
 
 
-MathMBoxInset::MathMBoxInset(BufferView & bv)
+InsetMathMBox::InsetMathMBox(BufferView & bv)
        : text_(&bv), bv_(&bv)
 {
        text_.paragraphs().clear();
@@ -40,13 +40,13 @@ MathMBoxInset::MathMBoxInset(BufferView & bv)
 }
 
 
-auto_ptr<InsetBase> MathMBoxInset::doClone() const
+auto_ptr<InsetBase> InsetMathMBox::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathMBoxInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathMBox(*this));
 }
 
 
-void MathMBoxInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathMBox::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        text_.metrics(mi, dim);
        metricsMarkers2(dim);
@@ -54,14 +54,14 @@ void MathMBoxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathMBoxInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathMBox::draw(PainterInfo & pi, int x, int y) const
 {
        text_.draw(pi, x + 1, y);
        drawMarkers(pi, x, y);
 }
 
 
-void MathMBoxInset::write(WriteStream & ws) const
+void InsetMathMBox::write(WriteStream & ws) const
 {
        if (ws.latex()) {
                ws << "\\mbox{\n";
@@ -79,7 +79,7 @@ void MathMBoxInset::write(WriteStream & ws) const
 }
 
 
-int MathMBoxInset::latex(Buffer const & buf, std::ostream & os,
+int InsetMathMBox::latex(Buffer const & buf, std::ostream & os,
                        OutputParams const & runparams) const
 {
        os << "\\mbox{\n";
@@ -90,19 +90,19 @@ int MathMBoxInset::latex(Buffer const & buf, std::ostream & os,
 }
 
 
-void MathMBoxInset::doDispatch(LCursor & cur, FuncRequest & cmd)
+void InsetMathMBox::doDispatch(LCursor & cur, FuncRequest & cmd)
 {
        text_.dispatch(cur, cmd);
 }
 
 
-LyXText * MathMBoxInset::getText(int) const
+LyXText * InsetMathMBox::getText(int) const
 {
        return &text_;
 }
 
 
-void MathMBoxInset::cursorPos
+void InsetMathMBox::cursorPos
        (CursorSlice const & sl, bool boundary, int & x, int & y) const
 {
        x = text_.cursorX(sl, boundary);
@@ -110,7 +110,7 @@ void MathMBoxInset::cursorPos
 }
 
 
-void MathMBoxInset::drawSelection(PainterInfo & pi, int x, int y) const
+void InsetMathMBox::drawSelection(PainterInfo & pi, int x, int y) const
 {
        text_.drawSelection(pi, x, y);
 }
index 59f13be5067a324c6f9d1a8e928088b45e98c6e7..4e6b34f4c5edc0c782e5b36e1e6923914e37c637 100644 (file)
 
 // almost a substitute for the real text inset...
 
-class MathMBoxInset : public MathDimInset {
+class InsetMathMBox : public InsetMathDim {
 public:
        ///
-       explicit MathMBoxInset(BufferView & bv);
+       explicit InsetMathMBox(BufferView & bv);
        /// this stores metrics information in cache_
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        /// draw according to cached metrics
index b45b3e27bdd4e7324eb34b1748dd2353fb8221a7..5b6de1a04bb4f7afd022738e81b8be10db064a77 100644 (file)
@@ -72,30 +72,30 @@ using std::string;
 using std::istringstream;
 
 
-MathNestInset::MathNestInset(idx_type nargs)
+InsetMathNest::InsetMathNest(idx_type nargs)
        : cells_(nargs), lock_(false)
 {}
 
 
-MathInset::idx_type MathNestInset::nargs() const
+InsetMath::idx_type InsetMathNest::nargs() const
 {
        return cells_.size();
 }
 
 
-MathArray & MathNestInset::cell(idx_type i)
+MathArray & InsetMathNest::cell(idx_type i)
 {
        return cells_[i];
 }
 
 
-MathArray const & MathNestInset::cell(idx_type i) const
+MathArray const & InsetMathNest::cell(idx_type i) const
 {
        return cells_[i];
 }
 
 
-void MathNestInset::cursorPos(CursorSlice const & sl, bool /*boundary*/,
+void InsetMathNest::cursorPos(CursorSlice const & sl, bool /*boundary*/,
        int & x, int & y) const
 {
 // FIXME: This is a hack. Ideally, the coord cache should not store
@@ -137,7 +137,7 @@ void MathNestInset::cursorPos(CursorSlice const & sl, bool /*boundary*/,
 }
 
 
-void MathNestInset::metrics(MetricsInfo const & mi) const
+void InsetMathNest::metrics(MetricsInfo const & mi) const
 {
        MetricsInfo m = mi;
        for (idx_type i = 0, n = nargs(); i != n; ++i)
@@ -145,7 +145,7 @@ void MathNestInset::metrics(MetricsInfo const & mi) const
 }
 
 
-bool MathNestInset::idxNext(LCursor & cur) const
+bool InsetMathNest::idxNext(LCursor & cur) const
 {
        BOOST_ASSERT(ptr_cmp(&cur.inset(), this));
        if (cur.idx() == cur.lastidx())
@@ -156,13 +156,13 @@ bool MathNestInset::idxNext(LCursor & cur) const
 }
 
 
-bool MathNestInset::idxRight(LCursor & cur) const
+bool InsetMathNest::idxRight(LCursor & cur) const
 {
        return idxNext(cur);
 }
 
 
-bool MathNestInset::idxPrev(LCursor & cur) const
+bool InsetMathNest::idxPrev(LCursor & cur) const
 {
        BOOST_ASSERT(ptr_cmp(&cur.inset(), this));
        if (cur.idx() == 0)
@@ -173,13 +173,13 @@ bool MathNestInset::idxPrev(LCursor & cur) const
 }
 
 
-bool MathNestInset::idxLeft(LCursor & cur) const
+bool InsetMathNest::idxLeft(LCursor & cur) const
 {
        return idxPrev(cur);
 }
 
 
-bool MathNestInset::idxFirst(LCursor & cur) const
+bool InsetMathNest::idxFirst(LCursor & cur) const
 {
        BOOST_ASSERT(ptr_cmp(&cur.inset(), this));
        if (nargs() == 0)
@@ -190,7 +190,7 @@ bool MathNestInset::idxFirst(LCursor & cur) const
 }
 
 
-bool MathNestInset::idxLast(LCursor & cur) const
+bool InsetMathNest::idxLast(LCursor & cur) const
 {
        BOOST_ASSERT(ptr_cmp(&cur.inset(), this));
        if (nargs() == 0)
@@ -201,7 +201,7 @@ bool MathNestInset::idxLast(LCursor & cur) const
 }
 
 
-void MathNestInset::dump() const
+void InsetMathNest::dump() const
 {
        WriteStream os(lyxerr);
        os << "---------------------------------------------\n";
@@ -213,7 +213,7 @@ void MathNestInset::dump() const
 }
 
 
-void MathNestInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathNest::draw(PainterInfo & pi, int x, int y) const
 {
 #if 0
        if (lock_)
@@ -224,7 +224,7 @@ void MathNestInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathNestInset::drawSelection(PainterInfo & pi, int x, int y) const
+void InsetMathNest::drawSelection(PainterInfo & pi, int x, int y) const
 {
        // this should use the x/y values given, not the cached values
        LCursor & cur = pi.base.bv->cursor();
@@ -241,7 +241,7 @@ void MathNestInset::drawSelection(PainterInfo & pi, int x, int y) const
 
        CursorSlice s1 = cur.selBegin();
        CursorSlice s2 = cur.selEnd();
-       //lyxerr << "MathNestInset::drawing selection: "
+       //lyxerr << "InsetMathNest::drawing selection: "
        //      << " s1: " << s1 << " s2: " << s2 << endl;
        if (s1.idx() == s2.idx()) {
                MathArray const & c = cell(s1.idx());
@@ -250,7 +250,7 @@ void MathNestInset::drawSelection(PainterInfo & pi, int x, int y) const
                int x2 = c.xo() + c.pos2x(s2.pos());
                int y2 = c.yo() + c.descent();
                pi.pain.fillRectangle(x1, y1, x2 - x1, y2 - y1, LColor::selection);
-       //lyxerr << "MathNestInset::drawing selection 3: "
+       //lyxerr << "InsetMathNest::drawing selection 3: "
        //      << " x1: " << x1 << " x2: " << x2
        //      << " y1: " << y1 << " y2: " << y2 << endl;
        } else {
@@ -268,21 +268,21 @@ void MathNestInset::drawSelection(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathNestInset::validate(LaTeXFeatures & features) const
+void InsetMathNest::validate(LaTeXFeatures & features) const
 {
        for (idx_type i = 0; i < nargs(); ++i)
                cell(i).validate(features);
 }
 
 
-void MathNestInset::replace(ReplaceData & rep)
+void InsetMathNest::replace(ReplaceData & rep)
 {
        for (idx_type i = 0; i < nargs(); ++i)
                cell(i).replace(rep);
 }
 
 
-bool MathNestInset::contains(MathArray const & ar) const
+bool InsetMathNest::contains(MathArray const & ar) const
 {
        for (idx_type i = 0; i < nargs(); ++i)
                if (cell(i).contains(ar))
@@ -291,25 +291,25 @@ bool MathNestInset::contains(MathArray const & ar) const
 }
 
 
-bool MathNestInset::lock() const
+bool InsetMathNest::lock() const
 {
        return lock_;
 }
 
 
-void MathNestInset::lock(bool l)
+void InsetMathNest::lock(bool l)
 {
        lock_ = l;
 }
 
 
-bool MathNestInset::isActive() const
+bool InsetMathNest::isActive() const
 {
        return nargs() > 0;
 }
 
 
-MathArray MathNestInset::glue() const
+MathArray InsetMathNest::glue() const
 {
        MathArray ar;
        for (size_t i = 0; i < nargs(); ++i)
@@ -318,7 +318,7 @@ MathArray MathNestInset::glue() const
 }
 
 
-void MathNestInset::write(WriteStream & os) const
+void InsetMathNest::write(WriteStream & os) const
 {
        os << '\\' << name().c_str();
        for (size_t i = 0; i < nargs(); ++i)
@@ -332,7 +332,7 @@ void MathNestInset::write(WriteStream & os) const
 }
 
 
-void MathNestInset::normalize(NormalStream & os) const
+void InsetMathNest::normalize(NormalStream & os) const
 {
        os << '[' << name().c_str();
        for (size_t i = 0; i < nargs(); ++i)
@@ -341,7 +341,7 @@ void MathNestInset::normalize(NormalStream & os) const
 }
 
 
-int MathNestInset::latex(Buffer const &, std::ostream & os,
+int InsetMathNest::latex(Buffer const &, std::ostream & os,
                        OutputParams const & runparams) const
 {
        WriteStream wi(os, runparams.moving_arg, true);
@@ -350,7 +350,7 @@ int MathNestInset::latex(Buffer const &, std::ostream & os,
 }
 
 
-bool MathNestInset::notifyCursorLeaves(LCursor & /*cur*/)
+bool InsetMathNest::notifyCursorLeaves(LCursor & /*cur*/)
 {
 #ifdef WITH_WARNINGS
 #warning look here
@@ -359,7 +359,7 @@ bool MathNestInset::notifyCursorLeaves(LCursor & /*cur*/)
        MathArray & ar = cur.cell();
        // remove base-only "scripts"
        for (pos_type i = 0; i + 1 < ar.size(); ++i) {
-               MathScriptInset * p = operator[](i).nucleus()->asScriptInset();
+               InsetMathScript * p = operator[](i).nucleus()->asScriptInset();
                if (p && p->nargs() == 1) {
                        MathArray ar = p->nuc();
                        erase(i);
@@ -370,8 +370,8 @@ bool MathNestInset::notifyCursorLeaves(LCursor & /*cur*/)
 
        // glue adjacent font insets of the same kind
        for (pos_type i = 0; i + 1 < size(); ++i) {
-               MathFontInset * p = operator[](i).nucleus()->asFontInset();
-               MathFontInset const * q = operator[](i + 1)->asFontInset();
+               InsetMathFont * p = operator[](i).nucleus()->asFontInset();
+               InsetMathFont const * q = operator[](i + 1)->asFontInset();
                if (p && q && p->name() == q->name()) {
                        p->cell(0).append(q->cell(0));
                        erase(i + 1);
@@ -383,38 +383,38 @@ bool MathNestInset::notifyCursorLeaves(LCursor & /*cur*/)
 }
 
 
-void MathNestInset::handleFont
+void InsetMathNest::handleFont
        (LCursor & cur, string const & arg, string const & font)
 {
        // this whole function is a hack and won't work for incremental font
        // changes...
        recordUndo(cur, Undo::ATOMIC);
 
-       if (cur.inset().asMathInset()->name() == font)
+       if (cur.inset().asInsetMath()->name() == font)
                cur.handleFont(font);
        else {
-               cur.handleNest(createMathInset(font));
+               cur.handleNest(createInsetMath(font));
                cur.insert(arg);
        }
 }
 
 
-void MathNestInset::handleFont2(LCursor & cur, string const & arg)
+void InsetMathNest::handleFont2(LCursor & cur, string const & arg)
 {
        recordUndo(cur, Undo::ATOMIC);
        LyXFont font;
        bool b;
        bv_funcs::string2font(arg, font, b);
        if (font.color() != LColor::inherit) {
-               MathAtom at = MathAtom(new MathColorInset(true, font.color()));
+               MathAtom at = MathAtom(new InsetMathColor(true, font.color()));
                cur.handleNest(at, 0);
        }
 }
 
 
-void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
+void InsetMathNest::doDispatch(LCursor & cur, FuncRequest & cmd)
 {
-       //lyxerr << "MathNestInset: request: " << cmd << std::endl;
+       //lyxerr << "InsetMathNest: request: " << cmd << std::endl;
        //CursorSlice sl = cur.current();
 
        switch (cmd.action) {
@@ -676,8 +676,8 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                // Otherwise we'll get an invalid cursor if we undo after
                // the macro was finished and the macro is a known command,
                // e.g. sqrt. LCursor::macroModeClose replaces in this case
-               // the MathUnknownInset with name "frac" by an empty
-               // MathFracInset -> a pos value > 0 is invalid.
+               // the InsetMathUnknown with name "frac" by an empty
+               // InsetMathFrac -> a pos value > 0 is invalid.
                // A side effect is that an undo before the macro is finished
                // undoes the complete macro, not only the last character.
                if (!cur.inMacroMode())
@@ -811,14 +811,14 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                cur.macroModeClose();
                string const save_selection = grabAndEraseSelection(cur);
                selClearOrDel(cur);
-               //cur.plainInsert(MathAtom(new MathMBoxInset(cur.bv())));
-               cur.plainInsert(MathAtom(new MathBoxInset("mbox")));
+               //cur.plainInsert(MathAtom(new InsetMathMBox(cur.bv())));
+               cur.plainInsert(MathAtom(new InsetMathBox("mbox")));
                cur.posLeft();
                cur.pushLeft(*cur.nextInset());
                cur.niceInsert(save_selection);
 #else
                if (currentMode() == InsetBase::TEXT_MODE) {
-                       cur.niceInsert(MathAtom(new MathHullInset("simple")));
+                       cur.niceInsert(MathAtom(new InsetMathHull("simple")));
                        cur.message(_("create new math text environment ($...$)"));
                } else {
                        handleFont(cur, lyx::to_utf8(cmd.argument()), "textrm");
@@ -849,7 +849,7 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                        n = 1;
                v_align += 'c';
                cur.niceInsert(
-                       MathAtom(new MathArrayInset("array", m, n, v_align[0], h_align)));
+                       MathAtom(new InsetMathArray("array", m, n, v_align[0], h_align)));
                break;
        }
 
@@ -862,7 +862,7 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                if (rs.empty())
                        rs = ')';
                recordUndo(cur, Undo::ATOMIC);
-               cur.handleNest(MathAtom(new MathDelimInset(ls, rs)));
+               cur.handleNest(MathAtom(new InsetMathDelim(ls, rs)));
                break;
        }
 
@@ -873,10 +873,10 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                string const rdelim = cmd.getArg(3);
                latexkeys const * l = in_word_set(lname);
                bool const have_l = l && l->inset == "big" &&
-                                   MathBigInset::isBigInsetDelim(ldelim);
+                                   InsetMathBig::isBigInsetDelim(ldelim);
                l = in_word_set(rname);
                bool const have_r = l && l->inset == "big" &&
-                                   MathBigInset::isBigInsetDelim(rdelim);
+                                   InsetMathBig::isBigInsetDelim(rdelim);
                // We mimic LFUN_MATH_DELIM in case we have an empty left
                // or right delimiter.
                if (have_l || have_r) {
@@ -884,11 +884,11 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                        string const selection = grabAndEraseSelection(cur);
                        selClearOrDel(cur);
                        if (have_l)
-                               cur.insert(MathAtom(new MathBigInset(lname,
+                               cur.insert(MathAtom(new InsetMathBig(lname,
                                                                ldelim)));
                        cur.niceInsert(selection);
                        if (have_r)
-                               cur.insert(MathAtom(new MathBigInset(rname,
+                               cur.insert(MathAtom(new InsetMathBig(rname,
                                                                rdelim)));
                }
                // Don't call cur.undispatched() if we did nothing, this would
@@ -899,7 +899,7 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_SPACE_INSERT:
        case LFUN_MATH_SPACE:
                recordUndo(cur, Undo::ATOMIC);
-               cur.insert(MathAtom(new MathSpaceInset(",")));
+               cur.insert(MathAtom(new InsetMathSpace(",")));
                break;
 
        case LFUN_ERT_INSERT:
@@ -944,13 +944,13 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
        }
 
        default:
-               MathDimInset::doDispatch(cur, cmd);
+               InsetMathDim::doDispatch(cur, cmd);
                break;
        }
 }
 
 
-bool MathNestInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+bool InsetMathNest::getStatus(LCursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
        // the font related toggles
@@ -1041,17 +1041,17 @@ bool MathNestInset::getStatus(LCursor & cur, FuncRequest const & cmd,
 }
 
 
-void MathNestInset::edit(LCursor & cur, bool left)
+void InsetMathNest::edit(LCursor & cur, bool left)
 {
        cur.push(*this);
        cur.idx() = left ? 0 : cur.lastidx();
        cur.pos() = left ? 0 : cur.lastpos();
        cur.resetAnchor();
-       //lyxerr << "MathNestInset::edit, cur:\n" << cur << endl;
+       //lyxerr << "InsetMathNest::edit, cur:\n" << cur << endl;
 }
 
 
-InsetBase * MathNestInset::editXY(LCursor & cur, int x, int y)
+InsetBase * InsetMathNest::editXY(LCursor & cur, int x, int y)
 {
        int idx_min = 0;
        int dist_min = 1000000;
@@ -1077,7 +1077,7 @@ InsetBase * MathNestInset::editXY(LCursor & cur, int x, int y)
 }
 
 
-void MathNestInset::lfunMousePress(LCursor & cur, FuncRequest & cmd)
+void InsetMathNest::lfunMousePress(LCursor & cur, FuncRequest & cmd)
 {
        //lyxerr << "## lfunMousePress: buttons: " << cmd.button() << endl;
        BufferView & bv = cur.bv();
@@ -1097,7 +1097,7 @@ void MathNestInset::lfunMousePress(LCursor & cur, FuncRequest & cmd)
 }
 
 
-void MathNestInset::lfunMouseMotion(LCursor & cur, FuncRequest & cmd)
+void InsetMathNest::lfunMouseMotion(LCursor & cur, FuncRequest & cmd)
 {
        // only select with button 1
        if (cmd.button() == mouse_button::button1) {
@@ -1115,7 +1115,7 @@ void MathNestInset::lfunMouseMotion(LCursor & cur, FuncRequest & cmd)
 }
 
 
-void MathNestInset::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
+void InsetMathNest::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
 {
        //lyxerr << "## lfunMouseRelease: buttons: " << cmd.button() << endl;
 
@@ -1134,7 +1134,7 @@ void MathNestInset::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
 }
 
 
-bool MathNestInset::interpret(LCursor & cur, char c)
+bool InsetMathNest::interpret(LCursor & cur, char c)
 {
        //lyxerr << "interpret 2: '" << c << "'" << endl;
        string save_selection;
@@ -1166,22 +1166,22 @@ bool MathNestInset::interpret(LCursor & cur, char c)
                        // remove the '\\'
                        if (c == '\\') {
                                cur.backspace();
-                               if (currentMode() == MathInset::TEXT_MODE)
-                                       cur.niceInsert(createMathInset("textbackslash"));
+                               if (currentMode() == InsetMath::TEXT_MODE)
+                                       cur.niceInsert(createInsetMath("textbackslash"));
                                else
-                                       cur.niceInsert(createMathInset("backslash"));
+                                       cur.niceInsert(createInsetMath("backslash"));
                        } else if (c == '{') {
                                cur.backspace();
-                               cur.niceInsert(MathAtom(new MathBraceInset));
+                               cur.niceInsert(MathAtom(new InsetMathBrace));
                        } else if (c == '%') {
                                cur.backspace();
-                               cur.niceInsert(MathAtom(new MathCommentInset));
+                               cur.niceInsert(MathAtom(new InsetMathComment));
                        } else if (c == '#') {
                                BOOST_ASSERT(cur.activeMacro());
                                cur.activeMacro()->setName(name + c);
                        } else {
                                cur.backspace();
-                               cur.niceInsert(createMathInset(string(1, c)));
+                               cur.niceInsert(createInsetMath(string(1, c)));
                        }
                        return true;
                }
@@ -1202,16 +1202,16 @@ bool MathNestInset::interpret(LCursor & cur, char c)
                                delim = string(1, c);
                                break;
                        }
-                       if (MathBigInset::isBigInsetDelim(delim)) {
-                               // name + delim ared a valid MathBigInset.
+                       if (InsetMathBig::isBigInsetDelim(delim)) {
+                               // name + delim ared a valid InsetMathBig.
                                // We can't use cur.macroModeClose() because
                                // it does not handle delim.
-                               MathUnknownInset * p = cur.activeMacro();
+                               InsetMathUnknown * p = cur.activeMacro();
                                p->finalize();
                                --cur.pos();
                                cur.cell().erase(cur.pos());
                                cur.plainInsert(MathAtom(
-                                       new MathBigInset(name.substr(1), delim)));
+                                       new InsetMathBig(name.substr(1), delim)));
                                return true;
                        }
                }
@@ -1219,7 +1219,7 @@ bool MathNestInset::interpret(LCursor & cur, char c)
                // leave macro mode and try again if necessary
                cur.macroModeClose();
                if (c == '{')
-                       cur.niceInsert(MathAtom(new MathBraceInset));
+                       cur.niceInsert(MathAtom(new InsetMathBrace));
                else if (c != ' ')
                        interpret(cur, c);
                return true;
@@ -1246,18 +1246,18 @@ bool MathNestInset::interpret(LCursor & cur, char c)
 
        if (c == '\\') {
                //lyxerr << "starting with macro" << endl;
-               cur.insert(MathAtom(new MathUnknownInset("\\", false)));
+               cur.insert(MathAtom(new InsetMathUnknown("\\", false)));
                return true;
        }
 
        if (c == '\n') {
-               if (currentMode() == MathInset::TEXT_MODE)
+               if (currentMode() == InsetMath::TEXT_MODE)
                        cur.insert(c);
                return true;
        }
 
        if (c == ' ') {
-               if (currentMode() == MathInset::TEXT_MODE) {
+               if (currentMode() == InsetMath::TEXT_MODE) {
                        // insert spaces in text mode,
                        // but suppress direct insertion of two spaces in a row
                        // the still allows typing  '<space>a<space>' and deleting the 'a', but
@@ -1277,7 +1277,7 @@ bool MathNestInset::interpret(LCursor & cur, char c)
        }
 
        // These shouldn't work in text mode:
-       if (currentMode() != MathInset::TEXT_MODE) {
+       if (currentMode() != InsetMath::TEXT_MODE) {
                if (c == '_') {
                        script(cur, false, save_selection);
                        return true;
@@ -1287,14 +1287,14 @@ bool MathNestInset::interpret(LCursor & cur, char c)
                        return true;
                }
                if (c == '~') {
-                       cur.niceInsert(createMathInset("sim"));
+                       cur.niceInsert(createInsetMath("sim"));
                        return true;
                }
        }
 
        if (c == '{' || c == '}' || c == '&' || c == '$' || c == '#' ||
            c == '%' || c == '_' || c == '^') {
-               cur.niceInsert(createMathInset(string(1, c)));
+               cur.niceInsert(createInsetMath(string(1, c)));
                return true;
        }
 
@@ -1310,20 +1310,20 @@ bool MathNestInset::interpret(LCursor & cur, char c)
 }
 
 
-bool MathNestInset::interpret(LCursor & cur, string const & str)
+bool InsetMathNest::interpret(LCursor & cur, string const & str)
 {
-       // Create a MathBigInset from cur.cell()[cur.pos() - 1] and t if
+       // Create a InsetMathBig from cur.cell()[cur.pos() - 1] and t if
        // possible
        if (!cur.empty() && cur.pos() > 0 &&
            cur.cell()[cur.pos() - 1]->asUnknownInset()) {
-               if (MathBigInset::isBigInsetDelim(str)) {
+               if (InsetMathBig::isBigInsetDelim(str)) {
                        string prev = asString(cur.cell()[cur.pos() - 1]);
                        if (prev[0] == '\\') {
                                prev = prev.substr(1);
                                latexkeys const * l = in_word_set(prev);
                                if (l && l->inset == "big") {
                                        cur.cell()[cur.pos() - 1] =
-                                               MathAtom(new MathBigInset(prev, str));
+                                               MathAtom(new InsetMathBig(prev, str));
                                        return true;
                                }
                        }
@@ -1333,14 +1333,14 @@ bool MathNestInset::interpret(LCursor & cur, string const & str)
 }
 
 
-bool MathNestInset::script(LCursor & cur, bool up, string const &
+bool InsetMathNest::script(LCursor & cur, bool up, string const &
                save_selection)
 {
        // Hack to get \^ and \_ working
        //lyxerr << "handling script: up: " << up << endl;
        if (cur.inMacroMode() && cur.macroName() == "\\") {
                if (up)
-                       cur.niceInsert(createMathInset("mathcircumflex"));
+                       cur.niceInsert(createInsetMath("mathcircumflex"));
                else
                        interpret(cur, '_');
                return true;
@@ -1349,14 +1349,14 @@ bool MathNestInset::script(LCursor & cur, bool up, string const &
        cur.macroModeClose();
        if (asScriptInset() && cur.idx() == 0) {
                // we are in a nucleus of a script inset, move to _our_ script
-               MathScriptInset * inset = asScriptInset();
+               InsetMathScript * inset = asScriptInset();
                //lyxerr << " going to cell " << inset->idxOfScript(up) << endl;
                inset->ensure(up);
                cur.idx() = inset->idxOfScript(up);
                cur.pos() = 0;
        } else if (cur.pos() != 0 && cur.prevAtom()->asScriptInset()) {
                --cur.pos();
-               MathScriptInset * inset = cur.nextAtom().nucleus()->asScriptInset();
+               InsetMathScript * inset = cur.nextAtom().nucleus()->asScriptInset();
                cur.push(*inset);
                inset->ensure(up);
                cur.idx() = inset->idxOfScript(up);
@@ -1366,13 +1366,13 @@ bool MathNestInset::script(LCursor & cur, bool up, string const &
                // one if in the very first position of the array
                if (cur.pos() == 0) {
                        //lyxerr << "new scriptinset" << endl;
-                       cur.insert(new MathScriptInset(up));
+                       cur.insert(new InsetMathScript(up));
                } else {
                        //lyxerr << "converting prev atom " << endl;
-                       cur.prevAtom() = MathAtom(new MathScriptInset(cur.prevAtom(), up));
+                       cur.prevAtom() = MathAtom(new InsetMathScript(cur.prevAtom(), up));
                }
                --cur.pos();
-               MathScriptInset * inset = cur.nextAtom().nucleus()->asScriptInset();
+               InsetMathScript * inset = cur.nextAtom().nucleus()->asScriptInset();
                // special handling of {}-bases
                // is this always correct?
                if (inset->nuc().size() == 1
index 70344cc46e4dc2f2f9e8820017a9aca34385c2f7..f86e9fd0306516eab5681133d5170b7bad03e5a5 100644 (file)
     single symbol.
 */
 
-class MathNestInset : public MathDimInset {
+class InsetMathNest : public InsetMathDim {
 public:
        /// nestinsets have a fixed size to start with
-       explicit MathNestInset(idx_type ncells);
+       explicit InsetMathNest(idx_type ncells);
 
        /// the size is usually some sort of convex hull of the cells
        /// hides inset::metrics() intentionally!
@@ -33,9 +33,9 @@ public:
        /// draw selection background
        void drawSelection(PainterInfo & pi, int x, int y) const;
        /// identifies NestInsets
-       MathNestInset * asNestInset() { return this; }
+       InsetMathNest * asNestInset() { return this; }
        /// identifies NestInsets
-       MathNestInset const * asNestInset() const { return this; }
+       InsetMathNest const * asNestInset() const { return this; }
        /// get cursor position
        void cursorPos(CursorSlice const & sl, bool boundary, int & x, int & y) const;
        ///
index 16f64c4e9c640c9c9270448376a5a7c91d89fb63..13ef842476b3500f72d6231b5dec33a4cf1a2cc0 100644 (file)
@@ -21,61 +21,61 @@ using std::string;
 using std::auto_ptr;
 
 
-MathNumberInset::MathNumberInset(string const & s)
+InsetMathNumber::InsetMathNumber(string const & s)
        : str_(s)
 {}
 
 
-auto_ptr<InsetBase> MathNumberInset::doClone() const
+auto_ptr<InsetBase> InsetMathNumber::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathNumberInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathNumber(*this));
 }
 
 
-void MathNumberInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathNumber::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        mathed_string_dim(mi.base.font, str_, dim);
 }
 
 
-void MathNumberInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathNumber::draw(PainterInfo & pi, int x, int y) const
 {
         docstring const dstr(str_.begin(), str_.end());
        pi.draw(x, y, dstr);
 }
 
 
-void MathNumberInset::normalize(NormalStream & os) const
+void InsetMathNumber::normalize(NormalStream & os) const
 {
        os << "[number " << str_ << ']';
 }
 
 
-void MathNumberInset::maple(MapleStream & os) const
+void InsetMathNumber::maple(MapleStream & os) const
 {
        os << str_;
 }
 
 
-void MathNumberInset::mathematica(MathematicaStream & os) const
+void InsetMathNumber::mathematica(MathematicaStream & os) const
 {
        os << str_;
 }
 
 
-void MathNumberInset::octave(OctaveStream & os) const
+void InsetMathNumber::octave(OctaveStream & os) const
 {
        os << str_;
 }
 
 
-void MathNumberInset::mathmlize(MathMLStream & os) const
+void InsetMathNumber::mathmlize(MathMLStream & os) const
 {
        os << "<mi> " << str_ << " </mi>";
 }
 
 
-void MathNumberInset::write(WriteStream & os) const
+void InsetMathNumber::write(WriteStream & os) const
 {
        os << str_;
 }
index 326bd45dfee4d62faec4df2c67d380b89cd2e37b..de78449e606ee1d68a2a83866c73dabc2f5256e1 100644 (file)
 /** Some inset that "is" a number
  *  mainly for math-extern
  */
-class MathNumberInset : public MathInset {
+class InsetMathNumber : public InsetMath {
 public:
        ///
-       explicit MathNumberInset(std::string const & s);
+       explicit InsetMathNumber(std::string const & s);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
@@ -29,7 +29,7 @@ public:
        ///
        std::string str() const { return str_; }
        ///
-       MathNumberInset * asNumberInset() { return this; }
+       InsetMathNumber * asNumberInset() { return this; }
 
        ///
        void normalize(NormalStream &) const;
index ed4670407bdd501d8f47efe493b9fe37e250f020..696edde3f075a2230c7243f174b16105c738d5e4 100644 (file)
@@ -21,13 +21,13 @@ using std::max;
 using std::auto_ptr;
 
 
-auto_ptr<InsetBase> MathOversetInset::doClone() const
+auto_ptr<InsetBase> InsetMathOverset::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathOversetInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathOverset(*this));
 }
 
 
-void MathOversetInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathOverset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(1).metrics(mi);
        FracChanger dummy(mi.base);
@@ -40,7 +40,7 @@ void MathOversetInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathOversetInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathOverset::draw(PainterInfo & pi, int x, int y) const
 {
        int m  = x + width() / 2;
        int yo = y - cell(1).ascent() + cell(0).descent() - 1;
@@ -51,7 +51,7 @@ void MathOversetInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-bool MathOversetInset::idxFirst(LCursor & cur) const
+bool InsetMathOverset::idxFirst(LCursor & cur) const
 {
        cur.idx() = 1;
        cur.pos() = 0;
@@ -59,7 +59,7 @@ bool MathOversetInset::idxFirst(LCursor & cur) const
 }
 
 
-bool MathOversetInset::idxLast(LCursor & cur) const
+bool InsetMathOverset::idxLast(LCursor & cur) const
 {
        cur.idx() = 1;
        cur.pos() = cur.lastpos();
@@ -67,20 +67,20 @@ bool MathOversetInset::idxLast(LCursor & cur) const
 }
 
 
-void MathOversetInset::write(WriteStream & os) const
+void InsetMathOverset::write(WriteStream & os) const
 {
        os << "\\overset{" << cell(0) << "}{" << cell(1) << '}';
 }
 
 
-void MathOversetInset::normalize(NormalStream & os) const
+void InsetMathOverset::normalize(NormalStream & os) const
 {
        os << "[overset " << cell(0) << ' ' << cell(1) << ']';
 }
 
 
-void MathOversetInset::validate(LaTeXFeatures & features) const
+void InsetMathOverset::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
 }
index f73ac6149b6c541a538bfad6b7db742509ca459a..3e3e39c2eda01614f561bd0d751850605210ba4f 100644 (file)
@@ -16,7 +16,7 @@
 #include "math_fracbase.h"
 
 /// Inset for overset
-class MathOversetInset : public MathFracbaseInset {
+class InsetMathOverset : public InsetMathFracBase {
 public:
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
index 3f2baae0ddefce2bd1bbfeb7179415d7254aca98..4064b99cbaa759be653b36bceca18b54559a68b4 100644 (file)
 using std::auto_ptr;
 
 
-MathParInset::MathParInset(MathArray const & ar)
+InsetMathPar::InsetMathPar(MathArray const & ar)
 {
        cells_[0] = ar;
 }
 
 
-void MathParInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathPar::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy1(mi.base, "textnormal");
-       MathGridInset::metrics(mi);
+       InsetMathGrid::metrics(mi);
        dim = dim_;
 }
 
 
-void MathParInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathPar::draw(PainterInfo & pi, int x, int y) const
 {
        FontSetChanger dummy1(pi.base, "textnormal");
-       MathGridInset::draw(pi, x, y);
+       InsetMathGrid::draw(pi, x, y);
 }
 
 
-void MathParInset::write(WriteStream & os) const
+void InsetMathPar::write(WriteStream & os) const
 {
        for (idx_type i = 0; i < nargs(); ++i)
                os << cell(i) << "\n";
 }
 
 
-void MathParInset::infoize(std::ostream & os) const
+void InsetMathPar::infoize(std::ostream & os) const
 {
        os << "Type: Paragraph ";
 }
 
 
-auto_ptr<InsetBase> MathParInset::doClone() const
+auto_ptr<InsetBase> InsetMathPar::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathParInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathPar(*this));
 }
index 0c32eb6354357948876ed522821b3c8eb6327024..eb03ffe42a0ed1ed1d968a8b59526d2b276128f1 100644 (file)
 
 #include "math_hullinset.h"
 
-class MathParInset : public MathHullInset {
+class InsetMathPar : public InsetMathHull {
 public:
        ///
-       MathParInset() {}
+       InsetMathPar() {}
        ///
-       MathParInset(MathArray const & ar);
+       InsetMathPar(MathArray const & ar);
        ///
        mode_type currentMode() const { return TEXT_MODE; }
        ///
index 6cf2817de303445b450f331fc8a3ba09f65cc501..8b1da5111accd7d6e99a0baa49c9365afbcf16ba 100644 (file)
@@ -85,13 +85,13 @@ using std::vector;
 
 namespace {
 
-MathInset::mode_type asMode(MathInset::mode_type oldmode, string const & str)
+InsetMath::mode_type asMode(InsetMath::mode_type oldmode, string const & str)
 {
        //lyxerr << "handling mode: '" << str << "'" << endl;
        if (str == "mathmode")
-               return MathInset::MATH_MODE;
+               return InsetMath::MATH_MODE;
        if (str == "textmode" || str == "forcetext")
-               return MathInset::TEXT_MODE;
+               return InsetMath::TEXT_MODE;
        return oldmode;
 }
 
@@ -108,7 +108,7 @@ bool stared(string const & s)
  * \returns wether the row could be added. Adding a row can fail for
  * environments like "equation" that have a fixed number of rows.
  */
-bool addRow(MathGridInset & grid, MathGridInset::row_type & cellrow,
+bool addRow(InsetMathGrid & grid, InsetMathGrid::row_type & cellrow,
            string const & vskip)
 {
        ++cellrow;
@@ -140,7 +140,7 @@ bool addRow(MathGridInset & grid, MathGridInset::row_type & cellrow,
  * \returns wether the column could be added. Adding a column can fail for
  * environments like "eqnarray" that have a fixed number of columns.
  */
-bool addCol(MathGridInset & grid, MathGridInset::col_type & cellcol)
+bool addCol(InsetMathGrid & grid, InsetMathGrid::col_type & cellcol)
 {
        ++cellcol;
        if (cellcol == grid.ncols()) {
@@ -175,10 +175,10 @@ bool addCol(MathGridInset & grid, MathGridInset::col_type & cellcol)
  * will result in a grid with 3 rows (+ the dummy row that is always present),
  * because the last '\\' opens a new row.
  */
-void delEmptyLastRow(MathGridInset & grid)
+void delEmptyLastRow(InsetMathGrid & grid)
 {
-       MathGridInset::row_type const row = grid.nrows() - 1;
-       for (MathGridInset::col_type col = 0; col < grid.ncols(); ++col) {
+       InsetMathGrid::row_type const row = grid.nrows() - 1;
+       for (InsetMathGrid::col_type col = 0; col < grid.ncols(); ++col) {
                if (!grid.cell(grid.index(row, col)).empty())
                        return;
        }
@@ -284,7 +284,7 @@ ostream & operator<<(ostream & os, Token const & t)
 class Parser {
 public:
        ///
-       typedef  MathInset::mode_type mode_type;
+       typedef  InsetMath::mode_type mode_type;
 
        ///
        Parser(LyXLex & lex);
@@ -296,7 +296,7 @@ public:
        ///
        void parse(MathArray & array, unsigned flags, mode_type mode);
        ///
-       void parse1(MathGridInset & grid, unsigned flags, mode_type mode,
+       void parse1(InsetMathGrid & grid, unsigned flags, mode_type mode,
                bool numbered);
        ///
        MathArray parse(unsigned flags, mode_type mode);
@@ -575,10 +575,10 @@ bool Parser::parse(MathAtom & at)
 {
        skipSpaces();
        MathArray ar;
-       parse(ar, false, MathInset::UNDECIDED_MODE);
+       parse(ar, false, InsetMath::UNDECIDED_MODE);
        if (ar.size() != 1 || ar.front()->getType() == hullNone) {
                lyxerr << "unusual contents found: " << ar << endl;
-               at = MathAtom(new MathParInset(ar));
+               at = MathAtom(new InsetMathPar(ar));
                //if (at->nargs() > 0)
                //      at.nucleus()->cell(0) = ar;
                //else
@@ -637,7 +637,7 @@ MathArray Parser::parse(unsigned flags, mode_type mode)
 
 void Parser::parse(MathArray & array, unsigned flags, mode_type mode)
 {
-       MathGridInset grid(1, 1);
+       InsetMathGrid grid(1, 1);
        parse1(grid, flags, mode, false);
        array = grid.cell(0);
 }
@@ -650,12 +650,12 @@ void Parser::parse2(MathAtom & at, const unsigned flags, const mode_type mode,
 }
 
 
-void Parser::parse1(MathGridInset & grid, unsigned flags,
+void Parser::parse1(InsetMathGrid & grid, unsigned flags,
        const mode_type mode, const bool numbered)
 {
        int limits = 0;
-       MathGridInset::row_type cellrow = 0;
-       MathGridInset::col_type cellcol = 0;
+       InsetMathGrid::row_type cellrow = 0;
+       InsetMathGrid::col_type cellcol = 0;
        MathArray * cell = &grid.cell(grid.index(cellrow, cellcol));
 
        if (grid.asHullInset())
@@ -721,19 +721,19 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                // cat codes
                //
                if (t.cat() == catMath) {
-                       if (mode != MathInset::MATH_MODE) {
+                       if (mode != InsetMath::MATH_MODE) {
                                // we are inside some text mode thingy, so opening new math is allowed
                                Token const & n = getToken();
                                if (n.cat() == catMath) {
                                        // TeX's $$...$$ syntax for displayed math
-                                       cell->push_back(MathAtom(new MathHullInset(hullEquation)));
-                                       parse2(cell->back(), FLAG_SIMPLE, MathInset::MATH_MODE, false);
+                                       cell->push_back(MathAtom(new InsetMathHull(hullEquation)));
+                                       parse2(cell->back(), FLAG_SIMPLE, InsetMath::MATH_MODE, false);
                                        getToken(); // skip the second '$' token
                                } else {
                                        // simple $...$  stuff
                                        putback();
-                                       cell->push_back(MathAtom(new MathHullInset(hullSimple)));
-                                       parse2(cell->back(), FLAG_SIMPLE, MathInset::MATH_MODE, false);
+                                       cell->push_back(MathAtom(new InsetMathHull(hullSimple)));
+                                       parse2(cell->back(), FLAG_SIMPLE, InsetMath::MATH_MODE, false);
                                }
                        }
 
@@ -749,16 +749,16 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                }
 
                else if (t.cat() == catLetter)
-                       cell->push_back(MathAtom(new MathCharInset(t.character())));
+                       cell->push_back(MathAtom(new InsetMathChar(t.character())));
 
-               else if (t.cat() == catSpace && mode != MathInset::MATH_MODE) {
+               else if (t.cat() == catSpace && mode != InsetMath::MATH_MODE) {
                        if (cell->empty() || cell->back()->getChar() != ' ')
-                               cell->push_back(MathAtom(new MathCharInset(t.character())));
+                               cell->push_back(MathAtom(new InsetMathChar(t.character())));
                }
 
-               else if (t.cat() == catNewline && mode != MathInset::MATH_MODE) {
+               else if (t.cat() == catNewline && mode != InsetMath::MATH_MODE) {
                        if (cell->empty() || cell->back()->getChar() != ' ')
-                               cell->push_back(MathAtom(new MathCharInset(' ')));
+                               cell->push_back(MathAtom(new InsetMathChar(' ')));
                }
 
                else if (t.cat() == catParameter) {
@@ -767,7 +767,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                }
 
                else if (t.cat() == catActive)
-                       cell->push_back(MathAtom(new MathCharInset(t.character())));
+                       cell->push_back(MathAtom(new InsetMathChar(t.character())));
 
                else if (t.cat() == catBegin) {
                        MathArray ar;
@@ -777,7 +777,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        if (ar.size() == 1 && ar[0]->extraBraces())
                                cell->append(ar);
                        else
-                               cell->push_back(MathAtom(new MathBraceInset(ar)));
+                               cell->push_back(MathAtom(new InsetMathBrace(ar)));
                }
 
                else if (t.cat() == catEnd) {
@@ -802,15 +802,15 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        // we need no new script inset if the last thing was a scriptinset,
                        // which has that script already not the same script already
                        if (!cell->size())
-                               cell->push_back(MathAtom(new MathScriptInset(up)));
+                               cell->push_back(MathAtom(new InsetMathScript(up)));
                        else if (cell->back()->asScriptInset() &&
                                        !cell->back()->asScriptInset()->has(up))
                                cell->back().nucleus()->asScriptInset()->ensure(up);
                        else if (cell->back()->asScriptInset())
-                               cell->push_back(MathAtom(new MathScriptInset(up)));
+                               cell->push_back(MathAtom(new InsetMathScript(up)));
                        else
-                               cell->back() = MathAtom(new MathScriptInset(cell->back(), up));
-                       MathScriptInset * p = cell->back().nucleus()->asScriptInset();
+                               cell->back() = MathAtom(new InsetMathScript(cell->back(), up));
+                       InsetMathScript * p = cell->back().nucleus()->asScriptInset();
                        // special handling of {}-bases
                        // is this always correct?
                        if (p->nuc().size() == 1 
@@ -829,7 +829,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                }
 
                else if (t.cat() == catOther)
-                       cell->push_back(MathAtom(new MathCharInset(t.character())));
+                       cell->push_back(MathAtom(new InsetMathChar(t.character())));
 
                else if (t.cat() == catComment) {
                        string s;
@@ -839,7 +839,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                                        break;
                                s += t.asString();
                        }
-                       cell->push_back(MathAtom(new MathCommentInset(s)));
+                       cell->push_back(MathAtom(new InsetMathComment(s)));
                        skipSpaces();
                }
 
@@ -893,11 +893,11 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        }
 
                        MathArray ar1;
-                       parse(ar1, FLAG_ITEM, MathInset::UNDECIDED_MODE);
+                       parse(ar1, FLAG_ITEM, InsetMath::UNDECIDED_MODE);
 
                        // we cannot handle recursive stuff at all
                        //MathArray test;
-                       //test.push_back(createMathInset(name));
+                       //test.push_back(createInsetMath(name));
                        //if (ar1.contains(test)) {
                        //      error("we cannot handle recursive macros at all.");
                        //      return;
@@ -907,20 +907,20 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        skipSpaces();
                        MathArray ar2;
                        if (nextToken().cat() == catBegin)
-                               parse(ar2, FLAG_ITEM, MathInset::MATH_MODE);
+                               parse(ar2, FLAG_ITEM, InsetMath::MATH_MODE);
 
                        cell->push_back(MathAtom(new MathMacroTemplate(name, nargs, type,
                                ar1, ar2)));
                }
 
                else if (t.cs() == "(") {
-                       cell->push_back(MathAtom(new MathHullInset(hullSimple)));
-                       parse2(cell->back(), FLAG_SIMPLE2, MathInset::MATH_MODE, false);
+                       cell->push_back(MathAtom(new InsetMathHull(hullSimple)));
+                       parse2(cell->back(), FLAG_SIMPLE2, InsetMath::MATH_MODE, false);
                }
 
                else if (t.cs() == "[") {
-                       cell->push_back(MathAtom(new MathHullInset(hullEquation)));
-                       parse2(cell->back(), FLAG_EQUATION, MathInset::MATH_MODE, false);
+                       cell->push_back(MathAtom(new InsetMathHull(hullEquation)));
+                       parse2(cell->back(), FLAG_EQUATION, InsetMath::MATH_MODE, false);
                }
 
                else if (t.cs() == "protect")
@@ -943,7 +943,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                                        environments_.pop_back();
                                        // Delete empty last row in matrix
                                        // like insets.
-                                       // If you abuse MathGridInset for
+                                       // If you abuse InsetMathGrid for
                                        // non-matrix like structures you
                                        // probably need to refine this test.
                                        // Right now we only have to test for
@@ -1037,17 +1037,17 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        MathArray ar;
                        parse(ar, FLAG_OPTION, mode);
                        if (ar.size()) {
-                               cell->push_back(MathAtom(new MathRootInset));
+                               cell->push_back(MathAtom(new InsetMathRoot));
                                cell->back().nucleus()->cell(0) = ar;
                                parse(cell->back().nucleus()->cell(1), FLAG_ITEM, mode);
                        } else {
-                               cell->push_back(MathAtom(new MathSqrtInset));
+                               cell->push_back(MathAtom(new InsetMathSqrt));
                                parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
                        }
                }
 
                else if (t.cs() == "xrightarrow" || t.cs() == "xleftarrow") {
-                       cell->push_back(createMathInset(t.cs()));
+                       cell->push_back(createInsetMath(t.cs()));
                        parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode);
                        parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
                }
@@ -1062,16 +1062,16 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                else if (t.cs() == "left") {
                        skipSpaces();
                        Token const & tl = getToken();
-                       // \| and \Vert are equivalent, and MathDelimInset
+                       // \| and \Vert are equivalent, and InsetMathDelim
                        // can't handle \|
-                       // FIXME: fix this in MathDelimInset itself!
+                       // FIXME: fix this in InsetMathDelim itself!
                        string const l = tl.cs() == "|" ? "Vert" : tl.asString();
                        MathArray ar;
                        parse(ar, FLAG_RIGHT, mode);
                        skipSpaces();
                        Token const & tr = getToken();
                        string const r = tr.cs() == "|" ? "Vert" : tr.asString();
-                       cell->push_back(MathAtom(new MathDelimInset(l, r, ar)));
+                       cell->push_back(MathAtom(new InsetMathDelim(l, r, ar)));
                }
 
                else if (t.cs() == "right") {
@@ -1089,90 +1089,90 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        if (name == "array" || name == "subarray") {
                                string const valign = parse_verbatim_option() + 'c';
                                string const halign = parse_verbatim_item();
-                               cell->push_back(MathAtom(new MathArrayInset(name, valign[0], halign)));
+                               cell->push_back(MathAtom(new InsetMathArray(name, valign[0], halign)));
                                parse2(cell->back(), FLAG_END, mode, false);
                        }
 
                        else if (name == "tabular") {
                                string const valign = parse_verbatim_option() + 'c';
                                string const halign = parse_verbatim_item();
-                               cell->push_back(MathAtom(new MathTabularInset(name, valign[0], halign)));
-                               parse2(cell->back(), FLAG_END, MathInset::TEXT_MODE, false);
+                               cell->push_back(MathAtom(new InsetMathTabular(name, valign[0], halign)));
+                               parse2(cell->back(), FLAG_END, InsetMath::TEXT_MODE, false);
                        }
 
                        else if (name == "split" || name == "cases" ||
                                 name == "gathered" || name == "aligned") {
-                               cell->push_back(createMathInset(name));
+                               cell->push_back(createInsetMath(name));
                                parse2(cell->back(), FLAG_END, mode, false);
                        }
 
                        else if (name == "alignedat") {
                                // ignore this for a while
                                getArg('{', '}');
-                               cell->push_back(createMathInset(name));
+                               cell->push_back(createInsetMath(name));
                                parse2(cell->back(), FLAG_END, mode, false);
                        }
 
                        else if (name == "math") {
-                               cell->push_back(MathAtom(new MathHullInset(hullSimple)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, true);
+                               cell->push_back(MathAtom(new InsetMathHull(hullSimple)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, true);
                        }
 
                        else if (name == "equation" || name == "equation*"
                                        || name == "displaymath") {
-                               cell->push_back(MathAtom(new MathHullInset(hullEquation)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, (name == "equation"));
+                               cell->push_back(MathAtom(new InsetMathHull(hullEquation)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, (name == "equation"));
                        }
 
                        else if (name == "eqnarray" || name == "eqnarray*") {
-                               cell->push_back(MathAtom(new MathHullInset(hullEqnArray)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+                               cell->push_back(MathAtom(new InsetMathHull(hullEqnArray)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, !stared(name));
                        }
 
                        else if (name == "align" || name == "align*") {
-                               cell->push_back(MathAtom(new MathHullInset(hullAlign)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+                               cell->push_back(MathAtom(new InsetMathHull(hullAlign)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, !stared(name));
                        }
 
                        else if (name == "flalign" || name == "flalign*") {
-                               cell->push_back(MathAtom(new MathHullInset(hullFlAlign)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+                               cell->push_back(MathAtom(new InsetMathHull(hullFlAlign)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, !stared(name));
                        }
 
                        else if (name == "alignat" || name == "alignat*") {
                                // ignore this for a while
                                getArg('{', '}');
-                               cell->push_back(MathAtom(new MathHullInset(hullAlignAt)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+                               cell->push_back(MathAtom(new InsetMathHull(hullAlignAt)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, !stared(name));
                        }
 
                        else if (name == "xalignat" || name == "xalignat*") {
                                // ignore this for a while
                                getArg('{', '}');
-                               cell->push_back(MathAtom(new MathHullInset(hullXAlignAt)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+                               cell->push_back(MathAtom(new InsetMathHull(hullXAlignAt)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, !stared(name));
                        }
 
                        else if (name == "xxalignat") {
                                // ignore this for a while
                                getArg('{', '}');
-                               cell->push_back(MathAtom(new MathHullInset(hullXXAlignAt)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+                               cell->push_back(MathAtom(new InsetMathHull(hullXXAlignAt)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, !stared(name));
                        }
 
                        else if (name == "multline" || name == "multline*") {
-                               cell->push_back(MathAtom(new MathHullInset(hullMultline)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+                               cell->push_back(MathAtom(new InsetMathHull(hullMultline)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, !stared(name));
                        }
 
                        else if (name == "gather" || name == "gather*") {
-                               cell->push_back(MathAtom(new MathHullInset(hullGather)));
-                               parse2(cell->back(), FLAG_END, MathInset::MATH_MODE, !stared(name));
+                               cell->push_back(MathAtom(new InsetMathHull(hullGather)));
+                               parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, !stared(name));
                        }
 
                        else if (latexkeys const * l = in_word_set(name)) {
                                if (l->inset == "matrix") {
-                                       cell->push_back(createMathInset(name));
+                                       cell->push_back(createInsetMath(name));
                                        parse2(cell->back(), FLAG_END, mode, false);
                                }
                        }
@@ -1181,7 +1181,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                                dump();
                                lyxerr << "found unknown math environment '" << name << "'" << endl;
                                // create generic environment inset
-                               cell->push_back(MathAtom(new MathEnvInset(name)));
+                               cell->push_back(MathAtom(new InsetMathEnv(name)));
                                parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
                        }
                }
@@ -1201,7 +1201,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                                if (isValidLength(s))
                                        break;
                        }
-                       cell->push_back(MathAtom(new MathKernInset(s)));
+                       cell->push_back(MathAtom(new InsetMathKern(s)));
                }
 
                else if (t.cs() == "label") {
@@ -1212,13 +1212,13 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        if (grid.asHullInset()) {
                                grid.asHullInset()->label(cellrow, label);
                        } else {
-                               cell->push_back(createMathInset(t.cs()));
-                               cell->push_back(MathAtom(new MathBraceInset(ar)));
+                               cell->push_back(createInsetMath(t.cs()));
+                               cell->push_back(MathAtom(new InsetMathBrace(ar)));
                        }
                }
 
                else if (t.cs() == "choose" || t.cs() == "over" || t.cs() == "atop") {
-                       MathAtom at = createMathInset(t.cs());
+                       MathAtom at = createInsetMath(t.cs());
                        at.nucleus()->cell(0) = *cell;
                        cell->clear();
                        parse(at.nucleus()->cell(1), flags, mode);
@@ -1228,60 +1228,60 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
 
                else if (t.cs() == "color") {
                        string const color = parse_verbatim_item();
-                       cell->push_back(MathAtom(new MathColorInset(true, color)));
+                       cell->push_back(MathAtom(new InsetMathColor(true, color)));
                        parse(cell->back().nucleus()->cell(0), flags, mode);
                        return;
                }
 
                else if (t.cs() == "textcolor") {
                        string const color = parse_verbatim_item();
-                       cell->push_back(MathAtom(new MathColorInset(false, color)));
-                       parse(cell->back().nucleus()->cell(0), FLAG_ITEM, MathInset::TEXT_MODE);
+                       cell->push_back(MathAtom(new InsetMathColor(false, color)));
+                       parse(cell->back().nucleus()->cell(0), FLAG_ITEM, InsetMath::TEXT_MODE);
                }
 
                else if (t.cs() == "normalcolor") {
-                       cell->push_back(createMathInset(t.cs()));
+                       cell->push_back(createInsetMath(t.cs()));
                        parse(cell->back().nucleus()->cell(0), flags, mode);
                        return;
                }
 
                else if (t.cs() == "substack") {
-                       cell->push_back(createMathInset(t.cs()));
+                       cell->push_back(createInsetMath(t.cs()));
                        parse2(cell->back(), FLAG_ITEM, mode, false);
                }
 
                else if (t.cs() == "xymatrix") {
-                       cell->push_back(createMathInset(t.cs()));
+                       cell->push_back(createInsetMath(t.cs()));
                        parse2(cell->back(), FLAG_ITEM, mode, false);
                }
 
                else if (t.cs() == "framebox" || t.cs() == "makebox") {
-                       cell->push_back(createMathInset(t.cs()));
-                       parse(cell->back().nucleus()->cell(0), FLAG_OPTION, MathInset::TEXT_MODE);
-                       parse(cell->back().nucleus()->cell(1), FLAG_OPTION, MathInset::TEXT_MODE);
-                       parse(cell->back().nucleus()->cell(2), FLAG_ITEM, MathInset::TEXT_MODE);
+                       cell->push_back(createInsetMath(t.cs()));
+                       parse(cell->back().nucleus()->cell(0), FLAG_OPTION, InsetMath::TEXT_MODE);
+                       parse(cell->back().nucleus()->cell(1), FLAG_OPTION, InsetMath::TEXT_MODE);
+                       parse(cell->back().nucleus()->cell(2), FLAG_ITEM, InsetMath::TEXT_MODE);
                }
 
                else if (t.cs() == "tag") {
                        if (nextToken().character() == '*') {
                                getToken();
-                               cell->push_back(createMathInset(t.cs() + '*'));
+                               cell->push_back(createInsetMath(t.cs() + '*'));
                        } else
-                               cell->push_back(createMathInset(t.cs()));
-                       parse(cell->back().nucleus()->cell(0), FLAG_ITEM, MathInset::TEXT_MODE);
+                               cell->push_back(createInsetMath(t.cs()));
+                       parse(cell->back().nucleus()->cell(0), FLAG_ITEM, InsetMath::TEXT_MODE);
                }
 
 #if 0
                else if (t.cs() == "infer") {
                        MathArray ar;
                        parse(ar, FLAG_OPTION, mode);
-                       cell->push_back(createMathInset(t.cs()));
+                       cell->push_back(createInsetMath(t.cs()));
                        parse2(cell->back(), FLAG_ITEM, mode, false);
                }
 
                // Disabled
                else if (1 && t.cs() == "ar") {
-                       auto_ptr<MathXYArrowInset> p(new MathXYArrowInset);
+                       auto_ptr<InsetMathXYArrow> p(new InsetMathXYArrow);
                        // try to read target
                        parse(p->cell(0), FLAG_OTPTION, mode);
                        // try to read label
@@ -1303,24 +1303,24 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                                if (l->inset == "big") {
                                        skipSpaces();
                                        string const delim = getToken().asInput();
-                                       if (MathBigInset::isBigInsetDelim(delim))
+                                       if (InsetMathBig::isBigInsetDelim(delim))
                                                cell->push_back(MathAtom(
-                                                       new MathBigInset(t.cs(), delim)));
+                                                       new InsetMathBig(t.cs(), delim)));
                                        else {
-                                               cell->push_back(createMathInset(t.cs()));
-                                               cell->push_back(createMathInset(
+                                               cell->push_back(createInsetMath(t.cs()));
+                                               cell->push_back(createInsetMath(
                                                                delim.substr(1)));
                                        }
                                }
 
                                else if (l->inset == "font") {
-                                       cell->push_back(createMathInset(t.cs()));
+                                       cell->push_back(createInsetMath(t.cs()));
                                        parse(cell->back().nucleus()->cell(0),
                                                FLAG_ITEM, asMode(mode, l->extra));
                                }
 
                                else if (l->inset == "oldfont") {
-                                       cell->push_back(createMathInset(t.cs()));
+                                       cell->push_back(createInsetMath(t.cs()));
                                        parse(cell->back().nucleus()->cell(0),
                                                flags | FLAG_ALIGN, asMode(mode, l->extra));
                                        if (prevToken().cat() != catAlign &&
@@ -1330,7 +1330,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                                }
 
                                else if (l->inset == "style") {
-                                       cell->push_back(createMathInset(t.cs()));
+                                       cell->push_back(createInsetMath(t.cs()));
                                        parse(cell->back().nucleus()->cell(0),
                                                flags | FLAG_ALIGN, mode);
                                        if (prevToken().cat() != catAlign &&
@@ -1340,8 +1340,8 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                                }
 
                                else {
-                                       MathAtom at = createMathInset(t.cs());
-                                       for (MathInset::idx_type i = 0; i < at->nargs(); ++i)
+                                       MathAtom at = createInsetMath(t.cs());
+                                       for (InsetMath::idx_type i = 0; i < at->nargs(); ++i)
                                                parse(at.nucleus()->cell(i),
                                                        FLAG_ITEM, asMode(mode, l->extra));
                                        cell->push_back(at);
@@ -1349,22 +1349,22 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
                        }
 
                        else {
-                               MathAtom at = createMathInset(t.cs());
-                               MathInset::mode_type m = mode;
-                               //if (m == MathInset::UNDECIDED_MODE)
+                               MathAtom at = createInsetMath(t.cs());
+                               InsetMath::mode_type m = mode;
+                               //if (m == InsetMath::UNDECIDED_MODE)
                                //lyxerr << "default creation: m1: " << m << endl;
-                               if (at->currentMode() != MathInset::UNDECIDED_MODE)
+                               if (at->currentMode() != InsetMath::UNDECIDED_MODE)
                                        m = at->currentMode();
                                //lyxerr << "default creation: m2: " << m << endl;
-                               MathInset::idx_type start = 0;
+                               InsetMath::idx_type start = 0;
                                // this fails on \bigg[...\bigg]
                                //MathArray opt;
-                               //parse(opt, FLAG_OPTION, MathInset::VERBATIM_MODE);
+                               //parse(opt, FLAG_OPTION, InsetMath::VERBATIM_MODE);
                                //if (opt.size()) {
                                //      start = 1;
                                //      at.nucleus()->cell(0) = opt;
                                //}
-                               for (MathInset::idx_type i = start; i < at->nargs(); ++i) {
+                               for (InsetMath::idx_type i = start; i < at->nargs(); ++i) {
                                        parse(at.nucleus()->cell(i), FLAG_ITEM, m);
                                        skipSpaces();
                                }
@@ -1394,7 +1394,7 @@ void mathed_parse_cell(MathArray & ar, string const & str)
 
 void mathed_parse_cell(MathArray & ar, istream & is)
 {
-       Parser(is).parse(ar, 0, MathInset::MATH_MODE);
+       Parser(is).parse(ar, 0, InsetMath::MATH_MODE);
 }
 
 
@@ -1417,10 +1417,10 @@ bool mathed_parse_normal(MathAtom & t, LyXLex & lex)
 }
 
 
-void mathed_parse_normal(MathGridInset & grid, string const & str)
+void mathed_parse_normal(InsetMathGrid & grid, string const & str)
 {
        istringstream is(str);
-       Parser(is).parse1(grid, 0, MathInset::MATH_MODE, false);
+       Parser(is).parse1(grid, 0, InsetMath::MATH_MODE, false);
 }
 
 
index e2321c6b31c07afdffb4a7aba196915df2687eee..422ddea788c64488a6806524b71730a633228c52 100644 (file)
@@ -18,7 +18,7 @@
 
 class MathAtom;
 class MathArray;
-class MathGridInset;
+class InsetMathGrid;
 class LyXLex;
 
 
@@ -50,7 +50,7 @@ bool mathed_parse_normal(MathAtom &, std::istream &);
 /// ... the LyX lexxer
 bool mathed_parse_normal(MathAtom &, LyXLex &);
 /// ... the LyX lexxer
-void mathed_parse_normal(MathGridInset &, std::string const &);
+void mathed_parse_normal(InsetMathGrid &, std::string const &);
 
 /// parse a single cell from a string
 void mathed_parse_cell(MathArray & ar, std::string const &);
index 976fdb66fa47321c8e939a81c6ae6ec461ac7d3a..f87f357c710206a5c445a98bd9294c7ad81fc0dd 100644 (file)
 #include "support/std_ostream.h"
 
 
-MathPhantomInset::MathPhantomInset(Kind k)
-       : MathNestInset(1), kind_(k)
+InsetMathPhantom::InsetMathPhantom(Kind k)
+       : InsetMathNest(1), kind_(k)
 {}
 
 
-std::auto_ptr<InsetBase> MathPhantomInset::doClone() const
+std::auto_ptr<InsetBase> InsetMathPhantom::doClone() const
 {
-       return std::auto_ptr<InsetBase>(new MathPhantomInset(*this));
+       return std::auto_ptr<InsetBase>(new InsetMathPhantom(*this));
 }
 
 
-void MathPhantomInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathPhantom::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
@@ -40,7 +40,7 @@ void MathPhantomInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathPhantomInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
 {
        static int const arrow_size = 4;
 
@@ -118,7 +118,7 @@ void MathPhantomInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathPhantomInset::write(WriteStream & os) const
+void InsetMathPhantom::write(WriteStream & os) const
 {
        switch (kind_) {
        case phantom:
@@ -135,7 +135,7 @@ void MathPhantomInset::write(WriteStream & os) const
 }
 
 
-void MathPhantomInset::normalize(NormalStream & os) const
+void InsetMathPhantom::normalize(NormalStream & os) const
 {
        switch (kind_) {
        case phantom:
@@ -152,7 +152,7 @@ void MathPhantomInset::normalize(NormalStream & os) const
 }
 
 
-void MathPhantomInset::infoize(std::ostream & os) const
+void InsetMathPhantom::infoize(std::ostream & os) const
 {
        switch (kind_) {
        case phantom:
index ef4ca6130ef1e5804aa960119531535202b3ca2c..ad5906afa9e4f662a424752e0806c272639f0622 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "math_nestinset.h"
 
-class MathPhantomInset : public MathNestInset {
+class InsetMathPhantom : public InsetMathNest {
 public:
        ///
        enum Kind {
@@ -23,7 +23,7 @@ public:
                hphantom
        };
        ///
-       explicit MathPhantomInset(Kind);
+       explicit InsetMathPhantom(Kind);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index 8822ae1bf533b2622bd86c1557bb17f335bd2148..ac38bad208762e2601dccb9b0e8d90f59240799e 100644 (file)
@@ -24,20 +24,20 @@ using std::auto_ptr;
 
 
 
-MathRootInset::MathRootInset()
-       : MathNestInset(2)
+InsetMathRoot::InsetMathRoot()
+       : InsetMathNest(2)
 {}
 
 
-auto_ptr<InsetBase> MathRootInset::doClone() const
+auto_ptr<InsetBase> InsetMathRoot::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathRootInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathRoot(*this));
 }
 
 
-void MathRootInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathRoot::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       MathNestInset::metrics(mi);
+       InsetMathNest::metrics(mi);
        dim.asc = max(cell(0).ascent()  + 5, cell(1).ascent())  + 2;
        dim.des = max(cell(1).descent() + 5, cell(0).descent()) + 2;
        dim.wid = cell(0).width() + cell(1).width() + 10;
@@ -46,7 +46,7 @@ void MathRootInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathRootInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathRoot::draw(PainterInfo & pi, int x, int y) const
 {
        int const w = cell(0).width();
        // the "exponent"
@@ -68,19 +68,19 @@ void MathRootInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathRootInset::write(WriteStream & os) const
+void InsetMathRoot::write(WriteStream & os) const
 {
        os << "\\sqrt[" << cell(0) << "]{" << cell(1) << '}';
 }
 
 
-void MathRootInset::normalize(NormalStream & os) const
+void InsetMathRoot::normalize(NormalStream & os) const
 {
        os << "[root " << cell(0) << ' ' << cell(1) << ']';
 }
 
 
-bool MathRootInset::idxUpDown(LCursor & cur, bool up) const
+bool InsetMathRoot::idxUpDown(LCursor & cur, bool up) const
 {
        LCursor::idx_type const target = up ? 0 : 1;
        if (cur.idx() == target)
@@ -91,19 +91,19 @@ bool MathRootInset::idxUpDown(LCursor & cur, bool up) const
 }
 
 
-void MathRootInset::maple(MapleStream & os) const
+void InsetMathRoot::maple(MapleStream & os) const
 {
        os << '(' << cell(1) << ")^(1/(" << cell(0) <<"))";
 }
 
 
-void MathRootInset::octave(OctaveStream & os) const
+void InsetMathRoot::octave(OctaveStream & os) const
 {
        os << "root(" << cell(1) << ',' << cell(0) << ')';
 }
 
 
-void MathRootInset::mathmlize(MathMLStream & os) const
+void InsetMathRoot::mathmlize(MathMLStream & os) const
 {
        os << MTag("mroot") << cell(1) << cell(0) << ETag("mroot");
 }
index 19e762930023b28433fb49f7410ea5b9add59387..952401089b595fc3a04f51984ba9ce3fab20ff6f 100644 (file)
 
 
 /// The general n-th root inset.
-class MathRootInset : public MathNestInset {
+class InsetMathRoot : public InsetMathNest {
 public:
        ///
-       MathRootInset();
+       InsetMathRoot();
        ///
        bool idxUpDown(LCursor & cur, bool up) const;
        ///
index d6bd64c06ad4c0f8616432e9d0b13164d11bf34c..5c09f268c079e91317a32b87127e2ba4d5fb62c8 100644 (file)
@@ -32,43 +32,43 @@ using std::endl;
 
 
 
-MathScriptInset::MathScriptInset()
-       : MathNestInset(1), cell_1_is_up_(false), limits_(0)
+InsetMathScript::InsetMathScript()
+       : InsetMathNest(1), cell_1_is_up_(false), limits_(0)
 {}
 
 
-MathScriptInset::MathScriptInset(bool up)
-       : MathNestInset(2), cell_1_is_up_(up), limits_(0)
+InsetMathScript::InsetMathScript(bool up)
+       : InsetMathNest(2), cell_1_is_up_(up), limits_(0)
 {}
 
 
-MathScriptInset::MathScriptInset(MathAtom const & at, bool up)
-       : MathNestInset(2), cell_1_is_up_(up), limits_(0)
+InsetMathScript::InsetMathScript(MathAtom const & at, bool up)
+       : InsetMathNest(2), cell_1_is_up_(up), limits_(0)
 {
        BOOST_ASSERT(nargs() >= 1);
        cell(0).push_back(at);
 }
 
 
-auto_ptr<InsetBase> MathScriptInset::doClone() const
+auto_ptr<InsetBase> InsetMathScript::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathScriptInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathScript(*this));
 }
 
 
-MathScriptInset const * MathScriptInset::asScriptInset() const
+InsetMathScript const * InsetMathScript::asScriptInset() const
 {
        return this;
 }
 
 
-MathScriptInset * MathScriptInset::asScriptInset()
+InsetMathScript * InsetMathScript::asScriptInset()
 {
        return this;
 }
 
 
-bool MathScriptInset::idxFirst(LCursor & cur) const
+bool InsetMathScript::idxFirst(LCursor & cur) const
 {
        cur.idx() = 0;
        cur.pos() = 0;
@@ -76,7 +76,7 @@ bool MathScriptInset::idxFirst(LCursor & cur) const
 }
 
 
-bool MathScriptInset::idxLast(LCursor & cur) const
+bool InsetMathScript::idxLast(LCursor & cur) const
 {
        cur.idx() = 0;
        cur.pos() = nuc().size();
@@ -84,7 +84,7 @@ bool MathScriptInset::idxLast(LCursor & cur) const
 }
 
 
-MathArray const & MathScriptInset::down() const
+MathArray const & InsetMathScript::down() const
 {
        if (nargs() == 3)
                return cell(2);
@@ -93,7 +93,7 @@ MathArray const & MathScriptInset::down() const
 }
 
 
-MathArray & MathScriptInset::down()
+MathArray & InsetMathScript::down()
 {
        if (nargs() == 3)
                return cell(2);
@@ -102,21 +102,21 @@ MathArray & MathScriptInset::down()
 }
 
 
-MathArray const & MathScriptInset::up() const
+MathArray const & InsetMathScript::up() const
 {
        BOOST_ASSERT(nargs() > 1);
        return cell(1);
 }
 
 
-MathArray & MathScriptInset::up()
+MathArray & InsetMathScript::up()
 {
        BOOST_ASSERT(nargs() > 1);
        return cell(1);
 }
 
 
-void MathScriptInset::ensure(bool up)
+void InsetMathScript::ensure(bool up)
 {
        if (nargs() == 1) {
                // just nucleus so far
@@ -133,19 +133,19 @@ void MathScriptInset::ensure(bool up)
 }
 
 
-MathArray const & MathScriptInset::nuc() const
+MathArray const & InsetMathScript::nuc() const
 {
        return cell(0);
 }
 
 
-MathArray & MathScriptInset::nuc()
+MathArray & InsetMathScript::nuc()
 {
        return cell(0);
 }
 
 
-int MathScriptInset::dy0() const
+int InsetMathScript::dy0() const
 {
        int nd = ndes();
        if (!hasDown())
@@ -159,7 +159,7 @@ int MathScriptInset::dy0() const
 }
 
 
-int MathScriptInset::dy1() const
+int InsetMathScript::dy1() const
 {
        int na = nasc();
        if (!hasUp())
@@ -174,45 +174,45 @@ int MathScriptInset::dy1() const
 }
 
 
-int MathScriptInset::dx0() const
+int InsetMathScript::dx0() const
 {
        BOOST_ASSERT(hasDown());
        return hasLimits() ? (dim_.wid - down().width()) / 2 : nwid();
 }
 
 
-int MathScriptInset::dx1() const
+int InsetMathScript::dx1() const
 {
        BOOST_ASSERT(hasUp());
        return hasLimits() ? (dim_.wid - up().width()) / 2 : nwid();
 }
 
 
-int MathScriptInset::dxx() const
+int InsetMathScript::dxx() const
 {
        return hasLimits() ? (dim_.wid - nwid()) / 2  :  0;
 }
 
 
-int MathScriptInset::nwid() const
+int InsetMathScript::nwid() const
 {
        return nuc().size() ? nuc().width() : 2;
 }
 
 
-int MathScriptInset::nasc() const
+int InsetMathScript::nasc() const
 {
        return nuc().size() ? nuc().ascent() : 5;
 }
 
 
-int MathScriptInset::ndes() const
+int InsetMathScript::ndes() const
 {
        return nuc().size() ? nuc().descent() : 0;
 }
 
 
-void MathScriptInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathScript::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi);
        ScriptChanger dummy(mi.base);
@@ -241,7 +241,7 @@ void MathScriptInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathScriptInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathScript::draw(PainterInfo & pi, int x, int y) const
 {
        if (nuc().size())
                nuc().draw(pi, x + dxx(), y);
@@ -259,7 +259,7 @@ void MathScriptInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathScriptInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
+void InsetMathScript::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 {
        if (hasUp())
                up().metricsT(mi, dim);
@@ -269,7 +269,7 @@ void MathScriptInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) cons
 }
 
 
-void MathScriptInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathScript::drawT(TextPainter & pain, int x, int y) const
 {
        if (nuc().size())
                nuc().drawT(pain, x + dxx(), y);
@@ -281,7 +281,7 @@ void MathScriptInset::drawT(TextPainter & pain, int x, int y) const
 
 
 
-bool MathScriptInset::hasLimits() const
+bool InsetMathScript::hasLimits() const
 {
        // obvious cases
        if (limits_ == 1)
@@ -309,7 +309,7 @@ bool MathScriptInset::hasLimits() const
 }
 
 
-void MathScriptInset::removeScript(bool up)
+void InsetMathScript::removeScript(bool up)
 {
        if (nargs() == 2) {
                if (up == cell_1_is_up_)
@@ -326,13 +326,13 @@ void MathScriptInset::removeScript(bool up)
 }
 
 
-bool MathScriptInset::has(bool up) const
+bool InsetMathScript::has(bool up) const
 {
        return idxOfScript(up);
 }
 
 
-bool MathScriptInset::hasUp() const
+bool InsetMathScript::hasUp() const
 {
        //lyxerr << "1up: " << bool(cell_1_is_up_) << endl;
        //lyxerr << "hasUp: " << bool(idxOfScript(true)) << endl;
@@ -340,7 +340,7 @@ bool MathScriptInset::hasUp() const
 }
 
 
-bool MathScriptInset::hasDown() const
+bool InsetMathScript::hasDown() const
 {
        //lyxerr << "1up: " << bool(cell_1_is_up_) << endl;
        //lyxerr << "hasDown: " << bool(idxOfScript(false)) << endl;
@@ -348,7 +348,7 @@ bool MathScriptInset::hasDown() const
 }
 
 
-InsetBase::idx_type MathScriptInset::idxOfScript(bool up) const
+InsetBase::idx_type InsetMathScript::idxOfScript(bool up) const
 {
        if (nargs() == 1)
                return 0;
@@ -362,19 +362,19 @@ InsetBase::idx_type MathScriptInset::idxOfScript(bool up) const
 }
 
 
-bool MathScriptInset::idxRight(LCursor &) const
+bool InsetMathScript::idxRight(LCursor &) const
 {
        return false;
 }
 
 
-bool MathScriptInset::idxLeft(LCursor &) const
+bool InsetMathScript::idxLeft(LCursor &) const
 {
        return false;
 }
 
 
-bool MathScriptInset::idxUpDown(LCursor & cur, bool up) const
+bool InsetMathScript::idxUpDown(LCursor & cur, bool up) const
 {
        // in nucleus?
        if (cur.idx() == 0) {
@@ -417,7 +417,7 @@ bool MathScriptInset::idxUpDown(LCursor & cur, bool up) const
 }
 
 
-void MathScriptInset::write(WriteStream & os) const
+void InsetMathScript::write(WriteStream & os) const
 {
        if (nuc().size()) {
                if (nuc().size() == 1 
@@ -450,7 +450,7 @@ void MathScriptInset::write(WriteStream & os) const
 }
 
 
-void MathScriptInset::normalize(NormalStream & os) const
+void InsetMathScript::normalize(NormalStream & os) const
 {
        bool d = hasDown() && down().size();
        bool u = hasUp() && up().size();
@@ -476,7 +476,7 @@ void MathScriptInset::normalize(NormalStream & os) const
 }
 
 
-void MathScriptInset::maple(MapleStream & os) const
+void InsetMathScript::maple(MapleStream & os) const
 {
        if (nuc().size())
                os << nuc();
@@ -487,7 +487,7 @@ void MathScriptInset::maple(MapleStream & os) const
 }
 
 
-void MathScriptInset::mathematica(MathematicaStream & os) const
+void InsetMathScript::mathematica(MathematicaStream & os) const
 {
        bool d = hasDown() && down().size();
        bool u = hasUp() && up().size();
@@ -509,7 +509,7 @@ void MathScriptInset::mathematica(MathematicaStream & os) const
 }
 
 
-void MathScriptInset::mathmlize(MathMLStream & os) const
+void InsetMathScript::mathmlize(MathMLStream & os) const
 {
        bool d = hasDown() && down().size();
        bool u = hasUp() && up().size();
@@ -535,7 +535,7 @@ void MathScriptInset::mathmlize(MathMLStream & os) const
 }
 
 
-void MathScriptInset::octave(OctaveStream & os) const
+void InsetMathScript::octave(OctaveStream & os) const
 {
        if (nuc().size())
                os << nuc();
@@ -546,24 +546,24 @@ void MathScriptInset::octave(OctaveStream & os) const
 }
 
 
-void MathScriptInset::infoize(std::ostream & os) const
+void InsetMathScript::infoize(std::ostream & os) const
 {
        os << "Scripts";
 }
 
 
-void MathScriptInset::infoize2(std::ostream & os) const
+void InsetMathScript::infoize2(std::ostream & os) const
 {
        if (limits_)
                os << (limits_ == 1 ? ", Displayed limits" : ", Inlined limits");
 }
 
 
-bool MathScriptInset::notifyCursorLeaves(LCursor & cur)
+bool InsetMathScript::notifyCursorLeaves(LCursor & cur)
 {
-       MathNestInset::notifyCursorLeaves(cur);
+       InsetMathNest::notifyCursorLeaves(cur);
 
-       //lyxerr << "MathScriptInset::notifyCursorLeaves: 1 " << cur << endl;
+       //lyxerr << "InsetMathScript::notifyCursorLeaves: 1 " << cur << endl;
 
        // remove empty scripts if possible
        if (nargs() > 2) {
@@ -596,14 +596,14 @@ bool MathScriptInset::notifyCursorLeaves(LCursor & cur)
                return true;
        }
 
-       //lyxerr << "MathScriptInset::notifyCursorLeaves: 2 " << cur << endl;
+       //lyxerr << "InsetMathScript::notifyCursorLeaves: 2 " << cur << endl;
        return false;
 }
 
 
-void MathScriptInset::doDispatch(LCursor & cur, FuncRequest & cmd)
+void InsetMathScript::doDispatch(LCursor & cur, FuncRequest & cmd)
 {
-       //lyxerr << "MathScriptInset: request: " << cmd << std::endl;
+       //lyxerr << "InsetMathScript: request: " << cmd << std::endl;
 
        if (cmd.action == LFUN_MATH_LIMITS) {
                if (!cmd.argument().empty()) {
@@ -620,5 +620,5 @@ void MathScriptInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                return;
        }
 
-       MathNestInset::doDispatch(cur, cmd);
+       InsetMathNest::doDispatch(cur, cmd);
 }
index dbd58f3b8a54ce6269648d8bcd8a952b884e47ec..88fc3b3d5f40a26b6740a055b944e7ae1218dd9b 100644 (file)
 // cell 0.  If there is just one script, it's cell 1 and cell_1_is_up_
 // is set accordingly.  If both are used, cell 1 is up and cell 2 is down.
 
-class MathScriptInset : public MathNestInset {
+class InsetMathScript : public InsetMathNest {
 public:
        /// create inset without scripts
-       MathScriptInset();
+       InsetMathScript();
        /// create inset with single script
-       explicit MathScriptInset(bool up);
+       explicit InsetMathScript(bool up);
        /// create inset with single script and given nucleus
-       MathScriptInset(MathAtom const & at, bool up);
+       InsetMathScript(MathAtom const & at, bool up);
        ///
        mode_type currentMode() const { return MATH_MODE; }
        ///
@@ -63,9 +63,9 @@ public:
        void octave(OctaveStream &) const;
 
        /// identifies scriptinsets
-       MathScriptInset const * asScriptInset() const;
+       InsetMathScript const * asScriptInset() const;
        ///
-       MathScriptInset * asScriptInset();
+       InsetMathScript * asScriptInset();
 
        /// set limits
        void limits(int lim) { limits_ = lim; }
index 099e421694406a9cd9f88930cd9581e0db0b6363..ff098a0151f48960a1bbeac4c36fb9d03acb1b14 100644 (file)
 using std::auto_ptr;
 
 
-MathSizeInset::MathSizeInset(latexkeys const * l)
-       : MathNestInset(1), key_(l), style_(Styles(convert<int>(l->extra)))
+InsetMathSize::InsetMathSize(latexkeys const * l)
+       : InsetMathNest(1), key_(l), style_(Styles(convert<int>(l->extra)))
 {}
 
 
-auto_ptr<InsetBase> MathSizeInset::doClone() const
+auto_ptr<InsetBase> InsetMathSize::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathSizeInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathSize(*this));
 }
 
 
-void MathSizeInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathSize::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        StyleChanger dummy(mi.base, style_);
        cell(0).metrics(mi, dim);
@@ -42,7 +42,7 @@ void MathSizeInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathSizeInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathSize::draw(PainterInfo & pi, int x, int y) const
 {
        StyleChanger dummy(pi.base, style_);
        cell(0).draw(pi, x + 1, y);
@@ -50,19 +50,19 @@ void MathSizeInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathSizeInset::write(WriteStream & os) const
+void InsetMathSize::write(WriteStream & os) const
 {
        os << "{\\" << key_->name << ' ' << cell(0) << '}';
 }
 
 
-void MathSizeInset::normalize(NormalStream & os) const
+void InsetMathSize::normalize(NormalStream & os) const
 {
        os << '[' << key_->name << ' ' << cell(0) << ']';
 }
 
 
-void MathSizeInset::infoize(std::ostream & os) const
+void InsetMathSize::infoize(std::ostream & os) const
 {
        os << "Size: " << key_->name;
 }
index 5847ac1f1f2dd7edd8befadea99d831435bc2865..3864038d16da74b09152220dc4ec97c9b460380e 100644 (file)
 class latexkeys;
 
 /// An inset for \scriptsize etc.
-class MathSizeInset : public MathNestInset {
+class InsetMathSize : public InsetMathNest {
 public:
        ///
-       explicit MathSizeInset(latexkeys const * l);
+       explicit InsetMathSize(latexkeys const * l);
        /// we write extra braces in any case...
        bool extraBraces() const { return true; }
        ///
index 8f71fa0f8ec65d3c1553c9d77d7b971d8b804006..6bb8a8c217deae57ca1f9cd617eb34c21e9d70ef 100644 (file)
@@ -32,12 +32,12 @@ char const * latex_mathspace[] = {
 int const nSpace = sizeof(latex_mathspace)/sizeof(char *);
 
 
-MathSpaceInset::MathSpaceInset(int sp)
+InsetMathSpace::InsetMathSpace(int sp)
        : space_(sp)
 {}
 
 
-MathSpaceInset::MathSpaceInset(string const & name)
+InsetMathSpace::InsetMathSpace(string const & name)
        : space_(1)
 {
        for (int i = 0; i < nSpace; ++i)
@@ -46,13 +46,13 @@ MathSpaceInset::MathSpaceInset(string const & name)
 }
 
 
-auto_ptr<InsetBase> MathSpaceInset::doClone() const
+auto_ptr<InsetBase> InsetMathSpace::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathSpaceInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathSpace(*this));
 }
 
 
-int MathSpaceInset::width() const
+int InsetMathSpace::width() const
 {
        switch (space_) {
                case 0: return 6;
@@ -70,19 +70,19 @@ int MathSpaceInset::width() const
 }
 
 
-int MathSpaceInset::ascent() const
+int InsetMathSpace::ascent() const
 {
        return 4;
 }
 
 
-int MathSpaceInset::descent() const
+int InsetMathSpace::descent() const
 {
        return 0;
 }
 
 
-void MathSpaceInset::metrics(MetricsInfo &, Dimension & dim) const
+void InsetMathSpace::metrics(MetricsInfo &, Dimension & dim) const
 {
        dim.wid = width();
        dim.asc = ascent();
@@ -90,7 +90,7 @@ void MathSpaceInset::metrics(MetricsInfo &, Dimension & dim) const
 }
 
 
-void MathSpaceInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathSpace::draw(PainterInfo & pi, int x, int y) const
 {
        // Sadly, HP-UX CC can't handle that kind of initialization.
        // XPoint p[4] = {{++x, y-3}, {x, y}, {x+width-2, y}, {x+width-2, y-3}};
@@ -110,13 +110,13 @@ void MathSpaceInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathSpaceInset::incSpace()
+void InsetMathSpace::incSpace()
 {
        space_ = (space_ + 1) % (nSpace - 2);
 }
 
 
-void MathSpaceInset::validate(LaTeXFeatures & features) const
+void InsetMathSpace::validate(LaTeXFeatures & features) const
 {
        if (space_ >= 0 && space_< nSpace) {
                if ((latex_mathspace[space_] == string("negmedspace"))
@@ -126,30 +126,30 @@ void MathSpaceInset::validate(LaTeXFeatures & features) const
 }
 
 
-void MathSpaceInset::maple(MapleStream & os) const
+void InsetMathSpace::maple(MapleStream & os) const
 {
        os << ' ';
 }
 
-void MathSpaceInset::mathematica(MathematicaStream & os) const
+void InsetMathSpace::mathematica(MathematicaStream & os) const
 {
        os << ' ';
 }
 
 
-void MathSpaceInset::octave(OctaveStream & os) const
+void InsetMathSpace::octave(OctaveStream & os) const
 {
        os << ' ';
 }
 
 
-void MathSpaceInset::normalize(NormalStream & os) const
+void InsetMathSpace::normalize(NormalStream & os) const
 {
        os << "[space " << int(space_) << "] ";
 }
 
 
-void MathSpaceInset::write(WriteStream & os) const
+void InsetMathSpace::write(WriteStream & os) const
 {
        if (space_ >= 0 && space_ < nSpace) {
                os << '\\' << latex_mathspace[space_];
index c6fad086d4a618d470f974d2fdf4da04a795f30a..fd4d3b0aa71da70c6c68028b8f1bd8499581b153 100644 (file)
 
 
 /// Smart spaces
-class MathSpaceInset : public MathInset {
+class InsetMathSpace : public InsetMath {
 public:
        ///
-       explicit MathSpaceInset(int sp);
+       explicit InsetMathSpace(int sp);
        ///
-       explicit MathSpaceInset(std::string const & name);
+       explicit InsetMathSpace(std::string const & name);
        ///
-       MathSpaceInset const * asSpaceInset() const { return this; }
+       InsetMathSpace const * asSpaceInset() const { return this; }
        ///
-       MathSpaceInset * asSpaceInset() { return this; }
+       InsetMathSpace * asSpaceInset() { return this; }
        ///
        void incSpace();
        ///
index e1349cc926da45d4ec22180259cc2e67b5acfc1e..c8fe0fa98f6ed17880e13656dfca6859e63adfaa 100644 (file)
@@ -30,20 +30,20 @@ using std::string;
 using std::auto_ptr;
 
 
-MathSplitInset::MathSplitInset(string const & name)
-       : MathGridInset(1, 1), name_(name)
+InsetMathSplit::InsetMathSplit(string const & name)
+       : InsetMathGrid(1, 1), name_(name)
 {
        setDefaults();
 }
 
 
-auto_ptr<InsetBase> MathSplitInset::doClone() const
+auto_ptr<InsetBase> InsetMathSplit::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathSplitInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathSplit(*this));
 }
 
 
-char MathSplitInset::defaultColAlign(col_type col)
+char InsetMathSplit::defaultColAlign(col_type col)
 {
        if (name_ == "split")
                return 'l';
@@ -57,14 +57,14 @@ char MathSplitInset::defaultColAlign(col_type col)
 }
 
 
-void MathSplitInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathSplit::draw(PainterInfo & pi, int x, int y) const
 {
-       MathGridInset::draw(pi, x, y);
+       InsetMathGrid::draw(pi, x, y);
        setPosCache(pi, x, y);
 }
 
 
-bool MathSplitInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+bool InsetMathSplit::getStatus(LCursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
        switch (cmd.action) {
@@ -77,29 +77,29 @@ bool MathSplitInset::getStatus(LCursor & cur, FuncRequest const & cmd,
                        flag.enabled(false);
                        return true;
                }
-               return MathGridInset::getStatus(cur, cmd, flag);
+               return InsetMathGrid::getStatus(cur, cmd, flag);
        }
        default:
-               return MathGridInset::getStatus(cur, cmd, flag);
+               return InsetMathGrid::getStatus(cur, cmd, flag);
        }
 }
 
 
-void MathSplitInset::write(WriteStream & ws) const
+void InsetMathSplit::write(WriteStream & ws) const
 {
        if (ws.fragile())
                ws << "\\protect";
        ws << "\\begin{" << name_ << '}';
        if (name_ == "alignedat")
                ws << '{' << static_cast<unsigned int>((ncols() + 1)/2) << '}';
-       MathGridInset::write(ws);
+       InsetMathGrid::write(ws);
        if (ws.fragile())
                ws << "\\protect";
        ws << "\\end{" << name_ << "}\n";
 }
 
 
-void MathSplitInset::infoize(std::ostream & os) const
+void InsetMathSplit::infoize(std::ostream & os) const
 {
        string name = name_;
        name[0] = lyx::support::uppercase(name[0]);
@@ -107,8 +107,8 @@ void MathSplitInset::infoize(std::ostream & os) const
 }
 
 
-void MathSplitInset::validate(LaTeXFeatures & features) const
+void InsetMathSplit::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
 }
index db980147d11bf540c5f9f65fad87681569ed067d..41dd8d334f4ccd558999bf2082e2013f51f40c99 100644 (file)
 #include "math_gridinset.h"
 
 
-class MathSplitInset : public MathGridInset {
+class InsetMathSplit : public InsetMathGrid {
 public:
        ///
-       explicit MathSplitInset(std::string const & name);
+       explicit InsetMathSplit(std::string const & name);
 
        ///
        void draw(PainterInfo & pi, int x, int y) const;
index 4705ae78461cf74f8c202dc4f061c2f2a74d57ce..8e2a9eec3adf4f4f3aeaf4d9631429648c1bb913 100644 (file)
 using std::auto_ptr;
 
 
-MathSqrtInset::MathSqrtInset()
-       : MathNestInset(1)
+InsetMathSqrt::InsetMathSqrt()
+       : InsetMathNest(1)
 {}
 
 
-auto_ptr<InsetBase> MathSqrtInset::doClone() const
+auto_ptr<InsetBase> InsetMathSqrt::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathSqrtInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathSqrt(*this));
 }
 
 
-void MathSqrtInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathSqrt::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        dim.asc += 4;
@@ -42,7 +42,7 @@ void MathSqrtInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathSqrtInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathSqrt::draw(PainterInfo & pi, int x, int y) const
 {
        cell(0).draw(pi, x + 10, y);
        int const a = dim_.ascent();
@@ -58,7 +58,7 @@ void MathSqrtInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathSqrtInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
+void InsetMathSqrt::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 {
        cell(0).metricsT(mi, dim);
        dim.asc += 1;
@@ -66,7 +66,7 @@ void MathSqrtInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
 }
 
 
-void MathSqrtInset::drawT(TextPainter & pain, int x, int y) const
+void InsetMathSqrt::drawT(TextPainter & pain, int x, int y) const
 {
        cell(0).drawT(pain, x + 2, y);
        pain.horizontalLine(x + 2, y - cell(0).ascent(), cell(0).width(), '_');
@@ -75,35 +75,35 @@ void MathSqrtInset::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void MathSqrtInset::write(WriteStream & os) const
+void InsetMathSqrt::write(WriteStream & os) const
 {
        os << "\\sqrt{" << cell(0) << '}';
 }
 
 
-void MathSqrtInset::normalize(NormalStream & os) const
+void InsetMathSqrt::normalize(NormalStream & os) const
 {
        os << "[sqrt " << cell(0) << ']';
 }
 
-void MathSqrtInset::maple(MapleStream & os) const
+void InsetMathSqrt::maple(MapleStream & os) const
 {
        os << "sqrt(" << cell(0) << ')';
 }
 
-void MathSqrtInset::mathematica(MathematicaStream & os) const
+void InsetMathSqrt::mathematica(MathematicaStream & os) const
 {
        os << "Sqrt[" << cell(0) << ']';
 }
 
 
-void MathSqrtInset::octave(OctaveStream & os) const
+void InsetMathSqrt::octave(OctaveStream & os) const
 {
        os << "sqrt(" << cell(0) << ')';
 }
 
 
-void MathSqrtInset::mathmlize(MathMLStream & os) const
+void InsetMathSqrt::mathmlize(MathMLStream & os) const
 {
        os << MTag("msqrt") << cell(0) << ETag("msqrt");
 }
index b7679268425b7e62ad1f4cc24ab6ab09a03c84b5..c61e9c842e979b58f6cbd037be18759c49ea14d6 100644 (file)
 #include "math_nestinset.h"
 
 
-/// \c MathSqrtInset The square root inset.
-class MathSqrtInset : public MathNestInset {
+/// \c InsetMathSqrt The square root inset.
+class InsetMathSqrt : public InsetMathNest {
 public:
        ///
-       MathSqrtInset();
+       InsetMathSqrt();
        ///
        void draw(PainterInfo &, int x, int y) const;
        ///
index d5a1c5bfb5b600431115eea45f9304b4c4ab4f36..2274f11e9af079089c10f26891bb0c0fcea0f6b4 100644 (file)
@@ -19,17 +19,17 @@ using std::max;
 using std::auto_ptr;
 
 
-MathStackrelInset::MathStackrelInset()
+InsetMathStackrel::InsetMathStackrel()
 {}
 
 
-auto_ptr<InsetBase> MathStackrelInset::doClone() const
+auto_ptr<InsetBase> InsetMathStackrel::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathStackrelInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathStackrel(*this));
 }
 
 
-void MathStackrelInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(1).metrics(mi);
        FracChanger dummy(mi.base);
@@ -42,7 +42,7 @@ void MathStackrelInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathStackrelInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) const
 {
        int m  = x + dim_.width() / 2;
        int yo = y - cell(1).ascent() - cell(0).descent() - 1;
@@ -53,13 +53,13 @@ void MathStackrelInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathStackrelInset::write(WriteStream & os) const
+void InsetMathStackrel::write(WriteStream & os) const
 {
        os << "\\stackrel{" << cell(0) << "}{" << cell(1) << '}';
 }
 
 
-void MathStackrelInset::normalize(NormalStream & os) const
+void InsetMathStackrel::normalize(NormalStream & os) const
 {
        os << "[stackrel " << cell(0) << ' ' << cell(1) << ']';
 }
index 31f33f4c86595abf2e594720d9dce933ddeca3b4..baead40ab2cb8e016e6e3ccb6ff6decbd72bf50f 100644 (file)
  *
  * Full author contact details are available in file CREDITS.
  */
-class MathStackrelInset : public MathFracbaseInset {
+class InsetMathStackrel : public InsetMathFracBase {
 public:
        ///
-       MathStackrelInset();
+       InsetMathStackrel();
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index 79373f18ced28375e97f7a83e49e69f3d73b62d1..86a04606e7f5a4be33d527b0435c493dd142e672 100644 (file)
@@ -21,24 +21,24 @@ using std::string;
 using std::auto_ptr;
 
 
-MathStringInset::MathStringInset(string const & s)
+InsetMathString::InsetMathString(string const & s)
        : str_(s)
 {}
 
 
-auto_ptr<InsetBase> MathStringInset::doClone() const
+auto_ptr<InsetBase> InsetMathString::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathStringInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathString(*this));
 }
 
 
-void MathStringInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathString::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        mathed_string_dim(mi.base.font, str_, dim);
 }
 
 
-void MathStringInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathString::draw(PainterInfo & pi, int x, int y) const
 {
        //lyxerr << "drawing '" << str_ << "' code: " << code_ << endl;
         docstring dstr(str_.begin(), str_.end());
@@ -46,13 +46,13 @@ void MathStringInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathStringInset::normalize(NormalStream & os) const
+void InsetMathString::normalize(NormalStream & os) const
 {
        os << "[string " << str_ << ' ' << "mathalpha" << ']';
 }
 
 
-void MathStringInset::maple(MapleStream & os) const
+void InsetMathString::maple(MapleStream & os) const
 {
        if (/*code_ != LM_TC_VAR ||*/ str_.size() <= 1) {
                os << ' ' << str_ << ' ';
@@ -66,13 +66,13 @@ void MathStringInset::maple(MapleStream & os) const
 }
 
 
-void MathStringInset::mathematica(MathematicaStream & os) const
+void InsetMathString::mathematica(MathematicaStream & os) const
 {
        os << ' ' << str_ << ' ';
 }
 
 
-void MathStringInset::octave(OctaveStream & os) const
+void InsetMathString::octave(OctaveStream & os) const
 {
        if (/*code_ != LM_TC_VAR ||*/ str_.size() <= 1) {
                os << ' ' << str_ << ' ';
@@ -86,7 +86,7 @@ void MathStringInset::octave(OctaveStream & os) const
 }
 
 
-void MathStringInset::mathmlize(MathMLStream & os) const
+void InsetMathString::mathmlize(MathMLStream & os) const
 {
 /*
        if (code_ == LM_TC_VAR)
@@ -101,7 +101,7 @@ void MathStringInset::mathmlize(MathMLStream & os) const
 }
 
 
-void MathStringInset::write(WriteStream & os) const
+void InsetMathString::write(WriteStream & os) const
 {
        os << str_;
 }
index c3d6738b5291df0aac784211bac9d2769beef256..35a8baab7844488d50b51e54e986d99a7e5af74f 100644 (file)
  *  mainly for math-extern
  */
 
-class MathStringInset : public MathInset {
+class InsetMathString : public InsetMath {
 public:
        ///
-       explicit MathStringInset(std::string const & s);
+       explicit InsetMathString(std::string const & s);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
@@ -30,9 +30,9 @@ public:
        ///
        std::string str() const { return str_; }
        ///
-       MathStringInset * asStringInset() { return this; }
+       InsetMathString * asStringInset() { return this; }
        ///
-       MathStringInset const * asStringInset() const { return this; }
+       InsetMathString const * asStringInset() const { return this; }
 
        ///
        void normalize(NormalStream &) const;
index 3d1e48a8fa96541f39b40d748b39ffba41e7371f..748f3fdcc5fb88a283051207c6609eebff159024 100644 (file)
@@ -29,36 +29,36 @@ using std::string;
 using std::auto_ptr;
 
 
-MathSubstackInset::MathSubstackInset()
-       : MathGridInset(1, 1)
+InsetMathSubstack::InsetMathSubstack()
+       : InsetMathGrid(1, 1)
 {}
 
 
-auto_ptr<InsetBase> MathSubstackInset::doClone() const
+auto_ptr<InsetBase> InsetMathSubstack::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathSubstackInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathSubstack(*this));
 }
 
 
-void MathSubstackInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathSubstack::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        if (mi.base.style == LM_ST_DISPLAY) {
                StyleChanger dummy(mi.base, LM_ST_TEXT);
-               MathGridInset::metrics(mi, dim);
+               InsetMathGrid::metrics(mi, dim);
        } else {
-               MathGridInset::metrics(mi, dim);
+               InsetMathGrid::metrics(mi, dim);
        }
        dim_ = dim;
 }
 
 
-void MathSubstackInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathSubstack::draw(PainterInfo & pi, int x, int y) const
 {
-       MathGridInset::draw(pi, x + 1, y);
+       InsetMathGrid::draw(pi, x + 1, y);
 }
 
 
-bool MathSubstackInset::getStatus(LCursor & cur, FuncRequest const & cmd,
+bool InsetMathSubstack::getStatus(LCursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
        switch (cmd.action) {
@@ -71,46 +71,46 @@ bool MathSubstackInset::getStatus(LCursor & cur, FuncRequest const & cmd,
                        flag.enabled(false);
                        return true;
                }
-               return MathGridInset::getStatus(cur, cmd, flag);
+               return InsetMathGrid::getStatus(cur, cmd, flag);
        }
        default:
-               return MathGridInset::getStatus(cur, cmd, flag);
+               return InsetMathGrid::getStatus(cur, cmd, flag);
        }
 }
 
 
-void MathSubstackInset::infoize(std::ostream & os) const
+void InsetMathSubstack::infoize(std::ostream & os) const
 {
        os << "Substack ";
 }
 
 
-void MathSubstackInset::write(WriteStream & os) const
+void InsetMathSubstack::write(WriteStream & os) const
 {
        os << "\\substack{";
-       MathGridInset::write(os);
+       InsetMathGrid::write(os);
        os << "}\n";
 }
 
 
-void MathSubstackInset::normalize(NormalStream & os) const
+void InsetMathSubstack::normalize(NormalStream & os) const
 {
        os << "[substack ";
-       MathGridInset::normalize(os);
+       InsetMathGrid::normalize(os);
        os << ']';
 }
 
 
-void MathSubstackInset::maple(MapleStream & os) const
+void InsetMathSubstack::maple(MapleStream & os) const
 {
        os << "substack(";
-       MathGridInset::maple(os);
+       InsetMathGrid::maple(os);
        os << ')';
 }
 
 
-void MathSubstackInset::validate(LaTeXFeatures & features) const
+void InsetMathSubstack::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
-       MathGridInset::validate(features);
+       InsetMathGrid::validate(features);
 }
index 36f6a4209a26b2b824eef0d3280df1919f182942..cfb0f158d548666712b2a2c4b2777874749c7c6c 100644 (file)
 
 /// support for AMS's \\substack
 
-class MathSubstackInset : public MathGridInset {
+class InsetMathSubstack : public InsetMathGrid {
 public:
        ///
-       MathSubstackInset();
+       InsetMathSubstack();
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
-       MathSubstackInset const * asSubstackInset() const { return this; }
+       InsetMathSubstack const * asSubstackInset() const { return this; }
 
        ///
        bool getStatus(LCursor & cur, FuncRequest const & cmd,
index c4d02a7986bfe2f2786d18ed3e809307557b6e7d..c3ab018ac5b63e6b78502ed39334b432f53a1c2f 100644 (file)
@@ -702,7 +702,7 @@ void asArray(string const & str, MathArray & ar)
 }
 
 
-string asString(MathInset const & inset)
+string asString(InsetMath const & inset)
 {
        std::ostringstream os;
        WriteStream ws(os);
index c21d9421e90ab44d1d1d0b9f76d2ad4d885d63fe..009d646252b9265944b567191f767cfb446a77d9 100644 (file)
@@ -20,7 +20,7 @@ class LyXFont;
 class Dimension;
 class MathArray;
 class MathAtom;
-class MathInset;
+class InsetMath;
 
 
 void mathed_char_dim(LyXFont const &, unsigned char c, Dimension & dim);
@@ -46,7 +46,7 @@ bool isFontName(std::string const & name);
 // converts single cell to string
 std::string asString(MathArray const & ar);
 // converts single inset to string
-std::string asString(MathInset const &);
+std::string asString(InsetMath const &);
 std::string asString(MathAtom const &);
 // converts string to single cell
 void asArray(std::string const & str, MathArray & ar);
index c6fec301de5c9b6c4fc90d09d1b4011d0269915c..e0c681f5817aead174de77c8dcc181faa7151909 100644 (file)
@@ -26,34 +26,34 @@ using std::string;
 using std::auto_ptr;
 
 
-MathSymbolInset::MathSymbolInset(latexkeys const * l)
+InsetMathSymbol::InsetMathSymbol(latexkeys const * l)
        : sym_(l), h_(0), width_(0), scriptable_(false)
 {}
 
 
-MathSymbolInset::MathSymbolInset(char const * name)
+InsetMathSymbol::InsetMathSymbol(char const * name)
        : sym_(in_word_set(name)), h_(0), width_(0), scriptable_(false)
 {}
 
 
-MathSymbolInset::MathSymbolInset(string const & name)
+InsetMathSymbol::InsetMathSymbol(string const & name)
        : sym_(in_word_set(name.c_str())), h_(0), width_(0), scriptable_(false)
 {}
 
 
-auto_ptr<InsetBase> MathSymbolInset::doClone() const
+auto_ptr<InsetBase> InsetMathSymbol::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathSymbolInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathSymbol(*this));
 }
 
 
-string MathSymbolInset::name() const
+string InsetMathSymbol::name() const
 {
        return sym_->name;
 }
 
 
-void MathSymbolInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        //lyxerr << "metrics: symbol: '" << sym_->name
        //      << "' in font: '" << sym_->inset
@@ -97,7 +97,7 @@ void MathSymbolInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathSymbolInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathSymbol::draw(PainterInfo & pi, int x, int y) const
 {
        //lyxerr << "metrics: symbol: '" << sym_->name
        //      << "' in font: '" << sym_->inset
@@ -116,19 +116,19 @@ void MathSymbolInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-bool MathSymbolInset::isRelOp() const
+bool InsetMathSymbol::isRelOp() const
 {
        return sym_->extra == "mathrel";
 }
 
 
-bool MathSymbolInset::isScriptable() const
+bool InsetMathSymbol::isScriptable() const
 {
        return scriptable_;
 }
 
 
-bool MathSymbolInset::takesLimits() const
+bool InsetMathSymbol::takesLimits() const
 {
        return
                sym_->inset == "cmex" ||
@@ -137,20 +137,20 @@ bool MathSymbolInset::takesLimits() const
 }
 
 
-void MathSymbolInset::validate(LaTeXFeatures & features) const
+void InsetMathSymbol::validate(LaTeXFeatures & features) const
 {
        if (!sym_->requires.empty())
                features.require(sym_->requires);
 }
 
 
-void MathSymbolInset::normalize(NormalStream & os) const
+void InsetMathSymbol::normalize(NormalStream & os) const
 {
        os << "[symbol " << name() << ']';
 }
 
 
-void MathSymbolInset::maple(MapleStream & os) const
+void InsetMathSymbol::maple(MapleStream & os) const
 {
        if (name() == "cdot")
                os << '*';
@@ -160,7 +160,7 @@ void MathSymbolInset::maple(MapleStream & os) const
                os << name();
 }
 
-void MathSymbolInset::maxima(MaximaStream & os) const
+void InsetMathSymbol::maxima(MaximaStream & os) const
 {
        if (name() == "cdot")
                os << '*';
@@ -173,7 +173,7 @@ void MathSymbolInset::maxima(MaximaStream & os) const
 }
 
 
-void MathSymbolInset::mathematica(MathematicaStream & os) const
+void InsetMathSymbol::mathematica(MathematicaStream & os) const
 {
        if ( name() == "pi")    { os << "Pi"; return;}
        if ( name() == "infty") { os << "Infinity"; return;}
@@ -190,7 +190,7 @@ char const * MathMLtype(string const & s)
 }
 
 
-void MathSymbolInset::mathmlize(MathMLStream & os) const
+void InsetMathSymbol::mathmlize(MathMLStream & os) const
 {
        char const * type = MathMLtype(sym_->extra);
        os << '<' << type << "> ";
@@ -202,7 +202,7 @@ void MathSymbolInset::mathmlize(MathMLStream & os) const
 }
 
 
-void MathSymbolInset::octave(OctaveStream & os) const
+void InsetMathSymbol::octave(OctaveStream & os) const
 {
        if (name() == "cdot")
                os << '*';
@@ -211,14 +211,14 @@ void MathSymbolInset::octave(OctaveStream & os) const
 }
 
 
-void MathSymbolInset::write(WriteStream & os) const
+void InsetMathSymbol::write(WriteStream & os) const
 {
        os << '\\' << name();
        os.pendingSpace(true);
 }
 
 
-void MathSymbolInset::infoize2(std::ostream & os) const
+void InsetMathSymbol::infoize2(std::ostream & os) const
 {
        os << "Symbol: " << name();
 }
index d25260409a9ff174a421a6f8bf484ec7eb9ac054..996380fb40586554a01fcba930a362fad7bdfc9f 100644 (file)
@@ -20,14 +20,14 @@ class latexkeys;
 /** "normal" symbols that don't take limits and don't grow in displayed
  *  formulae.
  */
-class MathSymbolInset : public MathInset {
+class InsetMathSymbol : public InsetMath {
 public:
        ///
-       explicit MathSymbolInset(latexkeys const * l);
+       explicit InsetMathSymbol(latexkeys const * l);
        ///
-       explicit MathSymbolInset(char const * name);
+       explicit InsetMathSymbol(char const * name);
        ///
-       explicit MathSymbolInset(std::string const & name);
+       explicit InsetMathSymbol(std::string const & name);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
@@ -42,7 +42,7 @@ public:
        /// do we take \limits or \nolimits?
        bool takesLimits() const;
        /// identifies SymbolInset as such
-       MathSymbolInset const * asSymbolInset() const { return this; }
+       InsetMathSymbol const * asSymbolInset() const { return this; }
        /// the LaTeX name of the symbol (without the backslash)
        std::string name() const;
        /// request "external features"
index eb4fe3e8eb374f89410bdba729e5c3cef20c2911..4f88f3a232fef943d72fd459852fda6531962d27 100644 (file)
@@ -25,46 +25,46 @@ using std::string;
 using std::auto_ptr;
 
 
-MathTabularInset::MathTabularInset(string const & name, int m, int n)
-       : MathGridInset(m, n), name_(name)
+InsetMathTabular::InsetMathTabular(string const & name, int m, int n)
+       : InsetMathGrid(m, n), name_(name)
 {}
 
 
-MathTabularInset::MathTabularInset(string const & name, int m, int n,
+InsetMathTabular::InsetMathTabular(string const & name, int m, int n,
                char valign, string const & halign)
-       : MathGridInset(m, n, valign, halign), name_(name)
+       : InsetMathGrid(m, n, valign, halign), name_(name)
 {}
 
 
-MathTabularInset::MathTabularInset(string const & name, char valign,
+InsetMathTabular::InsetMathTabular(string const & name, char valign,
                string const & halign)
-       : MathGridInset(valign, halign), name_(name)
+       : InsetMathGrid(valign, halign), name_(name)
 {}
 
 
-auto_ptr<InsetBase> MathTabularInset::doClone() const
+auto_ptr<InsetBase> InsetMathTabular::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathTabularInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathTabular(*this));
 }
 
 
-void MathTabularInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathTabular::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
-       MathGridInset::metrics(mi, dim);
+       InsetMathGrid::metrics(mi, dim);
        dim.wid += 6;
        dim_ = dim;
 }
 
 
-void MathTabularInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathTabular::draw(PainterInfo & pi, int x, int y) const
 {
        FontSetChanger dummy(pi.base, "textnormal");
-       MathGridInset::drawWithMargin(pi, x, y, 4, 2);
+       InsetMathGrid::drawWithMargin(pi, x, y, 4, 2);
 }
 
 
-void MathTabularInset::write(WriteStream & os) const
+void InsetMathTabular::write(WriteStream & os) const
 {
        if (os.fragile())
                os << "\\protect";
@@ -74,7 +74,7 @@ void MathTabularInset::write(WriteStream & os) const
                os << '[' << char(v_align_) << ']';
        os << '{' << halign() << "}\n";
 
-       MathGridInset::write(os);
+       InsetMathGrid::write(os);
 
        if (os.fragile())
                os << "\\protect";
@@ -84,7 +84,7 @@ void MathTabularInset::write(WriteStream & os) const
 }
 
 
-void MathTabularInset::infoize(std::ostream & os) const
+void InsetMathTabular::infoize(std::ostream & os) const
 {
        string name = name_;
        name[0] = lyx::support::uppercase(name[0]);
@@ -92,17 +92,17 @@ void MathTabularInset::infoize(std::ostream & os) const
 }
 
 
-void MathTabularInset::normalize(NormalStream & os) const
+void InsetMathTabular::normalize(NormalStream & os) const
 {
        os << '[' << name_ << ' ';
-       MathGridInset::normalize(os);
+       InsetMathGrid::normalize(os);
        os << ']';
 }
 
 
-void MathTabularInset::maple(MapleStream & os) const
+void InsetMathTabular::maple(MapleStream & os) const
 {
        os << "array(";
-       MathGridInset::maple(os);
+       InsetMathGrid::maple(os);
        os << ')';
 }
index 469983dde2f7a7468f88abe6fd404f2cbaddaeaa..66fb3580b6cfbc0148932875f4ede7d773051cb9 100644 (file)
 
 
 /// Inset for things like \begin{tabular}...\end{tabular}
-class MathTabularInset : public MathGridInset {
+class InsetMathTabular : public InsetMathGrid {
 public:
        ///
-       MathTabularInset(std::string const &, int m, int n);
+       InsetMathTabular(std::string const &, int m, int n);
        ///
-       MathTabularInset(std::string const &, int m, int n,
+       InsetMathTabular(std::string const &, int m, int n,
                char valign, std::string const & halign);
        ///
-       MathTabularInset(std::string const &, char valign, std::string const & halign);
+       InsetMathTabular(std::string const &, char valign, std::string const & halign);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
-       MathTabularInset * asTabularInset() { return this; }
+       InsetMathTabular * asTabularInset() { return this; }
        ///
-       MathTabularInset const * asTabularInset() const { return this; }
+       InsetMathTabular const * asTabularInset() const { return this; }
 
        ///
        void write(WriteStream & os) const;
index cd55d5f285a6dd51807b459e5572ffdce19c3616..48f5030e4ef6bea20538ae64f9bc8c74df9bdc36 100644 (file)
@@ -26,18 +26,18 @@ using std::max;
 using std::auto_ptr;
 
 
-MathTfracInset::MathTfracInset()
-       : MathFracInset()
+InsetMathTFrac::InsetMathTFrac()
+       : InsetMathFrac()
 {}
 
 
-auto_ptr<InsetBase> MathTfracInset::doClone() const
+auto_ptr<InsetBase> InsetMathTFrac::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathTfracInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathTFrac(*this));
 }
 
 
-void MathTfracInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathTFrac::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        StyleChanger dummy(mi.base, LM_ST_SCRIPT);
        cell(0).metrics(mi);
@@ -49,7 +49,7 @@ void MathTfracInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathTfracInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathTFrac::draw(PainterInfo & pi, int x, int y) const
 {
        StyleChanger dummy(pi.base, LM_ST_SCRIPT);
        int m = x + dim_.wid / 2;
@@ -60,20 +60,20 @@ void MathTfracInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-string MathTfracInset::name() const
+string InsetMathTFrac::name() const
 {
        return "tfrac";
 }
 
 
-void MathTfracInset::mathmlize(MathMLStream & os) const
+void InsetMathTFrac::mathmlize(MathMLStream & os) const
 {
        os << MTag("mtfrac") << cell(0) << cell(1) << ETag("mtfrac");
 }
 
 
-void MathTfracInset::validate(LaTeXFeatures & features) const
+void InsetMathTFrac::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
 }
index c384f256673c5a714abc3b01f8569201f603b436..5333716ca06f9a498a4d2d2fd0fc36cc9ddc90f5 100644 (file)
 
 
 /// \dfrac support
-class MathTfracInset : public MathFracInset {
+class InsetMathTFrac : public InsetMathFrac {
 public:
        ///
-       MathTfracInset();
+       InsetMathTFrac();
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index 5ba13ad186baab4e8bdfe5d765035bff844f2972..764f0c1d3b736969b2b316ea25574db0aeae5873 100644 (file)
@@ -22,13 +22,13 @@ using std::auto_ptr;
 
 
 
-auto_ptr<InsetBase> MathUndersetInset::doClone() const
+auto_ptr<InsetBase> InsetMathUnderset::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathUndersetInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathUnderset(*this));
 }
 
 
-void MathUndersetInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathUnderset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(1).metrics(mi);
        FracChanger dummy(mi.base);
@@ -41,7 +41,7 @@ void MathUndersetInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathUndersetInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathUnderset::draw(PainterInfo & pi, int x, int y) const
 {
        int m  = x + width() / 2;
        int yo = y + cell(1).descent() + cell(0).ascent() + 1;
@@ -52,7 +52,7 @@ void MathUndersetInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-bool MathUndersetInset::idxFirst(LCursor & cur) const
+bool InsetMathUnderset::idxFirst(LCursor & cur) const
 {
        cur.idx() = 1;
        cur.pos() = 0;
@@ -60,7 +60,7 @@ bool MathUndersetInset::idxFirst(LCursor & cur) const
 }
 
 
-bool MathUndersetInset::idxLast(LCursor & cur) const
+bool InsetMathUnderset::idxLast(LCursor & cur) const
 {
        cur.idx() = 1;
        cur.pos() = cur.lastpos();
@@ -68,7 +68,7 @@ bool MathUndersetInset::idxLast(LCursor & cur) const
 }
 
 
-bool MathUndersetInset::idxUpDown(LCursor & cur, bool up) const
+bool InsetMathUnderset::idxUpDown(LCursor & cur, bool up) const
 {
        idx_type target = up; // up ? 1 : 0, since upper cell has idx 1
        if (cur.idx() == target)
@@ -79,20 +79,20 @@ bool MathUndersetInset::idxUpDown(LCursor & cur, bool up) const
 }
 
 
-void MathUndersetInset::write(WriteStream & os) const
+void InsetMathUnderset::write(WriteStream & os) const
 {
        os << "\\underset{" << cell(0) << "}{" << cell(1) << '}';
 }
 
 
-void MathUndersetInset::normalize(NormalStream & os) const
+void InsetMathUnderset::normalize(NormalStream & os) const
 {
        os << "[underset " << cell(0) << ' ' << cell(1) << ']';
 }
 
 
-void MathUndersetInset::validate(LaTeXFeatures & features) const
+void InsetMathUnderset::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
 }
index c80a23497e1c7f1b62ac218eab220a82e25dd199..dd5eb1d24bccf09da57a88c661f51f2f093e7cbb 100644 (file)
@@ -16,7 +16,7 @@
 #include "math_fracbase.h"
 
 /// Inset for underset
-class MathUndersetInset : public MathFracbaseInset {
+class InsetMathUnderset : public InsetMathFracBase {
 public:
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
index 12a29cab568d8a34ba62b86d2c54640fd87db1a6..3daf48edac8452d2928b3050c53b7345408f7810 100644 (file)
@@ -20,43 +20,43 @@ using std::string;
 using std::auto_ptr;
 
 
-MathUnknownInset::MathUnknownInset(string const & nm, bool final, bool black)
+InsetMathUnknown::InsetMathUnknown(string const & nm, bool final, bool black)
        : name_(nm), final_(final), black_(black)
 {}
 
 
-auto_ptr<InsetBase> MathUnknownInset::doClone() const
+auto_ptr<InsetBase> InsetMathUnknown::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathUnknownInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathUnknown(*this));
 }
 
 
-string MathUnknownInset::name() const
+string InsetMathUnknown::name() const
 {
        return name_;
 }
 
 
-void MathUnknownInset::setName(string const & name)
+void InsetMathUnknown::setName(string const & name)
 {
        name_ = name;
 }
 
 
-void MathUnknownInset::normalize(NormalStream & os) const
+void InsetMathUnknown::normalize(NormalStream & os) const
 {
        os << "[unknown " << name_ << ']';
 }
 
 
-void MathUnknownInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        mathed_string_dim(mi.base.font, name_, dim);
        dim_ = dim;
 }
 
 
-void MathUnknownInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathUnknown::draw(PainterInfo & pi, int x, int y) const
 {
        if (black_)
                drawStrBlack(pi, x, y, name_);
@@ -66,37 +66,37 @@ void MathUnknownInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathUnknownInset::finalize()
+void InsetMathUnknown::finalize()
 {
        final_ = true;
 }
 
 
-bool MathUnknownInset::final() const
+bool InsetMathUnknown::final() const
 {
        return final_;
 }
 
 
-void MathUnknownInset::maple(MapleStream & os) const
+void InsetMathUnknown::maple(MapleStream & os) const
 {
        os << name_;
 }
 
 
-void MathUnknownInset::mathematica(MathematicaStream & os) const
+void InsetMathUnknown::mathematica(MathematicaStream & os) const
 {
        os << name_;
 }
 
 
-void MathUnknownInset::mathmlize(MathMLStream & os) const
+void InsetMathUnknown::mathmlize(MathMLStream & os) const
 {
        os << MTag("mi") << name_ << ETag("mi");
 }
 
 
-void MathUnknownInset::octave(OctaveStream & os) const
+void InsetMathUnknown::octave(OctaveStream & os) const
 {
        os << name_;
 }
index 0dcb683f3254cd144f86c5a0266d47c371631a2d..eb5a0c819abbf10879b341e7c2ffceef10f146f8 100644 (file)
 
 
 /// LaTeX names for objects that we really don't know
-class MathUnknownInset : public MathDimInset {
+class InsetMathUnknown : public InsetMathDim {
 public:
        ///
-       explicit MathUnknownInset(std::string const & name,
+       explicit InsetMathUnknown(std::string const & name,
                bool final = true, bool black = false);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
@@ -30,9 +30,9 @@ public:
        ///
        std::string name() const;
        /// identifies UnknownInsets
-       MathUnknownInset const * asUnknownInset() const { return this; }
+       InsetMathUnknown const * asUnknownInset() const { return this; }
        /// identifies UnknownInsets
-       MathUnknownInset * asUnknownInset() { return this; }
+       InsetMathUnknown * asUnknownInset() { return this; }
 
        ///
        void normalize(NormalStream &) const;
index 744ff8dde8e31f716ce51263c6f25cf29f8c8701..6299e826886149d5b27f8dfa67a6bb799f40c127 100644 (file)
@@ -22,18 +22,18 @@ using std::string;
 using std::auto_ptr;
 
 
-MathXArrowInset::MathXArrowInset(string const & name)
-       : MathFracbaseInset(), name_(name)
+InsetMathXArrow::InsetMathXArrow(string const & name)
+       : InsetMathFracBase(), name_(name)
 {}
 
 
-auto_ptr<InsetBase> MathXArrowInset::doClone() const
+auto_ptr<InsetBase> InsetMathXArrow::doClone() const
 {
-       return auto_ptr<InsetBase>(new MathXArrowInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathXArrow(*this));
 }
 
 
-void MathXArrowInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathXArrow::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        ScriptChanger dummy(mi.base);
        cell(0).metrics(mi);
@@ -46,7 +46,7 @@ void MathXArrowInset::metrics(MetricsInfo & mi, Dimension & dim) const
 }
 
 
-void MathXArrowInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathXArrow::draw(PainterInfo & pi, int x, int y) const
 {
        ScriptChanger dummy(pi.base);
        cell(0).draw(pi, x + 5, y - 10);
@@ -56,7 +56,7 @@ void MathXArrowInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathXArrowInset::write(WriteStream & os) const
+void InsetMathXArrow::write(WriteStream & os) const
 {
        os << '\\' << name_;
        if (cell(1).size())
@@ -65,14 +65,14 @@ void MathXArrowInset::write(WriteStream & os) const
 }
 
 
-void MathXArrowInset::normalize(NormalStream & os) const
+void InsetMathXArrow::normalize(NormalStream & os) const
 {
        os << "[xarrow " << name_ << ' ' <<  cell(0) << ' ' << cell(1) << ']';
 }
 
 
-void MathXArrowInset::validate(LaTeXFeatures & features) const
+void InsetMathXArrow::validate(LaTeXFeatures & features) const
 {
        features.require("amsmath");
-       MathNestInset::validate(features);
+       InsetMathNest::validate(features);
 }
index 0d00122e858626d948507b21866c61341a5b0f21..27f0fa4d042a1b593d2d7fe5d262113b6d3e4056 100644 (file)
 
 
 /// Wide arrows like \xrightarrow
-class MathXArrowInset : public MathFracbaseInset {
+class InsetMathXArrow : public InsetMathFracBase {
 public:
        ///
-       explicit MathXArrowInset(std::string const & name);
+       explicit InsetMathXArrow(std::string const & name);
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
index bb16eb90dd83e914f37639eaeeee9e814b3034e0..afa4d22e97eefed40c6f4eb7be44adb959a8691b 100644 (file)
 using std::max;
 
 
-MathXYArrowInset::MathXYArrowInset()
-       : MathNestInset(2)
+InsetMathXYArrow::InsetMathXYArrow()
+       : InsetMathNest(2)
 {}
 
 
-std::auto_ptr<InsetBase> MathXYArrowInset::clone() const
+std::auto_ptr<InsetBase> InsetMathXYArrow::clone() const
 {
-       return std::auto_ptr<InsetBase>(new MathXYArrowInset(*this));
+       return std::auto_ptr<InsetBase>(new InsetMathXYArrow(*this));
 }
 
 
-MathXYMatrixInset const * MathXYArrowInset::targetMatrix() const
+InsetMathXYMatrix const * InsetMathXYArrow::targetMatrix() const
 {
        return target_;
 }
 
 
-MathArray const & MathXYArrowInset::targetCell() const
+MathArray const & InsetMathXYArrow::targetCell() const
 {
 #if 0
-       MathXYMatrixInset const * p = targetMatrix();
+       InsetMathXYMatrix const * p = targetMatrix();
        int x = 0;
        int y = 0;
        MathArray const & t = cell(0);
@@ -54,7 +54,7 @@ MathArray const & MathXYArrowInset::targetCell() const
                }
        }
        //lyxerr << "target: x: " << x << " y: " << y << endl;
-       MathInset::idx_type n = mi_.idx + p->ncols() * y + x;
+       InsetMath::idx_type n = mi_.idx + p->ncols() * y + x;
        if (n >= p->nargs()) {
                lyxerr << "source: n: " << mi_.idx << "\n"
                       << "target: n: " << n << " out of range" << endl;
@@ -68,7 +68,7 @@ MathArray const & MathXYArrowInset::targetCell() const
 }
 
 
-MathArray const & MathXYArrowInset::sourceCell() const
+MathArray const & InsetMathXYArrow::sourceCell() const
 {
 #if 0
        return targetMatrix()->cell(mi_.idx);
@@ -79,9 +79,9 @@ MathArray const & MathXYArrowInset::sourceCell() const
 }
 
 
-void MathXYArrowInset::metrics(MetricsInfo & mi) const
+void InsetMathXYArrow::metrics(MetricsInfo & mi) const
 {
-       MathNestInset::metrics(mi);
+       InsetMathNest::metrics(mi);
        mi_   = mi;
        FontSetChanger dummy(mi.base, "textrm");
 #if 0
@@ -102,7 +102,7 @@ void MathXYArrowInset::metrics(MetricsInfo & mi) const
 }
 
 
-void MathXYArrowInset::draw(PainterInfo & pi, int x, int y) const
+void InsetMathXYArrow::draw(PainterInfo & pi, int x, int y) const
 {
        metrics(mi_);
        FontSetChanger dummy(pi.base, "textrm");
@@ -138,7 +138,7 @@ void MathXYArrowInset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void MathXYArrowInset::write(WriteStream & os) const
+void InsetMathXYArrow::write(WriteStream & os) const
 {
        os << "\\ar";
        if (cell(0).size())
@@ -149,9 +149,9 @@ void MathXYArrowInset::write(WriteStream & os) const
 }
 
 
-void MathXYArrowInset::normalize(NormalStream & os) const
+void InsetMathXYArrow::normalize(NormalStream & os) const
 {
        os << "[xyarrow ";
-       MathNestInset::normalize(os);
+       InsetMathNest::normalize(os);
        os << ']';
 }
index fe69939be4dc1875e382f2bfc14fe9cd492c1878..13613b2a207464db9045b9f3b87a5e9251e22321 100644 (file)
 
 // for the \ar stuff in \xymatrix
 
-class MathXYMatrixInset;
+class InsetMathXYMatrix;
 
-class MathXYArrowInset : public MathNestInset {
+class InsetMathXYArrow : public InsetMathNest {
 public:
        ///
-       MathXYArrowInset();
+       InsetMathXYArrow();
        ///
        virtual std::auto_ptr<InsetBase> clone() const;
        ///
@@ -31,7 +31,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
-       MathXYArrowInset * asXYArrowInset() { return this; }
+       InsetMathXYArrow * asXYArrowInset() { return this; }
 
        ///
        void normalize();
@@ -42,7 +42,7 @@ public:
 
 public:
        ///
-       MathXYMatrixInset const * targetMatrix() const;
+       InsetMathXYMatrix const * targetMatrix() const;
        ///
        MathArray const & targetCell() const;
        ///
@@ -55,7 +55,7 @@ public:
        ///
        mutable LyXFont font_;
        ///
-       mutable MathXYMatrixInset const * target_;
+       mutable InsetMathXYMatrix const * target_;
 };
 
 #endif
index 581dab36eecdf38db12fe2ea1b2c94f0adc7eb14..d4ac730411a3304403ec659d5f2bf05880a7a19e 100644 (file)
 #include "support/std_ostream.h"
 
 
-MathXYMatrixInset::MathXYMatrixInset()
-       : MathGridInset(1, 1)
+InsetMathXYMatrix::InsetMathXYMatrix()
+       : InsetMathGrid(1, 1)
 {}
 
 
-std::auto_ptr<InsetBase> MathXYMatrixInset::doClone() const
+std::auto_ptr<InsetBase> InsetMathXYMatrix::doClone() const
 {
-       return std::auto_ptr<InsetBase>(new MathXYMatrixInset(*this));
+       return std::auto_ptr<InsetBase>(new InsetMathXYMatrix(*this));
 }
 
 
-int MathXYMatrixInset::colsep() const
+int InsetMathXYMatrix::colsep() const
 {
        return 40;
 }
 
 
-int MathXYMatrixInset::rowsep() const
+int InsetMathXYMatrix::rowsep() const
 {
        return 40;
 }
 
 
-void MathXYMatrixInset::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathXYMatrix::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        if (mi.base.style == LM_ST_DISPLAY)
                mi.base.style = LM_ST_TEXT;
-       MathGridInset::metrics(mi, dim);
+       InsetMathGrid::metrics(mi, dim);
 }
 
 
-void MathXYMatrixInset::write(WriteStream & os) const
+void InsetMathXYMatrix::write(WriteStream & os) const
 {
        os << "\\xymatrix{";
-       MathGridInset::write(os);
+       InsetMathGrid::write(os);
        os << "}\n";
 }
 
 
-void MathXYMatrixInset::infoize(std::ostream & os) const
+void InsetMathXYMatrix::infoize(std::ostream & os) const
 {
        os << "xymatrix ";
-       MathGridInset::infoize(os);
+       InsetMathGrid::infoize(os);
 }
 
 
-void MathXYMatrixInset::normalize(NormalStream & os) const
+void InsetMathXYMatrix::normalize(NormalStream & os) const
 {
        os << "[xymatrix ";
-       MathGridInset::normalize(os);
+       InsetMathGrid::normalize(os);
        os << ']';
 }
 
 
-void MathXYMatrixInset::maple(MapleStream & os) const
+void InsetMathXYMatrix::maple(MapleStream & os) const
 {
        os << "xymatrix(";
-       MathGridInset::maple(os);
+       InsetMathGrid::maple(os);
        os << ')';
 }
index d27e3e3832ed9f6b88b8861d4b2dba63ea9fb378..21a6499875b4497795fbd10ec487ec8c4d9e2077 100644 (file)
 #include "math_gridinset.h"
 
 
-class MathXYMatrixInset : public MathGridInset {
+class InsetMathXYMatrix : public InsetMathGrid {
 public:
        ///
-       MathXYMatrixInset();
+       InsetMathXYMatrix();
        ///
        void metrics(MetricsInfo &, Dimension &) const;
        ///
-       MathXYMatrixInset const * asXYMatrixInset() const { return this; }
+       InsetMathXYMatrix const * asXYMatrixInset() const { return this; }
        ///
        virtual int colsep() const;
        ///
index 0a0d227580afec3d6b73a21b0fc15ac54572deca..4111c01ccd2819feff06f6020b4cddf212a156b1 100644 (file)
@@ -63,7 +63,7 @@ void RefInset::doDispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "ref") {
                        MathArray ar;
-                       if (createMathInset_fromDialogStr(lyx::to_utf8(cmd.argument()), ar)) {
+                       if (createInsetMath_fromDialogStr(lyx::to_utf8(cmd.argument()), ar)) {
                                *this = *ar[0].nucleus()->asRefInset();
                                break;
                        }
index fdfd27f8e43bd7d5627797c783a78e45690acde5..55bde061df9d5f787d545577bb8e03cee88b8212 100644 (file)
@@ -1083,7 +1083,7 @@ bool LyXText::cursorUp(LCursor & cur)
                LCursor old = cur;
                // Go to middle of previous row. 16 found to work OK;
                // 12 = top/bottom margin of display math
-               int const margin = 3 * MathHullInset::displayMargin() / 2;
+               int const margin = 3 * InsetMathHull::displayMargin() / 2;
                editXY(cur, x, y - par.rows()[row].ascent() - margin);
                cur.clearSelection();
 
@@ -1131,7 +1131,7 @@ bool LyXText::cursorDown(LCursor & cur)
                int const y = bv_funcs::getPos(cur, cur.boundary()).y_;
                LCursor old = cur;
                // To middle of next row
-               int const margin = 3 * MathHullInset::displayMargin() / 2;
+               int const margin = 3 * InsetMathHull::displayMargin() / 2;
                editXY(cur, x, y + par.rows()[row].descent() + margin);
                cur.clearSelection();
 
index df1160075c37f6239e6fcf6f464f6cd73ffb65ba..ebb0864f68a1fd0ba8b66ce44708c9df3357af3b 100644 (file)
@@ -148,7 +148,7 @@ namespace {
 
                if (sel.empty()) {
                        const int old_pos = cur.pos();
-                       cur.insert(new MathHullInset(hullSimple));
+                       cur.insert(new InsetMathHull(hullSimple));
                        BOOST_ASSERT(old_pos == cur.pos());
                        cur.nextInset()->edit(cur, true);
                        // don't do that also for LFUN_MATH_MODE
@@ -170,7 +170,7 @@ namespace {
                        if (sel.find("\\newcommand") == string::npos
                            && sel.find("\\def") == string::npos)
                        {
-                               MathHullInset * formula = new MathHullInset;
+                               InsetMathHull * formula = new InsetMathHull;
                                LyXLex lex(0, 0);
                                lex.setStream(is);
                                formula->read(cur.buffer(), lex);
@@ -1230,7 +1230,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_MATH_MATRIX:
        case LFUN_MATH_DELIM:
        case LFUN_MATH_BIGDELIM: {
-               cur.insert(new MathHullInset(hullSimple));
+               cur.insert(new InsetMathHull(hullSimple));
                cur.dispatch(FuncRequest(LFUN_CHAR_FORWARD));
                cur.dispatch(cmd);
                break;