]> git.lyx.org Git - features.git/commitdiff
cosmetics
authorAndré Pönitz <poenitz@gmx.net>
Thu, 26 Jul 2001 06:56:43 +0000 (06:56 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 26 Jul 2001 06:56:43 +0000 (06:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2353 a592a061-630c-0410-9148-cb99ea01b6c8

47 files changed:
src/mathed/array.C
src/mathed/array.h
src/mathed/formula.C
src/mathed/formula.h
src/mathed/formulabase.C
src/mathed/formulabase.h
src/mathed/formulamacro.C
src/mathed/math_arrayinset.C
src/mathed/math_arrayinset.h
src/mathed/math_bigopinset.C
src/mathed/math_bigopinset.h
src/mathed/math_cursor.C
src/mathed/math_decorationinset.C
src/mathed/math_decorationinset.h
src/mathed/math_deliminset.C
src/mathed/math_deliminset.h
src/mathed/math_dotsinset.C
src/mathed/math_dotsinset.h
src/mathed/math_fracinset.C
src/mathed/math_fracinset.h
src/mathed/math_funcinset.C
src/mathed/math_funcinset.h
src/mathed/math_gridinset.C
src/mathed/math_gridinset.h
src/mathed/math_inset.C
src/mathed/math_inset.h
src/mathed/math_macro.C
src/mathed/math_macro.h
src/mathed/math_macroarg.C
src/mathed/math_macroarg.h
src/mathed/math_macrotemplate.C
src/mathed/math_macrotemplate.h
src/mathed/math_matrixinset.C
src/mathed/math_matrixinset.h
src/mathed/math_parser.C
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_sqrtinset.C
src/mathed/math_sqrtinset.h
src/mathed/xarray.C
src/mathed/xarray.h

index aa65bbcc1b2168e6718c0604eb19f6249126bf69..5349db0d5ecc129775c5e6ebbc98a7e77c69fade 100644 (file)
@@ -291,7 +291,7 @@ std::ostream & operator<<(std::ostream & os, MathArray const & ar)
 }
 
 
-void MathArray::Write(ostream & os, bool fragile) const
+void MathArray::write(ostream & os, bool fragile) const
 {
        if (empty())
                return;
@@ -301,7 +301,7 @@ void MathArray::Write(ostream & os, bool fragile) const
        for (int pos = 0; pos < size(); next(pos)) {
                if (isInset(pos)) {
 
-                       nextInset(pos)->Write(os, fragile);
+                       nextInset(pos)->write(os, fragile);
 
                } else {
 
@@ -351,22 +351,22 @@ void MathArray::Write(ostream & os, bool fragile) const
 }
 
 
-void MathArray::WriteNormal(ostream & os) const
+void MathArray::writeNormal(ostream & os) const
 {
        if (empty()) {
                os << "[par] ";
                return;
        }
 
-       Write(os, true);
+       write(os, true);
 }
 
 
-void MathArray::Validate(LaTeXFeatures & features) const
+void MathArray::validate(LaTeXFeatures & features) const
 {
        for (int pos = 0; pos < size(); next(pos)) 
                if (isInset(pos)) 
-                       nextInset(pos)->Validate(features);
+                       nextInset(pos)->validate(features);
 }
 
 
index 16da85b7d33668d88eddf430c442d995bd9387db..5f1bf949abadee3b8b7627705c262f51c09c7256 100644 (file)
@@ -120,11 +120,11 @@ public:
        ///
        bool isInset(int pos) const;
        ///
-       void Write(std::ostream &, bool) const;
+       void write(std::ostream &, bool) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
-       void Validate(LaTeXFeatures &) const;
+       void validate(LaTeXFeatures &) const;
 private:
        ///
        typedef std::vector<unsigned char>           buffer_type;
index d761dd5cd92a4d569b2c21a6c855ad2368a6a5b1..5d9959adb1f90929a45a6a39fbb32c0756748c85 100644 (file)
@@ -66,7 +66,7 @@ InsetFormula::InsetFormula(MathInsetTypes t)
 InsetFormula::InsetFormula(string const & s)
        : InsetFormulaBase(mathed_parse(s))
 {
-       Metrics();
+       metrics();
 }
 
 
@@ -85,14 +85,14 @@ void InsetFormula::write(ostream & os) const
 
 int InsetFormula::latex(ostream & os, bool fragile, bool) const
 {
-       par()->Write(os, fragile);
+       par()->write(os, fragile);
        return 1;
 }
 
 
 int InsetFormula::ascii(ostream & os, int) const
 {
-       par()->Write(os, false);
+       par()->write(os, false);
        return 1;
 }
 
@@ -112,7 +112,7 @@ int InsetFormula::docBook(ostream & os) const
 void InsetFormula::read(LyXLex & lex)
 {
        par(mathed_parse(lex));
-       Metrics();
+       metrics();
 }
 
 
@@ -125,7 +125,7 @@ void InsetFormula::draw(BufferView * bv, LyXFont const &,
        MathInset::workwidth = bv->workWidth();
        Painter & pain = bv->painter();
 
-       Metrics();
+       metrics();
        int w = par()->width();
        int h = par()->height();
        int a = par()->ascent();
@@ -143,9 +143,9 @@ void InsetFormula::draw(BufferView * bv, LyXFont const &,
 }
 
 
-void InsetFormula::Metrics() const 
+void InsetFormula::metrics() const 
 {
-       const_cast<MathInset *>(par_)->Metrics(display() ? LM_ST_DISPLAY : LM_ST_TEXT);
+       const_cast<MathInset *>(par_)->metrics(display() ? LM_ST_DISPLAY : LM_ST_TEXT);
 }
 
 vector<string> const InsetFormula::getLabelList() const
@@ -262,7 +262,7 @@ InsetFormula::localDispatch(BufferView * bv, kb_action action,
                        int x;
                        int y;
                        mathcursor->GetPos(x, y);
-                       if (par()->GetType() == LM_OT_SIMPLE)
+                       if (par()->getType() == LM_OT_SIMPLE)
                                par()->mutate(LM_OT_EQUATION);
                        else
                                par()->mutate(LM_OT_SIMPLE);
@@ -293,7 +293,7 @@ void InsetFormula::handleExtern(const string & arg, BufferView *)
        //string outfile = lyx::tempName("maple.out");
        string outfile = "/tmp/lyx2" + arg + ".out";
        ostringstream os;
-       par()->WriteNormal(os); 
+       par()->writeNormal(os); 
        string code = os.str().c_str();
        string script = "lyx2" + arg + " '" + code + "' " + outfile;
        lyxerr << "calling: " << script << endl;
@@ -301,12 +301,12 @@ void InsetFormula::handleExtern(const string & arg, BufferView *)
 
        ifstream is(outfile.c_str());
        par(mathed_parse(is));
-       Metrics();
+       metrics();
 }
 
 bool InsetFormula::display() const
 {
-       return par_->GetType() != LM_OT_SIMPLE;
+       return par_->getType() != LM_OT_SIMPLE;
 }
 
 
@@ -330,7 +330,7 @@ Inset::Code InsetFormula::lyxCode() const
 
 void InsetFormula::validate(LaTeXFeatures & features) const
 {
-       par()->Validate(features);
+       par()->validate(features);
 }
 
 bool InsetFormula::insetAllowed(Inset::Code code) const
@@ -353,6 +353,6 @@ int InsetFormula::descent(BufferView *, LyXFont const &) const
 
 int InsetFormula::width(BufferView *, LyXFont const &) const
 {
-       Metrics();
+       metrics();
        return par()->width();
 }
index b98c7ef8dc08649933c1c6cb03e24c32f7275c5a..7f4b6c09819676f689d8710c3e7a13f03c667d07 100644 (file)
@@ -44,7 +44,7 @@ public:
        ///
        void draw(BufferView *, LyXFont const &, int, float &, bool) const;
        ///
-       void Metrics() const;
+       void metrics() const;
 
        ///
        void write(std::ostream &) const;
index d666fce5c1d2cc22fa3695037033f745711b56de..5c7d71f8c38d75bbdddd9d91df88ac4e874e9446 100644 (file)
@@ -190,7 +190,7 @@ void InsetFormulaBase::edit(BufferView * bv, int x, int /*y*/, unsigned int)
        if (!bv->lockInset(this))
                lyxerr[Debug::MATHED] << "Cannot lock inset!!!" << endl;
 
-       Metrics();
+       metrics();
        //bv->updateInset(this, false);
        if (x == 0)
                mathcursor->first();
@@ -295,14 +295,14 @@ vector<string> const InsetFormulaBase::getLabelList() const
 
 void InsetFormulaBase::updateLocal(BufferView * bv, bool dirty)
 {
-       Metrics();
+       metrics();
        bv->updateInset(this, dirty);
 }
 
 
-void InsetFormulaBase::Metrics() const
+void InsetFormulaBase::metrics() const
 {
-       const_cast<MathInset *>(par_)->Metrics(LM_ST_TEXT);
+       const_cast<MathInset *>(par_)->metrics(LM_ST_TEXT);
 }
 
 
@@ -501,7 +501,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
                int y1;
                istringstream is(arg.c_str());
                is >> x >> y;
-               par_->GetXY(x1, y1);
+               par_->getXY(x1, y1);
                mathcursor->SetPos(x1 + x, y1 + y);
                updateLocal(bv, false);
        }
index aa85a3b06c856c9163cd870ea3abfad576997664..73313dbc9b6175e8c1e5250d249ea2722a03f12b 100644 (file)
@@ -117,7 +117,7 @@ public:
        ///
        MathInset * par() const;
        ///
-       virtual void Metrics() const;
+       virtual void metrics() const;
 protected:
        ///
        virtual void updateLocal(BufferView * bv, bool mark_dirty);
index aa39a8d0687a813ec17704c35b5dcb602fe92e15..1751096c306cd2a63a2e458332a2bb3ed9d6a4da 100644 (file)
@@ -62,20 +62,20 @@ Inset * InsetFormulaMacro::clone(Buffer const &, bool) const
 void InsetFormulaMacro::write(ostream & os) const
 {
        os << "FormulaMacro ";
-       tmacro()->Write(os, false);
+       tmacro()->write(os, false);
 }
 
 
 int InsetFormulaMacro::latex(ostream & os, bool fragile, 
                             bool /*free_spacing*/) const
 {
-       tmacro()->Write(os, fragile);
+       tmacro()->write(os, fragile);
        return 2;
 }
 
 int InsetFormulaMacro::ascii(ostream & os, int) const
 {
-       tmacro()->Write(os, false);
+       tmacro()->write(os, false);
        return 0;
 }
 
@@ -97,7 +97,7 @@ void InsetFormulaMacro::read(LyXLex & lex)
        // Awful hack...
        par_ = mathed_parse(lex);
        MathMacroTable::insertTemplate(tmacro());
-       par_->Metrics(LM_ST_TEXT);
+       par_->metrics(LM_ST_TEXT);
 }
 
 
@@ -121,7 +121,7 @@ int InsetFormulaMacro::descent(BufferView *, LyXFont const &) const
 
 int InsetFormulaMacro::width(BufferView *, LyXFont const & f) const
 {
-       tmacro()->Metrics(LM_ST_TEXT);
+       tmacro()->metrics(LM_ST_TEXT);
        return 10 + lyxfont::width(prefix(), f) + tmacro()->width();
 }
 
index 83577735db2a36e8e8d01bb94ff7e5a2187d9726..e886bc61d2360f0acc6caa25a0021025afa4a87e 100644 (file)
@@ -17,7 +17,7 @@ MathInset * MathArrayInset::clone() const
 }
 
 
-void MathArrayInset::Write(std::ostream & os, bool fragile) const
+void MathArrayInset::write(std::ostream & os, bool fragile) const
 {
        if (fragile)
                os << "\\protect";
@@ -31,7 +31,7 @@ void MathArrayInset::Write(std::ostream & os, bool fragile) const
                os << colinfo_[col].h_align_;
        os << "}\n";
 
-       MathGridInset::Write(os, fragile);
+       MathGridInset::write(os, fragile);
 
        if (fragile)
                os << "\\protect";
index 71888145c88a4470f6bcb351d2a6fe213abad548..8719f26835ba2af2d12290f6912de21eea604d49 100644 (file)
@@ -16,7 +16,7 @@ public:
        ///
        virtual MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
 };
 
 #endif
index cba5e869c50ad9d9b94e79d5c8945fff18404997..9b5e224cc8cff6691312821709cac51b9a44545a 100644 (file)
@@ -9,7 +9,7 @@ using std::ostream;
 MathBigopInset::MathBigopInset(string const & name, int id)
        : sym_(id)
 {
-       SetName(name);
+       setName(name);
 }
 
 
@@ -19,20 +19,20 @@ MathInset * MathBigopInset::clone() const
 }
 
 
