]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacro.h
* replace int type by the correct custom type for pos, idx and size.
[lyx.git] / src / mathed / MathMacro.h
index 48acb298cf8dec689a108676440466dfbf81a7fd..050abe1849d4b2d3e432df0527c95fad91d0c08e 100644 (file)
@@ -58,15 +58,15 @@ public:
        virtual bool notifyCursorLeaves(Cursor &);
        
        /// Remove cell (starting from 0)
-       void removeArgument(size_t pos);
+       void removeArgument(pos_type pos);
        /// Insert empty cell (starting from 0)
-       void insertArgument(size_t pos);
+       void insertArgument(pos_type pos);
 
        ///
        void validate(LaTeXFeatures &) const;
 
        ///
-       void MathMacro::write(WriteStream & os) const;
+       void write(WriteStream & os) const;
        ///
        void maple(MapleStream &) const;
        ///
@@ -87,6 +87,7 @@ public:
                
        enum DisplayMode {
                DISPLAY_INIT,
+               DISPLAY_NONGREEDY_INIT,
                DISPLAY_UNFOLDED,
                DISPLAY_NORMAL,
        };
@@ -111,7 +112,7 @@ public:
        }
                
        ///
-       int optionals() const { return optionals_; }
+       size_t optionals() const { return optionals_; }
        ///
        void setOptionals(int n) { 
                if (n <= int(nargs()))
@@ -121,6 +122,7 @@ public:
 protected:
        friend class MathData;
        friend class ArgumentProxy;
+       friend class Cursor;
 
        /// update the display mode (should only be called after detaching arguments)
        void setDisplayMode(DisplayMode mode);
@@ -158,9 +160,9 @@ private:
        /// number of arguments that were really attached
        size_t attachedArgsNum_;
        /// cursor position during last draw
-       int previousCurIdx_;
+       idx_type previousCurIdx_;
        /// optional argument attached? (only in DISPLAY_NORMAL mode)
-       int optionals_;
+       size_t optionals_;
        /// fold mode to be set in next metrics call?
        bool nextFoldMode_;
        /// if macro_ == true, then here is a copy of the macro