X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_inset.h;h=d2b26bc21ac82413efc24c6732f8ebc3933b5fc6;hb=701b99ecd70ac472aa53c8b2317af44def4f9670;hp=11716f1382e53d6c238c4e9c7682b6fa4346313c;hpb=57501b93064a6deed43e415beed45606054d86ad;p=lyx.git diff --git a/src/mathed/math_inset.h b/src/mathed/math_inset.h index 11716f1382..d2b26bc21a 100644 --- a/src/mathed/math_inset.h +++ b/src/mathed/math_inset.h @@ -13,6 +13,8 @@ #ifndef MATH_INSET_H #define MATH_INSET_H +#include "math_data.h" + #include "insets/insetbase.h" #include @@ -34,6 +36,7 @@ inclusion in the "real LyX insets" FormulaInset and FormulaMacroInset. class OutputParams; class MathArrayInset; class MathAMSArrayInset; +class MathBraceInset; class MathCharInset; class MathDelimInset; class MathFracInset; @@ -51,9 +54,6 @@ class MathUnknownInset; class RefInset; -class MathArray; -class MathAtom; - class NormalStream; class OctaveStream; class MapleStream; @@ -80,8 +80,6 @@ public: /// this is overridden in math text insets (i.e. mbox) bool inMathed() const { return true; } - /// substitutes macro arguments if necessary - virtual void substitute(MathMacro const & macro); /// the ascent of the inset above the baseline /// compute the size of the object for text based drawing virtual void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; @@ -98,6 +96,7 @@ public: virtual MathAMSArrayInset const * asAMSArrayInset() const { return 0; } virtual MathArrayInset * asArrayInset() { return 0; } virtual MathArrayInset const * asArrayInset() const { return 0; } + virtual MathBraceInset const * asBraceInset() const { return 0; } virtual MathCharInset const * asCharInset() const { return 0; } virtual MathDelimInset * asDelimInset() { return 0; } virtual MathDelimInset const * asDelimInset() const { return 0; } @@ -109,6 +108,8 @@ public: virtual MathGridInset const * asGridInset() const { return 0; } virtual MathHullInset * asHullInset() { return 0; } virtual MathHullInset const * asHullInset() const { return 0; } + virtual MathMacro * asMacro() { return 0; } + virtual MathMacro const * asMacro() const { return 0; } virtual MathMacroTemplate * asMacroTemplate() { return 0; } virtual MathMacroTemplate const * asMacroTemplate() const { return 0; } virtual MathMatrixInset const * asMatrixInset() const { return 0; } @@ -173,10 +174,11 @@ public: virtual std::string const & getType() const; /// change type virtual void mutate(std::string const &) {} - /// how is the inset called in the .lyx file? - virtual std::string fileInsetLabel() const; /// usually the latex name virtual std::string name() const; + + /// math stuff usually isn't allowed in text mode + virtual bool allowedIn(mode_type mode) const { return mode == MATH_MODE; } }; std::ostream & operator<<(std::ostream &, MathAtom const &);