From fda98080ccb5d208bd961fb9f73af578622f7d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 26 Jul 2001 06:56:43 +0000 Subject: [PATCH] cosmetics git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2353 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/array.C | 12 +++---- src/mathed/array.h | 6 ++-- src/mathed/formula.C | 26 +++++++-------- src/mathed/formula.h | 2 +- src/mathed/formulabase.C | 10 +++--- src/mathed/formulabase.h | 2 +- src/mathed/formulamacro.C | 10 +++--- src/mathed/math_arrayinset.C | 4 +-- src/mathed/math_arrayinset.h | 2 +- src/mathed/math_bigopinset.C | 8 ++--- src/mathed/math_bigopinset.h | 6 ++-- src/mathed/math_cursor.C | 14 ++++---- src/mathed/math_decorationinset.C | 12 +++---- src/mathed/math_decorationinset.h | 6 ++-- src/mathed/math_deliminset.C | 8 ++--- src/mathed/math_deliminset.h | 4 +-- src/mathed/math_dotsinset.C | 6 ++-- src/mathed/math_dotsinset.h | 6 ++-- src/mathed/math_fracinset.C | 18 +++++----- src/mathed/math_fracinset.h | 6 ++-- src/mathed/math_funcinset.C | 8 ++--- src/mathed/math_funcinset.h | 6 ++-- src/mathed/math_gridinset.C | 8 ++--- src/mathed/math_gridinset.h | 4 +-- src/mathed/math_inset.C | 24 +++++++------- src/mathed/math_inset.h | 55 +++++++++++++++---------------- src/mathed/math_macro.C | 22 ++++++------- src/mathed/math_macro.h | 8 ++--- src/mathed/math_macroarg.C | 6 ++-- src/mathed/math_macroarg.h | 6 ++-- src/mathed/math_macrotemplate.C | 8 ++--- src/mathed/math_macrotemplate.h | 4 +-- src/mathed/math_matrixinset.C | 52 ++++++++++++++--------------- src/mathed/math_matrixinset.h | 8 ++--- src/mathed/math_parser.C | 4 +-- src/mathed/math_rootinset.C | 16 ++++----- src/mathed/math_rootinset.h | 6 ++-- src/mathed/math_scriptinset.C | 24 +++++++------- src/mathed/math_scriptinset.h | 6 ++-- src/mathed/math_sizeinset.C | 12 +++---- src/mathed/math_sizeinset.h | 6 ++-- src/mathed/math_spaceinset.C | 6 ++-- src/mathed/math_spaceinset.h | 6 ++-- src/mathed/math_sqrtinset.C | 12 +++---- src/mathed/math_sqrtinset.h | 6 ++-- src/mathed/xarray.C | 4 +-- src/mathed/xarray.h | 2 +- 47 files changed, 248 insertions(+), 249 deletions(-) diff --git a/src/mathed/array.C b/src/mathed/array.C index aa65bbcc1b..5349db0d5e 100644 --- a/src/mathed/array.C +++ b/src/mathed/array.C @@ -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); } diff --git a/src/mathed/array.h b/src/mathed/array.h index 16da85b7d3..5f1bf949ab 100644 --- a/src/mathed/array.h +++ b/src/mathed/array.h @@ -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 buffer_type; diff --git a/src/mathed/formula.C b/src/mathed/formula.C index d761dd5cd9..5d9959adb1 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -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(par_)->Metrics(display() ? LM_ST_DISPLAY : LM_ST_TEXT); + const_cast(par_)->metrics(display() ? LM_ST_DISPLAY : LM_ST_TEXT); } vector 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(); } diff --git a/src/mathed/formula.h b/src/mathed/formula.h index b98c7ef8dc..7f4b6c0981 100644 --- a/src/mathed/formula.h +++ b/src/mathed/formula.h @@ -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; diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index d666fce5c1..5c7d71f8c3 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -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 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(par_)->Metrics(LM_ST_TEXT); + const_cast(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); } diff --git a/src/mathed/formulabase.h b/src/mathed/formulabase.h index aa85a3b06c..73313dbc9b 100644 --- a/src/mathed/formulabase.h +++ b/src/mathed/formulabase.h @@ -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); diff --git a/src/mathed/formulamacro.C b/src/mathed/formulamacro.C index aa39a8d068..1751096c30 100644 --- a/src/mathed/formulamacro.C +++ b/src/mathed/formulamacro.C @@ -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(); } diff --git a/src/mathed/math_arrayinset.C b/src/mathed/math_arrayinset.C index 83577735db..e886bc61d2 100644 --- a/src/mathed/math_arrayinset.C +++ b/src/mathed/math_arrayinset.C @@ -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"; diff --git a/src/mathed/math_arrayinset.h b/src/mathed/math_arrayinset.h index 71888145c8..8719f26835 100644 --- a/src/mathed/math_arrayinset.h +++ b/src/mathed/math_arrayinset.h @@ -16,7 +16,7 @@ public: /// virtual MathInset * clone() const; /// - void Write(std::ostream &, bool fragile) const; + void write(std::ostream &, bool fragile) const; }; #endif diff --git a/src/mathed/math_bigopinset.C b/src/mathed/math_bigopinset.C index cba5e869c5..9b5e224cc8 100644 --- a/src/mathed/math_bigopinset.C +++ b/src/mathed/math_bigopinset.C @@ -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); diff --git a/src/mathed/math_bigopinset.h b/src/mathed/math_bigopinset.h index 7c56750920..eaef44e808 100644 --- a/src/mathed/math_bigopinset.h +++ b/src/mathed/math_bigopinset.h @@ -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); /// diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index a3b77d5a2d..961e826817 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -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(c)); + imacro->setName(imacro->name() + static_cast(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(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(); diff --git a/src/mathed/math_decorationinset.C b/src/mathed/math_decorationinset.C index 43153ee93c..e547aa52db 100644 --- a/src/mathed/math_decorationinset.C +++ b/src/mathed/math_decorationinset.C @@ -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 << "] "; } diff --git a/src/mathed/math_decorationinset.h b/src/mathed/math_decorationinset.h index da247eb4cd..d9bc683930 100644 --- a/src/mathed/math_decorationinset.h +++ b/src/mathed/math_decorationinset.h @@ -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_; diff --git a/src/mathed/math_deliminset.C b/src/mathed/math_deliminset.C index 6c530180cc..7db35162a4 100644 --- a/src/mathed/math_deliminset.C +++ b/src/mathed/math_deliminset.C @@ -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; diff --git a/src/mathed/math_deliminset.h b/src/mathed/math_deliminset.h index 8ab72b17d1..6dde457088 100644 --- a/src/mathed/math_deliminset.h +++ b/src/mathed/math_deliminset.h @@ -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; /// diff --git a/src/mathed/math_dotsinset.C b/src/mathed/math_dotsinset.C index f29b3a52f7..4466879a55 100644 --- a/src/mathed/math_dotsinset.C +++ b/src/mathed/math_dotsinset.C @@ -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() << "] "; } diff --git a/src/mathed/math_dotsinset.h b/src/mathed/math_dotsinset.h index 7f1b29e276..9f0937a127 100644 --- a/src/mathed/math_dotsinset.h +++ b/src/mathed/math_dotsinset.h @@ -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_; diff --git a/src/mathed/math_fracinset.C b/src/mathed/math_fracinset.C index 1bb6b902c4..2f195276fa 100644 --- a/src/mathed/math_fracinset.C +++ b/src/mathed/math_fracinset.C @@ -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 << "] "; } diff --git a/src/mathed/math_fracinset.h b/src/mathed/math_fracinset.h index 4a3e7ab8e8..bbbeea420a 100644 --- a/src/mathed/math_fracinset.h +++ b/src/mathed/math_fracinset.h @@ -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); /// diff --git a/src/mathed/math_funcinset.C b/src/mathed/math_funcinset.C index 933b0f3446..e0ce29cddf 100644 --- a/src/mathed/math_funcinset.C +++ b/src/mathed/math_funcinset.C @@ -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()) diff --git a/src/mathed/math_funcinset.h b/src/mathed/math_funcinset.h index 5c7dcf0c1e..e054574781 100644 --- a/src/mathed/math_funcinset.h +++ b/src/mathed/math_funcinset.h @@ -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_; diff --git a/src/mathed/math_gridinset.C b/src/mathed/math_gridinset.C index bfd69f770a..7ebad3dc52 100644 --- a/src/mathed/math_gridinset.C +++ b/src/mathed/math_gridinset.C @@ -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); } } } diff --git a/src/mathed/math_gridinset.h b/src/mathed/math_gridinset.h index 027433705e..8f55577402 100644 --- a/src/mathed/math_gridinset.h +++ b/src/mathed/math_gridinset.h @@ -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); /// diff --git a/src/mathed/math_inset.C b/src/mathed/math_inset.C index b5980fc019..c086623e0b 100644 --- a/src/mathed/math_inset.C +++ b/src/mathed/math_inset.C @@ -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 MathInset::idxBetween(int from, int to) const diff --git a/src/mathed/math_inset.h b/src/mathed/math_inset.h index d2919dcb43..a55b876360 100644 --- a/src/mathed/math_inset.h +++ b/src/mathed/math_inset.h @@ -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_; }; diff --git a/src/mathed/math_macro.C b/src/mathed/math_macro.C index 143b547cda..ba0a490641 100644 --- a/src/mathed/math_macro.C +++ b/src/mathed/math_macro.C @@ -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); } diff --git a/src/mathed/math_macro.h b/src/mathed/math_macro.h index a820b708aa..08eacce559 100644 --- a/src/mathed/math_macro.h +++ b/src/mathed/math_macro.h @@ -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: /// diff --git a/src/mathed/math_macroarg.C b/src/mathed/math_macroarg.C index 325cf2010c..efd0e392e1 100644 --- a/src/mathed/math_macroarg.C +++ b/src/mathed/math_macroarg.C @@ -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_ << "] "; } diff --git a/src/mathed/math_macroarg.h b/src/mathed/math_macroarg.h index 594b7100e4..0e2f7aa70e 100644 --- a/src/mathed/math_macroarg.h +++ b/src/mathed/math_macroarg.h @@ -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; diff --git a/src/mathed/math_macrotemplate.C b/src/mathed/math_macrotemplate.C index 6d64a524c6..9edad8ca51 100644 --- a/src/mathed/math_macrotemplate.C +++ b/src/mathed/math_macrotemplate.C @@ -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; diff --git a/src/mathed/math_macrotemplate.h b/src/mathed/math_macrotemplate.h index c1cc9eb94c..042edcadba 100644 --- a/src/mathed/math_macrotemplate.h +++ b/src/mathed/math_macrotemplate.h @@ -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_; diff --git a/src/mathed/math_matrixinset.C b/src/mathed/math_matrixinset.C index 042c4f23f7..fec3f1ea11 100644 --- a/src/mathed/math_matrixinset.C +++ b/src/mathed/math_matrixinset.C @@ -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 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"; } } diff --git a/src/mathed/math_matrixinset.h b/src/mathed/math_matrixinset.h index ed37ec3eec..53c1f2065e 100644 --- a/src/mathed/math_matrixinset.h +++ b/src/mathed/math_matrixinset.h @@ -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 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; /// diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index e9b96cef8b..71536cf2d5 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -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; diff --git a/src/mathed/math_rootinset.C b/src/mathed/math_rootinset.C index 4e6be68cf3..d67cd85136 100644 --- a/src/mathed/math_rootinset.C +++ b/src/mathed/math_rootinset.C @@ -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 << "] "; } diff --git a/src/mathed/math_rootinset.h b/src/mathed/math_rootinset.h index 1b1fb2e360..20a73725ee 100644 --- a/src/mathed/math_rootinset.h +++ b/src/mathed/math_rootinset.h @@ -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; /// diff --git a/src/mathed/math_scriptinset.C b/src/mathed/math_scriptinset.C index 5157182f8a..d4835efa97 100644 --- a/src/mathed/math_scriptinset.C +++ b/src/mathed/math_scriptinset.C @@ -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(); diff --git a/src/mathed/math_scriptinset.h b/src/mathed/math_scriptinset.h index 359db5ee34..4334f019db 100644 --- a/src/mathed/math_scriptinset.h +++ b/src/mathed/math_scriptinset.h @@ -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); diff --git a/src/mathed/math_sizeinset.C b/src/mathed/math_sizeinset.C index 83cbf6e64f..dc2dae86f6 100644 --- a/src/mathed/math_sizeinset.C +++ b/src/mathed/math_sizeinset.C @@ -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 << "]"; } diff --git a/src/mathed/math_sizeinset.h b/src/mathed/math_sizeinset.h index 98d209e5e1..26a78b3ff2 100644 --- a/src/mathed/math_sizeinset.h +++ b/src/mathed/math_sizeinset.h @@ -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: /// diff --git a/src/mathed/math_spaceinset.C b/src/mathed/math_spaceinset.C index 231f4c8b1c..75620aa8eb 100644 --- a/src/mathed/math_spaceinset.C +++ b/src/mathed/math_spaceinset.C @@ -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; diff --git a/src/mathed/math_spaceinset.h b/src/mathed/math_spaceinset.h index 8edbdc1983..10c72e3ff1 100644 --- a/src/mathed/math_spaceinset.h +++ b/src/mathed/math_spaceinset.h @@ -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; } /// diff --git a/src/mathed/math_sqrtinset.C b/src/mathed/math_sqrtinset.C index f9097d9c91..d3be4d823d 100644 --- a/src/mathed/math_sqrtinset.C +++ b/src/mathed/math_sqrtinset.C @@ -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 << "] "; } diff --git a/src/mathed/math_sqrtinset.h b/src/mathed/math_sqrtinset.h index 18019df49d..19c06e34a2 100644 --- a/src/mathed/math_sqrtinset.h +++ b/src/mathed/math_sqrtinset.h @@ -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 diff --git a/src/mathed/xarray.C b/src/mathed/xarray.C index e05d3167e2..ae078a1921 100644 --- a/src/mathed/xarray.C +++ b/src/mathed/xarray.C @@ -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(); diff --git a/src/mathed/xarray.h b/src/mathed/xarray.h index 7bc0bc8269..6e96aa9c9f 100644 --- a/src/mathed/xarray.h +++ b/src/mathed/xarray.h @@ -18,7 +18,7 @@ public: /// MathXArray(); /// - void Metrics(MathStyles st); + void metrics(MathStyles st); /// void draw(Painter & pain, int x, int y);