-void MathBigopInset::Write(ostream & os, bool /* fragile */) const
+void MathBigopInset::write(ostream & os, bool /* fragile */) const
 {
        //bool f = sym_ != LM_int && sym_ != LM_oint && size() == LM_ST_DISPLAY;
        os << '\\' << name();
 }
 
 
-void MathBigopInset::WriteNormal(ostream & os) const
+void MathBigopInset::writeNormal(ostream & os) const
 {
        os << "[bigop " << name() << "] ";
 }
 
 
-void MathBigopInset::Metrics(MathStyles st)
+void MathBigopInset::metrics(MathStyles st)
 {
        //cerr << "\nBigopDraw\n";
        size(st);
index 7c5675092096809cffaebcc072deaa8409e92462..eaef44e808dae49752d28a4f40fd800b88dcc7d5 100644 (file)
@@ -12,11 +12,11 @@ public:
        ///
        MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        void draw(Painter &, int, int);
        ///
index a3b77d5a2d6057c826c2aa500b1a7767dd5f1283..961e82681732b4b3e34e298922f82ce633d6bf19 100644 (file)
@@ -239,8 +239,8 @@ bool MathCursor::Left(bool sel)
        if (macro_mode) {
                // was MacroModeBack()
                if (!imacro->name().empty()) {
-                       imacro->SetName(imacro->name().substr(0, imacro->name().length()-1));
-                       imacro->Metrics(imacro->size());
+                       imacro->setName(imacro->name().substr(0, imacro->name().length()-1));
+                       imacro->metrics(imacro->size());
                } else
                        MacroModeClose();
                return true;
@@ -402,7 +402,7 @@ void MathCursor::insert(char c, MathTextCodes t)
        if (macro_mode) {
                if (MathIsAlphaFont(t) || t == LM_TC_MIN) {
                        // was MacroModeinsert(c);
-                       imacro->SetName(imacro->name() + static_cast<char>(c));
+                       imacro->setName(imacro->name() + static_cast<char>(c));
                        return;
                }
        }
@@ -604,7 +604,7 @@ bool MathCursor::toggleLimits()
 
 void MathCursor::SetSize(MathStyles size)
 {
-       cursor().par_->UserSetSize(size);
+       cursor().par_->userSetSize(size);
 }
 
 
@@ -737,7 +737,7 @@ void MathCursor::Interpret(string const & s)
                        if (oldsel) 
                                SelPaste();
                }
-               p->Metrics(p->size());
+               p->metrics(p->size());
        }
 }
 
