X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_nestinset.h;h=8bf33e0038ad0aba5e594121dc47237236e6b557;hb=5507c1ad69ef62f0790b66c797c6d89166795590;hp=f2f37a22aef401f8fcfd88a95f4f40fbd2a57d42;hpb=244d75e9422f046ec150412e0e43a479f9abed90;p=lyx.git diff --git a/src/mathed/math_nestinset.h b/src/mathed/math_nestinset.h index f2f37a22ae..8bf33e0038 100644 --- a/src/mathed/math_nestinset.h +++ b/src/mathed/math_nestinset.h @@ -16,53 +16,53 @@ class LaTeXFeatures; class MathNestInset : public MathDimInset { public: /// - explicit MathNestInset(int na = 0, string const & nm = string()); + explicit MathNestInset(idx_type ncells); + /// + void metrics(MathMetricsInfo const & st) const; /// draw the object, sets xo_ and yo_ cached values - virtual void draw(Painter &, int x, int baseline); + void draw(Painter &, int x, int y) const; /// appends itself with macro arguments substituted - virtual void substitute(MathArray & array, MathMacro const & macro) const; - /// compute the size of the object, sets ascend_, descend_ and width_ - virtual void metrics(MathStyles st) = 0; + void substitute(MathMacro const & macro); + /// identifies NestInsets + MathNestInset * asNestInset() { return this; } /// The left key - virtual bool idxLeft(int & idx, int & pos) const; + bool idxLeft(idx_type & idx, pos_type & pos) const; /// The right key - virtual bool idxRight(int & idx, int & pos) const; + bool idxRight(idx_type & idx, pos_type & pos) const; /// Move one physical cell up - virtual bool idxNext(int & idx, int & pos) const; + bool idxNext(idx_type & idx, pos_type & pos) const; /// Move one physical cell down - virtual bool idxPrev(int & idx, int & pos) const; + bool idxPrev(idx_type & idx, pos_type & pos) const; /// Target pos when we enter the inset from the left by pressing "Right" - virtual bool idxFirst(int & idx, int & pos) const; + bool idxFirst(idx_type & idx, pos_type & pos) const; /// Target pos when we enter the inset from the right by pressing "Left" - virtual bool idxLast(int & idx, int & pos) const; + bool idxLast(idx_type & idx, pos_type & pos) const; /// Where should we go if we press home? - virtual bool idxHome(int & idx, int & pos) const; + bool idxHome(idx_type & idx, pos_type & pos) const; /// Where should we go if we press end? - virtual bool idxEnd(int & idx, int & pos) const; + bool idxEnd(idx_type & idx, pos_type & pos) const; /// - int nargs() const; + idx_type nargs() const; /// - MathArray & cell(int); + MathArray & cell(idx_type); /// - MathArray const & cell(int) const; + MathArray const & cell(idx_type) const; /// - MathXArray & xcell(int); + MathXArray & xcell(idx_type); /// - MathXArray const & xcell(int) const; + MathXArray const & xcell(idx_type) const; /// bool isActive() const { return nargs() > 0; } /// - void push_back(MathInset *); - /// - void push_back(unsigned char ch, MathTextCodes fcode); + void push_back(MathAtom const &); /// void dump() const;