X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathSymbol.h;h=bb18217a8416dbd9b112e84bbd4ea539760dfdef;hb=704328d3488c75733ddeb9ad5439b1907e323e39;hp=3c13afe24cd7228c20933bfc8def279c7e1442c8;hpb=6c300f72a217722652dc27db9108e1050028979c;p=lyx.git diff --git a/src/mathed/InsetMathSymbol.h b/src/mathed/InsetMathSymbol.h index 3c13afe24c..bb18217a84 100644 --- a/src/mathed/InsetMathSymbol.h +++ b/src/mathed/InsetMathSymbol.h @@ -4,7 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -14,7 +14,6 @@ #include "InsetMath.h" - namespace lyx { class latexkeys; @@ -30,16 +29,20 @@ public: /// explicit InsetMathSymbol(char const * name); /// - explicit InsetMathSymbol(std::string const & name); + explicit InsetMathSymbol(docstring const & name); /// void metrics(MetricsInfo & mi, Dimension & dim) const; /// void draw(PainterInfo &, int x, int y) const; /// - int width() const { return width_; } + int kerning(BufferView const *) const { return kerning_; } + /// + mode_type currentMode() const; /// bool isRelOp() const; + /// + bool isOrdAlpha() const; /// do we take scripts? bool isScriptable() const; /// do we take \limits or \nolimits? @@ -47,7 +50,7 @@ public: /// identifies SymbolInset as such InsetMathSymbol const * asSymbolInset() const { return this; } /// the LaTeX name of the symbol (without the backslash) - std::string name() const; + docstring name() const; /// request "external features" void validate(LaTeXFeatures & features) const; @@ -60,26 +63,33 @@ public: /// void mathematica(MathematicaStream &) const; /// - void mathmlize(MathMLStream &) const; + void mathmlize(MathStream &) const; + /// + void htmlize(HtmlStream &) const; + /// \param spacing controls whether we print spaces around + /// "operator"-type symbols or just print them raw + void htmlize(HtmlStream &, bool spacing) const; /// void octave(OctaveStream &) const; /// void write(WriteStream & os) const; /// - void infoize2(std::ostream & os) const; + void infoize2(odocstream & os) const; + /// + InsetCode lyxCode() const { return MATH_SYMBOL_CODE; } private: - virtual std::auto_ptr doClone() const; + virtual Inset * clone() const; /// latexkeys const * sym_; /// mutable int h_; - /// cached width - mutable int width_; + /// cached superscript kerning + mutable int kerning_; /// mutable bool scriptable_; }; - } // namespace lyx + #endif