@@ -981,7 +981,7 @@ MathInset * MathCursor::enclosing(MathInsetTypes t, int & idx) const
 {
        for (int i = Cursor_.size() - 1; i >= 0; --i) {
                //lyxerr << "checking level " << i << "\n";
-               if (Cursor_[i].par_->GetType() == t) {
+               if (Cursor_[i].par_->getType() == t) {
                        idx = Cursor_[i].idx_;
                        return Cursor_[i].par_;
                }
@@ -1169,7 +1169,7 @@ void MathCursor::splitCell()
 void MathCursor::breakLine()
 {
        MathMatrixInset * p = static_cast<MathMatrixInset *>(formula()->par());
-       if (p->GetType() == LM_OT_SIMPLE || p->GetType() == LM_OT_EQUATION) {
+       if (p->getType() == LM_OT_SIMPLE || p->getType() == LM_OT_EQUATION) {
                p->mutate(LM_OT_EQNARRAY);
                p->addRow(0);
                cursor().idx_ = p->nrows();
index 43153ee93c160774a15f2230943cefb1b5fef2a3..e547aa52dbf641586710db8fc48c21e23f7d86b4 100644 (file)
@@ -25,9 +25,9 @@ MathInset * MathDecorationInset::clone() const
 
 
 
-void MathDecorationInset::Metrics(MathStyles st)
+void MathDecorationInset::metrics(MathStyles st)
 {
-       xcell(0).Metrics(st);
+       xcell(0).metrics(st);
        size_    = st;
        width_   = xcell(0).width();
        ascent_  = xcell(0).ascent();
@@ -60,7 +60,7 @@ void MathDecorationInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathDecorationInset::Write(ostream & os, bool fragile) const
+void MathDecorationInset::write(ostream & os, bool fragile) const
 {
        if (fragile &&
                        (name_ == "overbrace" ||
@@ -75,15 +75,15 @@ void MathDecorationInset::Write(ostream & os, bool fragile) const
        else
                os << '{';
 
-       cell(0).Write(os, fragile);  
+       cell(0).write(os, fragile);  
 
        if (deco_ != LM_not)
                os << '}';
 }
 
-void MathDecorationInset::WriteNormal(ostream & os) const
+void MathDecorationInset::writeNormal(ostream & os) const
 {
        os << "[" << name_ << " ";
-       cell(0).WriteNormal(os);
+       cell(0).writeNormal(os);
        os << "] ";
 }
index da247eb4cd192cc50c21b66a251ce5190378e21f..d9bc68393076582ad591acebd5d14820784a64c3 100644 (file)
@@ -20,11 +20,11 @@ public:
        ///
        void draw(Painter &, int, int);
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
-       void WriteNormal(std::ostream & os) const;
+       void writeNormal(std::ostream & os) const;
 private:
        ///
        int deco_;
index 6c530180cc8daf5c2df180f6ad3227dd1999621c..7db35162a4001114e4b2db615579323d407885b9 100644 (file)
@@ -20,7 +20,7 @@ MathInset * MathDelimInset::clone() const
 }
 
 
-void MathDelimInset::Write(std::ostream & os, bool fragile) const
+void MathDelimInset::write(std::ostream & os, bool fragile) const
 {
        latexkeys const * l = (left_ != '|') ?
                lm_get_key_by_id(left_, LM_TK_SYM) : 0;
@@ -37,7 +37,7 @@ void MathDelimInset::Write(std::ostream & os, bool fragile) const
                        os << char(left_) << ' ';
        }
 
-       cell(0).Write(os, fragile);
+       cell(0).write(os, fragile);
 
        os << "\\right";
        if (r)
@@ -86,9 +86,9 @@ int MathDelimInset::dw() const
 }
 
 
-void MathDelimInset::Metrics(MathStyles st)
+void MathDelimInset::metrics(MathStyles st)
 {
-       xcell(0).Metrics(st);
+       xcell(0).metrics(st);
        size_    = st;
        ascent_  = xcell(0).ascent() + 2;
        descent_ = xcell(0).descent() + 2;
index 8ab72b17d145c2c78f53dbd6cbbad093cd6b91c5..6dde45708809bc699eaf6f58d5352d2cf9fffafd 100644 (file)
@@ -20,9 +20,9 @@ public:
        ///
        void draw(Painter &, int, int);
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
 private:
        int dw() const;
        ///
index f29b3a52f79f689ec7d063457708525fd6406f88..4466879a5523a4c05b54a6e94f26c2fbe4224380 100644 (file)
@@ -31,7 +31,7 @@ void MathDotsInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathDotsInset::Metrics(MathStyles st)
+void MathDotsInset::metrics(MathStyles st)
 {
        size(st);
        mathed_char_dim(LM_TC_VAR, size(), 'M', ascent_, descent_, width_);
@@ -44,13 +44,13 @@ void MathDotsInset::Metrics(MathStyles st)
 } 
 
 
-void MathDotsInset::Write(ostream & os, bool /* fragile */) const
+void MathDotsInset::write(ostream & os, bool /* fragile */) const
 {
        os << '\\' << name() << ' ';
 }
 
 
-void MathDotsInset::WriteNormal(ostream & os) const
+void MathDotsInset::writeNormal(ostream & os) const
 {
        os << "[" << name() << "] ";
 }
index 7f1b29e276c8bebfb9ca40393c6210beb3691a75..9f0937a127a80535eba19c45026bcc6e3ddca5a9 100644 (file)
@@ -19,11 +19,11 @@ public:
        ///
        void draw(Painter &, int, int);
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
 protected:
        ///
        int dh_;
index 1bb6b902c49cc35ca7274f8aebcba90f6096f58e..2f195276fa503f6b0d2c30715ba41577bcf666c0 100644 (file)
@@ -19,11 +19,11 @@ MathInset * MathFracInset::clone() const
 }
 
 
-void MathFracInset::Metrics(MathStyles st)
+void MathFracInset::metrics(MathStyles st)
 {
        size_    = smallerStyleFrac(st);
-       xcell(0).Metrics(size_);
-       xcell(1).Metrics(size_);
+       xcell(0).metrics(size_);
+       xcell(1).metrics(size_);
        width_   = std::max(xcell(0).width(), xcell(1).width()) + 4; 
        ascent_  = xcell(0).height() + 4 + 5;
        descent_ = xcell(1).height() + 4 - 5; 
@@ -43,22 +43,22 @@ void MathFracInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathFracInset::Write(std::ostream & os, bool fragile) const
+void MathFracInset::write(std::ostream & os, bool fragile) const
 {
        os << '\\' << name() << '{';
-       cell(0).Write(os, fragile);
+       cell(0).write(os, fragile);
        os << "}{";
-       cell(1).Write(os, fragile);
+       cell(1).write(os, fragile);
        os << '}';
 }
 
 
-void MathFracInset::WriteNormal(std::ostream & os) const
+void MathFracInset::writeNormal(std::ostream & os) const
 {
        os << '[' << name() << ' ';
-       cell(0).WriteNormal(os);
+       cell(0).writeNormal(os);
        os << " ";
-       cell(1).WriteNormal(os);
+       cell(1).writeNormal(os);
        os << "] ";
 }
 
index 4a3e7ab8e841b24e51f9fd2d84c08ac7c4ad1a4f..bbbeea420af1c0bca5fa5ac726d1fbe67bb65086 100644 (file)
@@ -18,11 +18,11 @@ public:
        ///
        virtual MathInset * clone() const;
        ///
-       virtual void Write(std::ostream &, bool fragile) const;
+       virtual void write(std::ostream &, bool fragile) const;
        ///
-       virtual void WriteNormal(std::ostream &) const;
+       virtual void writeNormal(std::ostream &) const;
        ///
-       virtual void Metrics(MathStyles st);
+       virtual void metrics(MathStyles st);
        ///
        virtual void draw(Painter &, int x, int baseline);
        ///
index 933b0f344695dfed8de428688a410abb7329b86b..e0ce29cddff29b83057707e12102a05749fb13f5 100644 (file)
@@ -17,7 +17,7 @@ extern LyXFont WhichFont(short type, int size);
 MathFuncInset::MathFuncInset(string const & nm, MathInsetTypes ot)
        : MathInset(0, nm, ot)
 {
-       lims_ = (GetType() == LM_OT_FUNCLIM);
+       lims_ = (getType() == LM_OT_FUNCLIM);
 }
 
 
@@ -27,19 +27,19 @@ MathInset * MathFuncInset::clone() const
 }
 
 
-void MathFuncInset::Write(std::ostream & os, bool /* fragile */) const
+void MathFuncInset::write(std::ostream & os, bool /* fragile */) const
 {
        os << "\\" << name_ << ' ';
 }
 
 
-void MathFuncInset::WriteNormal(std::ostream & os) const
+void MathFuncInset::writeNormal(std::ostream & os) const
 {
        os << "[" << name_ << "] ";
 }
 
 
-void MathFuncInset::Metrics(MathStyles st) 
+void MathFuncInset::metrics(MathStyles st) 
 {
        size_ = st;
        if (name_.empty()) 
index 5c7dcf0c1e817a625ec8919256548ec3c5daa810..e054574781917ff5f83986812baa56d4567d68e1 100644 (file)
@@ -21,11 +21,11 @@ public:
        ///
        void draw(Painter &, int, int);
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
 private:
        ///
        bool lims_;
index bfd69f770a6bd112a724d533b7939310c26179dc..7ebad3dc52bc7d0e166e4bdb32f256304648d2c9 100644 (file)
@@ -74,10 +74,10 @@ char MathGridInset::valign() const
        return v_align_;
 }
 
-void MathGridInset::Metrics(MathStyles st)
+void MathGridInset::metrics(MathStyles st)
 {
        // let the cells adjust themselves
-       MathInset::Metrics(st);
+       MathInset::metrics(st);
        size_ = st;
 
        // adjust vertical structure
@@ -212,7 +212,7 @@ void MathGridInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathGridInset::Write(std::ostream & os, bool fragile) const
+void MathGridInset::write(std::ostream & os, bool fragile) const
 {
        for (int row = 0; row < nrows(); ++row) {
                if (row)
@@ -220,7 +220,7 @@ void MathGridInset::Write(std::ostream & os, bool fragile) const
                for (int col = 0; col < ncols(); ++col) {
                        if (col)
                                os << " & ";
-                       cell(index(row, col)).Write(os, fragile);
+                       cell(index(row, col)).write(os, fragile);
                }
        }
 }
index 027433705ea4b3e1423bca6088bc11e0736c76a7..8f555774023302506861063968fcb07d57d677f9 100644 (file)
@@ -56,9 +56,9 @@ public:
        ///
        virtual MathInset * clone() const = 0;
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        void draw(Painter &, int, int);
        ///
index b5980fc019530eeea4bbb7a63ff6fdc26233793b..c086623e0b9e95e512d5b67390b6968c20555e7b 100644 (file)
@@ -72,19 +72,19 @@ string const & MathInset::name() const
 }
 
 
-MathInsetTypes MathInset::GetType() const
+MathInsetTypes MathInset::getType() const
 {
        return objtype;
 }
 
 
-void MathInset::SetType(MathInsetTypes t)
+void MathInset::setType(MathInsetTypes t)
 {
        objtype = t;
 }
 
 
-void MathInset::SetName(string const & n)
+void MathInset::setName(string const & n)
 {
        name_ = n;
 }
@@ -103,7 +103,7 @@ void MathInset::size(MathStyles s)
 
 std::ostream & operator<<(std::ostream & os, MathInset const & inset)
 {
-       inset.Write(os, false);
+       inset.write(os, false);
        return os;
 }
 
@@ -170,11 +170,11 @@ void MathInset::substitute(MathArray & array, MathMacro const & m) const
        array.push_back(p);
 }
 
-void MathInset::Metrics(MathStyles st)
+void MathInset::metrics(MathStyles st)
 {
        size_ = st;
        for (int i = 0; i < nargs(); ++i)
-               xcell(i).Metrics(st);
+               xcell(i).metrics(st);
 }
 
 void MathInset::draw(Painter & pain, int x, int y)
@@ -300,7 +300,7 @@ bool MathInset::idxLastDown(int &, int &) const
 }
 
 
-void MathInset::GetXY(int & x, int & y) const
+void MathInset::getXY(int & x, int & y) const
 {
    x = xo();
    y = yo();
@@ -308,7 +308,7 @@ void MathInset::GetXY(int & x, int & y) const
 
 
 /*
-void MathInset::UserSetSize(MathStyles sz)
+void MathInset::userSetSize(MathStyles sz)
 {
        if (sz >= 0) {
                size_ = sz;      
@@ -317,7 +317,7 @@ void MathInset::UserSetSize(MathStyles sz)
 }
 */
 
-void MathInset::WriteNormal(std::ostream & os) const
+void MathInset::writeNormal(std::ostream & os) const
 {
        os << "[" << name_ << "] ";
 }
@@ -326,7 +326,7 @@ void MathInset::WriteNormal(std::ostream & os) const
 void MathInset::dump() const
 {
        lyxerr << "---------------------------------------------\n";
-       Write(lyxerr, false);
+       write(lyxerr, false);
        lyxerr << "\n";
        for (int i = 0; i < nargs(); ++i)
                lyxerr << cell(i) << "\n";
@@ -361,10 +361,10 @@ bool MathInset::covers(int x, int y) const
                y <= yo_ + descent_;
 }
 
-void MathInset::Validate(LaTeXFeatures & features) const
+void MathInset::validate(LaTeXFeatures & features) const
 {
        for (int i = 0; i < nargs(); ++i)
-               cell(i).Validate(features);
+               cell(i).validate(features);
 }
 
 std::vector<int> MathInset::idxBetween(int from, int to) const
index d2919dcb43465b9bc1f550d6ec53e3111841c2d9..a55b876360ea49cc5886be44f5794c5594359f68 100644 (file)
@@ -43,28 +43,25 @@ class LaTeXFeatures;
 
 class MathInset {
 public: 
-       /** A math inset has a name (usually its LaTeX name),
-           type and font-size
-       */
        ///
        explicit MathInset
        (int na = 0, string const & nm = string(), MathInsetTypes ot = LM_OT_SIMPLE);
 
-       /// The virtual base destructor
+       /// the virtual base destructor
        virtual ~MathInset() {}
 
-       /// Draw the object
+       /// draw the object, sets xo_ and yo_ cached values 
        virtual void draw(Painter &, int x, int baseline) = 0;  
-       /// Write LaTeX and Lyx code
-       virtual void Write(std::ostream &, bool fragile) const = 0;
-       /// Write normalized content
-       virtual void WriteNormal(std::ostream &) const;
-       /// Reproduces itself
+       /// write LaTeX and Lyx code
+       virtual void write(std::ostream &, bool fragile) const = 0;
+       /// write normalized content
+       virtual void writeNormal(std::ostream &) const;
+       /// reproduce itself
        virtual MathInset * clone() const = 0;
-       /// Appends itself with macro arguments substituted
+       /// appends itself with macro arguments substituted
        virtual void substitute(MathArray & array, MathMacro const & macro) const;
-       /// Compute the size of the object
-       virtual void Metrics(MathStyles st) = 0;
+       /// compute the size of the object, sets ascend_, descend_ and width_
+       virtual void metrics(MathStyles st) = 0;
        /// 
        virtual int ascent() const;
        ///
@@ -80,12 +77,14 @@ public:
        ///
        string const & name() const;
        ///
-       MathInsetTypes GetType() const;
+       MathInsetTypes getType() const;
+       ///
+       MathInsetTypes GetType() const { return getType(); }
        //Man:  Avoid to use these functions if it's not strictly necessary 
        ///
-       virtual void SetType(MathInsetTypes t);
+       virtual void setType(MathInsetTypes t);
        ///
-       virtual void SetName(string const & n);
+       virtual void setName(string const & n);
        ///
        MathStyles size() const;
 
@@ -172,10 +171,10 @@ public:
        virtual void delCol(int) {}
 
        ///
-       virtual void UserSetSize(MathStyles &) {}
+       virtual void userSetSize(MathStyles &) {}
 
        ///
-       void GetXY(int & x, int & y) const;
+       void getXY(int & x, int & y) const;
        ///
        bool covers(int x, int y) const;
        /// Identifies things that can get scripts
@@ -196,24 +195,24 @@ public:
        void dump() const;
 
        ///
-       void Validate(LaTeXFeatures & features) const;
+       void validate(LaTeXFeatures & features) const;
 
        ///
        static int workwidth;
 protected:
-       ///
+       /// usually the LaTeX name of the thingy
        string name_;
-       ///
+       ///  
        MathInsetTypes objtype;
-       ///
+       /// the width of this inset as computed by metrics()
        int width_;
-       ///
+       /// 
        int ascent_;
        ///
        int descent_;
-       ///
+       /// 
        void size(MathStyles s);
-       ///
+       /// the used font size
        MathStyles size_;
 
 protected:
@@ -222,14 +221,14 @@ protected:
        /**
         * The contents of the inset are contained here.
         * Each inset is build from a number of insets.
-        * For instance, a
         */
        cells_type cells_;
 
 private:
-       /// Cursor start position in pixels from the document top
+       /// the following are used for positioning the cursor with the mouse
+       /// cached cursor start position in pixels from the document left
        int xo_;
-       ///
+       /// cached cursor start position in pixels from the document top
        int yo_;
 };
 
index 143b547cdaafe011652531668d852e58e951ac05..ba0a4906411e6aea5a7582af5fd7d7ed27c34e10 100644 (file)
@@ -49,11 +49,11 @@ MathInset * MathMacro::clone() const
 }
 
 
-void MathMacro::Metrics(MathStyles st)
+void MathMacro::metrics(MathStyles st)
 {
        if (mathcursor && mathcursor->isInside(this)) {
                expanded_ = tmplate_->xcell(0);
-               expanded_.Metrics(st);
+               expanded_.metrics(st);
                size_    = st;
                width_   = expanded_.width()   + 4;
                ascent_  = expanded_.ascent()  + 2;
@@ -68,7 +68,7 @@ void MathMacro::Metrics(MathStyles st)
 
                for (int i = 0; i < nargs(); ++i) {
                        MathXArray & c = xcell(i);
-                       c.Metrics(st);
+                       c.metrics(st);
                        width_    = std::max(width_, c.width() + lwid);
                        descent_ += std::max(c.ascent(),  lasc) + 5;
                        descent_ += std::max(c.descent(), ldes) + 5;
@@ -76,7 +76,7 @@ void MathMacro::Metrics(MathStyles st)
        } else {
                expanded_ = tmplate_->xcell(0);
                expanded_.data_.substitute(*this);
-               expanded_.Metrics(st);
+               expanded_.metrics(st);
                size_    = st;
                width_   = expanded_.width()   + 6;
                ascent_  = expanded_.ascent()  + 3;
@@ -90,7 +90,7 @@ void MathMacro::draw(Painter & pain, int x, int y)
        xo(x);
        yo(y);
 
-       Metrics(size());
+       metrics(size());
 
        LColor::color col;
 
@@ -138,12 +138,12 @@ void MathMacro::dump(std::ostream & os) const
        os << endl;
 }
 
-void MathMacro::Write(std::ostream & os, bool fragile) const
+void MathMacro::write(std::ostream & os, bool fragile) const
 {
        os << '\\' << name_;
        for (int i = 0; i < nargs(); ++i) {
                os << '{';
-               cell(i).Write(os, fragile);
+               cell(i).write(os, fragile);
                os << '}';
        }
        if (nargs() == 0) 
@@ -151,11 +151,11 @@ void MathMacro::Write(std::ostream & os, bool fragile) const
 }
 
 
-void MathMacro::WriteNormal(std::ostream & os) const
+void MathMacro::writeNormal(std::ostream & os) const
 {
        os << "[macro " << name_ << " ";
        for (int i = 0; i < nargs(); ++i) {
-               cell(i).WriteNormal(os);
+               cell(i).writeNormal(os);
                os << ' ';
        }
        os << "] ";
@@ -186,9 +186,9 @@ bool MathMacro::idxRight(int &, int &) const
 }
 
 
-void MathMacro::Validate(LaTeXFeatures & features) const
+void MathMacro::validate(LaTeXFeatures & features) const
 {
        if (name_ == "binom")
                features.binom = true;
-       MathInset::Validate(features);
+       MathInset::validate(features);
 }
index a820b708aa5389eff2a3d6a0b855bd0f5f31058d..08eacce559efb538ddbe070c282f263a335047dd 100644 (file)
@@ -43,13 +43,13 @@ public:
        ///
        void draw(Painter &, int, int);
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
        void dump(std::ostream & os) const;
 
@@ -63,7 +63,7 @@ public:
        bool idxRight(int &, int &) const;
 
        ///
-       void Validate(LaTeXFeatures &) const;
+       void validate(LaTeXFeatures &) const;
 
 private:
        ///
index 325cf2010c105caab8d546cb23b2ec86c8240f36..efd0e392e189b4324de2138fc7333e9c93a97a32 100644 (file)
@@ -34,7 +34,7 @@ void MathMacroArgument::draw(Painter & pain, int x, int y)
 }
 
 
-void MathMacroArgument::Metrics(MathStyles st)
+void MathMacroArgument::metrics(MathStyles st)
 {
        char str[] = "#0";
        str[1] += number_; 
@@ -43,13 +43,13 @@ void MathMacroArgument::Metrics(MathStyles st)
 }
 
 
-void MathMacroArgument::Write(std::ostream & os, bool /*fragile*/) const
+void MathMacroArgument::write(std::ostream & os, bool /*fragile*/) const
 {
        os << '#' << number_ << ' ';
 }
 
 
-void MathMacroArgument::WriteNormal(std::ostream & os) const
+void MathMacroArgument::writeNormal(std::ostream & os) const
 {
        os << "[macroarg " << number_ << "] ";
 }
index 594b7100e4ef3b70d3f79e26c89896794b832816..0e2f7aa70ec5cbbf6fe586512fd8113dd8d33e36 100644 (file)
@@ -18,13 +18,13 @@ public:
        ///
        MathInset * clone() const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        void draw(Painter &, int x, int baseline);
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
        void substitute(MathArray & array, MathMacro const & macro) const;
 
index 6d64a524c6651073359bc6eb27f05dc1a71c9749..9edad8ca51ae996f647f6eba132863348fd8e7f5 100644 (file)
@@ -36,7 +36,7 @@ void MathMacroTemplate::numargs(int numargs)
 }
 
 
-void MathMacroTemplate::Write(std::ostream & os, bool fragile) const
+void MathMacroTemplate::write(std::ostream & os, bool fragile) const
 {
        os << "\n\\newcommand{\\" << name_ << "}";
 
@@ -44,14 +44,14 @@ void MathMacroTemplate::Write(std::ostream & os, bool fragile) const
                os << "[" << numargs_ << "]";
 
        os << "{";
-       cell(0).Write(os, fragile);
+       cell(0).write(os, fragile);
        os << "}\n";
 }
 
 
-void MathMacroTemplate::Metrics(MathStyles st)
+void MathMacroTemplate::metrics(MathStyles st)
 {
-       xcell(0).Metrics(st);
+       xcell(0).metrics(st);
        size_    = st;
        width_   = xcell(0).width() + 4;
        ascent_  = xcell(0).ascent() + 2;
index c1cc9eb94c2da964762055ae13d8a7773ff11b1d..042edcadbab86055e92e8ec69aa7364c451ec88d 100644 (file)
@@ -24,7 +24,7 @@ public:
        ///
        MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        /// Number of arguments
        int numargs() const;
        ///
@@ -32,7 +32,7 @@ public:
        ///
        void draw(Painter &, int, int);
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
 private:
        ///
        int numargs_;
index 042c4f23f7c09341ce68f11a7b8a03d86bb494ba..fec3f1ea111e910b93538c430258ffa024f61c64 100644 (file)
@@ -92,12 +92,12 @@ MathInset * MathMatrixInset::clone() const
 }
 
 
-void MathMatrixInset::Metrics(MathStyles /* st */)
+void MathMatrixInset::metrics(MathStyles /* st */)
 {
-       size_ = (GetType() == LM_OT_SIMPLE) ? LM_ST_TEXT : LM_ST_DISPLAY;
+       size_ = (getType() == LM_OT_SIMPLE) ? LM_ST_TEXT : LM_ST_DISPLAY;
 
        // let the cells adjust themselves
-       MathGridInset::Metrics(size_);
+       MathGridInset::metrics(size_);
 
        if (display()) {
                ascent_  += 12;
@@ -132,7 +132,7 @@ void MathMatrixInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathMatrixInset::Write(std::ostream & os, bool fragile) const
+void MathMatrixInset::write(std::ostream & os, bool fragile) const
 {
   header_write(os);
 
@@ -144,7 +144,7 @@ void MathMatrixInset::Write(std::ostream & os, bool fragile) const
                for (int col = 0; col < ncols(); ++col) {
                        if (col)
                                os << " & ";
-                       cell(index(row, col)).Write(os, fragile);
+                       cell(index(row, col)).write(os, fragile);
                }
                if (n) {
                        if (!label_[row].empty())
@@ -189,7 +189,7 @@ bool MathMatrixInset::ams() const
 
 bool MathMatrixInset::display() const
 {
-       return GetType() != LM_OT_SIMPLE;
+       return getType() != LM_OT_SIMPLE;
 }
 
 
@@ -205,7 +205,7 @@ std::vector<string> const MathMatrixInset::getLabelList() const
 
 bool MathMatrixInset::numberedType() const
 {
-       if (GetType() == LM_OT_SIMPLE)
+       if (getType() == LM_OT_SIMPLE)
                return false;
        for (int row = 0; row < nrows(); ++row)
                if (!nonum_[row])
@@ -214,19 +214,19 @@ bool MathMatrixInset::numberedType() const
 }
 
 
-void MathMatrixInset::Validate(LaTeXFeatures & features) const
+void MathMatrixInset::validate(LaTeXFeatures & features) const
 {
        features.amsstyle = ams();
 
        // Validation is necessary only if not using AMS math.
-       // To be safe, we will always run mathedValidate.
+       // To be safe, we will always run mathedvalidate.
        //if (features.amsstyle)
        //  return;
 
        features.boldsymbol = true;
        //features.binom      = true;
 
-       MathInset::Validate(features);
+       MathInset::validate(features);
 }
 
 
@@ -234,7 +234,7 @@ void MathMatrixInset::header_write(std::ostream & os) const
 {
        bool n = numberedType();
 
-       switch (GetType()) {
+       switch (getType()) {
                case LM_OT_SIMPLE:
                        os << "\\("; 
                        break;
@@ -268,7 +268,7 @@ void MathMatrixInset::footer_write(std::ostream & os) const
 {
        bool n = numberedType();
 
-       switch (GetType()) {
+       switch (getType()) {
                case LM_OT_SIMPLE:
                        os << "\\)";
                        break;
@@ -322,7 +322,7 @@ void MathMatrixInset::delRow(int row)
 
 void MathMatrixInset::addCol(int col)
 {
-       switch (GetType()) {
+       switch (getType()) {
                case LM_OT_EQUATION:
                        mutate(LM_OT_EQNARRAY);
                        break;
@@ -347,7 +347,7 @@ void MathMatrixInset::addCol(int col)
 
 void MathMatrixInset::delCol(int col)
 {
-       switch (GetType()) {
+       switch (getType()) {
                case LM_OT_ALIGN:
                        MathGridInset::delCol(col);
                        break;
@@ -395,7 +395,7 @@ void MathMatrixInset::mutate(string const & newtype)
                dump();
                return;
        }
-       //lyxerr << "mutating from '" << GetType() << "' to '" << newtype << "'\n";
+       //lyxerr << "mutating from '" << getType() << "' to '" << newtype << "'\n";
        mutate(typecode(newtype));
 }
 
@@ -410,14 +410,14 @@ void MathMatrixInset::glueall()
 
 void MathMatrixInset::mutate(short newtype)
 {
-       //lyxerr << "mutating from '" << GetType() << "' to '" << newtype << "'\n";
+       //lyxerr << "mutating from '" << getType() << "' to '" << newtype << "'\n";
 
-       if (newtype == GetType())
+       if (newtype == getType())
                return;
 
-       switch (GetType()) {
+       switch (getType()) {
                case LM_OT_SIMPLE:
-                       SetType(LM_OT_EQUATION);
+                       setType(LM_OT_EQUATION);
                        numbered(0, false);
                        mutate(newtype);
                        break;
@@ -425,7 +425,7 @@ void MathMatrixInset::mutate(short newtype)
                case LM_OT_EQUATION:
                        switch (newtype) {
                                case LM_OT_SIMPLE:
-                                       SetType(LM_OT_SIMPLE);
+                                       setType(LM_OT_SIMPLE);
                                        break;
 
                                case LM_OT_ALIGN: {
@@ -438,7 +438,7 @@ void MathMatrixInset::mutate(short newtype)
                                        cell(1).erase(0, pos);
 
                                        halign("rl");
-                                       SetType(LM_OT_ALIGN);
+                                       setType(LM_OT_ALIGN);
                                        break;
                                }
 
@@ -459,7 +459,7 @@ void MathMatrixInset::mutate(short newtype)
                                        cell(2).erase(0, pos2);
 
                                        halign("rcl");
-                                       SetType(LM_OT_EQNARRAY);
+                                       setType(LM_OT_EQNARRAY);
                                        mutate(newtype);
                                        break;
                                }
@@ -500,7 +500,7 @@ void MathMatrixInset::mutate(short newtype)
                                                cell(c).push_back(cell(c + 1));
                                        }
                                        MathGridInset::delCol(2);
-                                       SetType(LM_OT_ALIGN);
+                                       setType(LM_OT_ALIGN);
                                        halign("rl");
                                        mutate(newtype);
                                        break;
@@ -514,20 +514,20 @@ void MathMatrixInset::mutate(short newtype)
                                case LM_OT_EQUATION:
                                case LM_OT_EQNARRAY:
                                        MathGridInset::addCol(1);
-                                       SetType(LM_OT_EQNARRAY);
+                                       setType(LM_OT_EQNARRAY);
                                        halign("rcl");
                                        mutate(newtype);
                                        break;
                                
                                default:
-                                       lyxerr << "mutation from '" << GetType()
+                                       lyxerr << "mutation from '" << getType()
                                                << "' to '" << newtype << "' not implemented\n";
                                        break;
                        }
                        break;
 
                default:
-                       lyxerr << "mutation from '" << GetType()
+                       lyxerr << "mutation from '" << getType()
                                << "' to '" << newtype << "' not implemented\n";
        }
 }
index ed37ec3eec308b7912b4ff8447c2c0a233aaef72..53c1f2065e1e305d1e2a1cdf78f95f4ffdf5cb74 100644 (file)
@@ -25,9 +25,9 @@ public:
        ///
        MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        void draw(Painter &, int, int);
        ///
@@ -47,7 +47,7 @@ public:
        ///
        std::vector<string> const getLabelList() const;
        ///
-       void Validate(LaTeXFeatures & features) const;
+       void validate(LaTeXFeatures & features) const;
 
        ///
        void addRow(int);
@@ -67,7 +67,7 @@ public:
 
 private:
        ///
-       void Validate1(LaTeXFeatures & features);
+       void validate1(LaTeXFeatures & features);
        ///
        void header_write(std::ostream &) const;
        ///
index e9b96cef8b2384547bf8ad7567913c27832fe2a3..71536cf2d5f9d0c0ab53f0b92b8d84794bf22453 100644 (file)
@@ -478,7 +478,7 @@ MathInset * mathed_parse()
                                        lyxerr[Debug::MATHED] << "1: unknown math environment: " << typ << "\n";
                        }
 
-                       p->SetName(latex_mathenv[i].basename);
+                       p->setName(latex_mathenv[i].basename);
 
                        break;
                }
@@ -762,7 +762,7 @@ void mathed_parse(MathArray & array, unsigned flags)
                                for (int i = 0; i < m->nargs(); ++i) 
                                        mathed_parse(m->cell(i), FLAG_ITEM);
                                array.push_back(m);
-                               m->Metrics(LM_ST_TEXT);
+                               m->metrics(LM_ST_TEXT);
                        } else
                                array.push_back(new MathFuncInset(yytext, LM_OT_UNDEF));
                        break;
index 4e6be68cf3927b0c760ae5d91079e56bec27ed59..d67cd851361bff5ba29097baf781d2138f3629cb 100644 (file)
@@ -30,9 +30,9 @@ MathInset * MathRootInset::clone() const
 }
 
 
-void MathRootInset::Metrics(MathStyles st)
+void MathRootInset::metrics(MathStyles st)
 {
-       MathInset::Metrics(st);
+       MathInset::metrics(st);
        size_    = st;
        ascent_  = std::max(xcell(0).ascent()  + 5, xcell(1).ascent())  + 2;
        descent_ = std::max(xcell(1).descent() + 5, xcell(0).descent()) + 2;
@@ -60,22 +60,22 @@ void MathRootInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathRootInset::Write(std::ostream & os, bool fragile) const
+void MathRootInset::write(std::ostream & os, bool fragile) const
 {
        os << "\\sqrt[";
-       cell(0).Write(os, fragile);  
+       cell(0).write(os, fragile);  
        os << "]{";
-       cell(1).Write(os, fragile);
+       cell(1).write(os, fragile);
        os << '}';
 }
 
 
-void MathRootInset::WriteNormal(std::ostream & os) const
+void MathRootInset::writeNormal(std::ostream & os) const
 {
        os << "[root ";
-       cell(1).WriteNormal(os);  
+       cell(1).writeNormal(os);  
        os << " ";
-       cell(0).WriteNormal(os);
+       cell(0).writeNormal(os);
        os << "] ";
 }
 
index 1b1fb2e360b2ea048ba80b0f6f7a911fc5800383..20a73725eedf39cb45b2eb587a847991591a99f6 100644 (file)
@@ -35,11 +35,11 @@ public:
        ///
        void draw(Painter &, int x, int baseline);
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        bool idxUp(int & idx, int & pos) const;
        ///
index 5157182f8ad881bf4a55c901431d6943f669198f..d4835efa97c41721685ba2f5e255f308603fa414 100644 (file)
@@ -143,21 +143,21 @@ bool MathScriptInset::idxLastDown(int & idx, int & pos) const
 }
 
 
-void MathScriptInset::Write(std::ostream & os, bool fragile) const
+void MathScriptInset::write(std::ostream & os, bool fragile) const
 {
        if (symbol_) {
-               symbol_->Write(os, fragile);
+               symbol_->write(os, fragile);
                if (limits())
                        os << (limits() == 1 ? "\\limits" : "\\nolimits");
        }
        if (up()) {
                os << "^{";
-               cell(0).Write(os, fragile);
+               cell(0).write(os, fragile);
                os << "}";
        }
        if (down()) {
                os << "_{";
-               cell(1).Write(os, fragile);
+               cell(1).write(os, fragile);
                os << "}";
        }
        os << " ";
@@ -194,35 +194,35 @@ bool MathScriptInset::hasLimits() const
 }
 
 
-void MathScriptInset::WriteNormal(std::ostream & os) const
+void MathScriptInset::writeNormal(std::ostream & os) const
 {
        if (limits() && symbol_) 
                os << "[" << (limits() ? "limits" : "nolimits") << "]";
        if (up()) {
                os << "[superscript ";
-               cell(0).WriteNormal(os);
+               cell(0).writeNormal(os);
                os << "] ";
        }
        if (down()) {
                os << "[subscript ";
-               cell(1).WriteNormal(os);
+               cell(1).writeNormal(os);
                os << "] ";
        }
 }
 
 
-void MathScriptInset::Metrics(MathStyles st)
+void MathScriptInset::metrics(MathStyles st)
 {
        size_ = st;
        MathStyles tt = smallerStyleScript(st);
        
-       xcell(0).Metrics(tt);
-       xcell(1).Metrics(tt);
+       xcell(0).metrics(tt);
+       xcell(1).metrics(tt);
 
        width_   = std::max(xcell(0).width(), xcell(1).width());
 
        if (hasLimits()) {
-               symbol_->Metrics(st);
+               symbol_->metrics(st);
                int wid  = symbol_->width();
                ascent_  = symbol_->ascent();
                descent_ = symbol_->descent();
@@ -244,7 +244,7 @@ void MathScriptInset::Metrics(MathStyles st)
                int wid = 0;
                mathed_char_height(LM_TC_VAR, st, 'I', asc, des);
                if (symbol_) {
-                       symbol_->Metrics(st);
+                       symbol_->metrics(st);
                        wid  = symbol_->width();
                        asc  = symbol_->ascent();
                        des = symbol_->descent();
index 359db5ee3452d317125d2ea83b2769a652e6850c..4334f019dbb7ca09619370ee5461bd08b70ccffa 100644 (file)
@@ -26,11 +26,11 @@ public:
        ///
        MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        void draw(Painter &, int x, int baseline);
 
index 83cbf6e64f4bd5847402ac85a108fa69bc2d0985..dc2dae86f6bab60407ca072a4b09f6e89b58f210 100644 (file)
@@ -43,26 +43,26 @@ void MathSizeInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathSizeInset::Metrics(MathStyles /* st */)
+void MathSizeInset::metrics(MathStyles /* st */)
 {
-       xcell(0).Metrics(style_);
+       xcell(0).metrics(style_);
        ascent_   = xcell(0).ascent_;
        descent_  = xcell(0).descent_;
        width_    = xcell(0).width_;
 }
 
 
-void MathSizeInset::Write(std::ostream & os, bool fragile) const
+void MathSizeInset::write(std::ostream & os, bool fragile) const
 {
        os << "{\\" << name() << " ";
-       cell(0).Write(os, fragile);
+       cell(0).write(os, fragile);
        os << "}";
 }
 
 
-void MathSizeInset::WriteNormal(std::ostream & os) const
+void MathSizeInset::writeNormal(std::ostream & os) const
 {
        os << "[" << name() << " ";
-       cell(0).WriteNormal(os);
+       cell(0).writeNormal(os);
        os << "]";
 }
index 98d209e5e161f4d347582d8f803d4122df900be3..26a78b3ff2d8d104f68d2f78bb67129216c2de88 100644 (file)
@@ -20,13 +20,13 @@ public:
        ///
        virtual MathInset * clone() const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        void draw(Painter &, int x, int baseline);
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
 
 private:
        ///
index 231f4c8b1c29aaafcfecbb9850ece68b3d23ffd8..75620aa8ebe8f9d310376abfbfd6b71a2c853b3b 100644 (file)
@@ -38,20 +38,20 @@ void MathSpaceInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathSpaceInset::Write(std::ostream & os, bool /* fragile */) const
+void MathSpaceInset::write(std::ostream & os, bool /* fragile */) const
 {
        if (space_ >= 0 && space_ < 6)
                os << '\\' << latex_mathspace[space_] << ' ';
 }
 
 
-void MathSpaceInset::WriteNormal(std::ostream & os) const
+void MathSpaceInset::writeNormal(std::ostream & os) const
 {
        os << "[space " << space_ << "] ";
 }
 
 
-void MathSpaceInset::Metrics(MathStyles st)
+void MathSpaceInset::metrics(MathStyles st)
 {
        size_  = st;
        width_ = space_ ? space_ * 2 : 2;
index 8edbdc198377745cac0c8803a0572eb1d94e1b17..10c72e3ff1681c72ee3d0506b90a8666b354605f 100644 (file)
@@ -19,11 +19,11 @@ public:
        ///
        void draw(Painter &, int, int);
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        bool isSpaceInset() const { return true; }
        ///
index f9097d9c9103bc4a2fae2a2d072e2739ec9fe78e..d3be4d823de92ab00297be9ad52af2d4d7fc659e 100644 (file)
@@ -19,9 +19,9 @@ MathInset * MathSqrtInset::clone() const
 }
 
 
-void MathSqrtInset::Metrics(MathStyles st)
+void MathSqrtInset::metrics(MathStyles st)
 {
-       xcell(0).Metrics(st);
+       xcell(0).metrics(st);
        size_    = st;
        ascent_  = xcell(0).ascent()  + 4;
        descent_ = xcell(0).descent() + 2;
@@ -46,17 +46,17 @@ void MathSqrtInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathSqrtInset::Write(std::ostream & os, bool fragile) const
+void MathSqrtInset::write(std::ostream & os, bool fragile) const
 {
        os << "\\sqrt{";
-       cell(0).Write(os, fragile); 
+       cell(0).write(os, fragile); 
        os << '}';
 }
 
 
-void MathSqrtInset::WriteNormal(std::ostream & os) const
+void MathSqrtInset::writeNormal(std::ostream & os) const
 {
        os << "[sqrt ";
-       cell(0).WriteNormal(os); 
+       cell(0).writeNormal(os); 
        os << "] ";
 }
index 18019df49def899c25f0d99e49e0fbd113d7b2a7..19c06e34a2aa63bf9debd5c6df3e8d2e2ff77f59 100644 (file)
@@ -20,10 +20,10 @@ public:
        ///
        void draw(Painter &, int x, int baseline);
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void WriteNormal(std::ostream &) const;
+       void writeNormal(std::ostream &) const;
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
 };
 #endif
index e05d3167e24bcba0be7f00f80ffd625177e279ed..ae078a1921c1867e66be240a79f2b9233008ae5c 100644 (file)
@@ -19,7 +19,7 @@ MathXArray::MathXArray()
 {}
 
 
-void MathXArray::Metrics(MathStyles st)
+void MathXArray::metrics(MathStyles st)
 {
        if (data_.empty()) {
                mathed_char_dim(LM_TC_VAR, st, 'I', ascent_, descent_, width_); 
@@ -37,7 +37,7 @@ void MathXArray::Metrics(MathStyles st)
                int wid;
                MathInset * p = data_.nextInset(pos);
                if (p) {
-                       p->Metrics(st);
+                       p->metrics(st);
                        asc = p->ascent();
                        des = p->descent();
                        wid = p->width();
index 7bc0bc826914eba521c18792adfcf7f1c8b47b74..6e96aa9c9fb2768bf597d854aee3cef12d9dafd4 100644 (file)
@@ -18,7 +18,7 @@ public:
        ///
        MathXArray();
        ///
-       void Metrics(MathStyles st);
+       void metrics(MathStyles st);
        ///
        void draw(Painter & pain, int x, int y);