]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_scriptinset.h
enable direct input of #1...#9; some whitespace changes
[lyx.git] / src / mathed / math_scriptinset.h
index 32424933e9ae003eb08f8e3eaa913644b9e5e49e..b6626f2806488700e283f27fad285fd0a304bc8b 100644 (file)
@@ -14,9 +14,9 @@
 
 class MathScriptInset : public MathNestInset {
 public:
-       ///
+       /// create inset without scripts
        MathScriptInset();
-       ///
+       /// create inset with single script
        explicit MathScriptInset(bool up);
        ///
        MathInset * clone() const;
@@ -34,28 +34,26 @@ public:
        ///
        void draw(MathInset const * nuc, Painter &, int x, int y) const;
        ///
-       int ascent(MathInset const * nuc) const;
+       int ascent2(MathInset const * nuc) const;
        ///
-       int descent(MathInset const * nuc) const;
+       int descent2(MathInset const * nuc) const;
        ///
-       int width(MathInset const * nuc) const;
+       int width2(MathInset const * nuc) const;
 
        ///
-       bool idxLeft(MathInset::idx_type &, MathInset::pos_type &) const;
+       bool idxLeft(idx_type &, pos_type &) const;
        ///
-       bool idxRight(MathInset::idx_type &, MathInset::pos_type &) const;
+       bool idxRight(idx_type &, pos_type &) const;
 
-       ///
+       /// identifies scriptinsets
        MathScriptInset const * asScriptInset() const;
        ///
        MathScriptInset * asScriptInset();
 
        /// set limits
        void limits(int lim) { limits_ = lim; }
-       /// 
+       /// get limits
        int limits() const { return limits_; }
-       ///
-       bool hasLimits(MathInset const * nuc) const;
        /// true if we have an "inner" position
        MathXArray const & up() const;
        /// returns subscript
@@ -74,19 +72,16 @@ public:
        void removeScript(bool up);
        /// remove script
        void removeEmptyScripts();
-       ///
+       /// make sure a script is accessible
        void ensure(bool up);
 
+       // call these methods ...2 to make compaq cxx in anal mode happy...
        /// suppresses empty braces if necessary
-       void write(MathInset const * nuc, WriteStream & os) const;
-       ///
-       void normalize(MathInset const * nuc, NormalStream & os) const;
-       ///
-       void octavize(MathInset const * nuc, OctaveStream & os) const;
-       ///
-       void maplize(MathInset const * nuc, MapleStream & os) const;
-       ///
-       void mathmlize(MathInset const * nuc, MathMLStream & os) const;
+       virtual void write2(MathInset const * nuc, WriteStream & os) const;
+       virtual void normalize2(MathInset const * nuc, NormalStream & os) const;
+       virtual void octavize2(MathInset const * nuc, OctaveStream & os) const;
+       virtual void maplize2(MathInset const * nuc, MapleStream & os) const;
+       virtual void mathmlize2(MathInset const * nuc, MathMLStream & os) const;
 
 public:
        /// returns x offset for main part
@@ -106,12 +101,14 @@ private:
        int nasc(MathInset const * nuc) const;
        /// returns descent of nucleus if any
        int ndes(MathInset const * nuc) const;
+       /// where do we have to draw the scripts?
+       bool hasLimits(MathInset const * nuc) const;
 
        /// possible subscript (index 0) and superscript (index 1)
        bool script_[2]; 
-       ///
+       /// 1 - "limits", -1 - "nolimits", 0 - "default"
        int limits_;
-       ///
+       /// cached MathMetricsInfo
        mutable MathMetricsInfo mi_;
 };