class MathSymbolInset;
class MathUnknownInset;
-class InsetRef;
+class RefInset;
class NormalStream;
class OctaveStream;
typedef size_type row_type;
/// type for column numbers
typedef size_type col_type;
- ///
- typedef InsetBase::dispatch_result result_type;
/// our members behave nicely...
MathInset() {}
- /// the virtual base destructor
- virtual ~MathInset() {}
/// reproduce itself
virtual MathInset * clone() const = 0;
virtual void substitute(MathMacro const & macro);
/// compute the size of the object, sets ascend_, descend_ and width_
// updates the (xo,yo)-caches of all contained cells
- virtual void metrics(MathMetricsInfo & mi) const;
+ virtual void metrics(MetricsInfo & mi) const;
/// draw the object
- virtual void draw(MathPainterInfo & pi, int x, int y) const;
+ virtual void draw(PainterInfo & pi, int x, int y) const;
/// draw selection between two positions
- virtual void drawSelection(MathPainterInfo & pi,
+ virtual void drawSelection(PainterInfo & pi,
idx_type idx1, pos_type pos1, idx_type idx2, pos_type pos2) const;
/// the ascent of the inset above the baseline
/// compute the size of the object for text based drawing
/// Where should we go when we press the up or down cursor key?
virtual bool idxUpDown(idx_type & idx, pos_type & pos, bool up,
int targetx) const;
+ /// Where should we go when we press the up or down cursor key?
+ virtual bool idxUpDown2(idx_type & idx, pos_type & pos, bool up,
+ int targetx) const;
/// The left key
virtual bool idxLeft(idx_type & idx, pos_type & pos) const;
/// The right key
virtual MathSymbolInset const * asSymbolInset() const { return 0; }
virtual MathUnknownInset * asUnknownInset() { return 0; }
virtual MathUnknownInset const * asUnknownInset() const { return 0; }
- virtual InsetRef * asInsetRef() { return 0; }
+ virtual RefInset * asRefInset() { return 0; }
/// identifies things that can get scripts
virtual bool isScriptable() const { return false; }
/// dump content to stderr for debugging
virtual void dump() const;
- /// local dispatcher
- virtual result_type dispatch
- (FuncRequest const & cmd, idx_type & idx, pos_type & pos);
/// LyXInset stuff
/// write labels into a list
virtual string fileInsetLabel() const { return "Formula"; }
/// usually the latex name
virtual string name() const;
+
+protected:
+ /// a dirty hack
+ BufferView * view() const;
};
std::ostream & operator<<(std::ostream &, MathAtom const &);
// initialize math
void initMath();
-/// here to ssave a few includes in the insets
-class Dialogs;
-Dialogs & getDialogs();
-
#endif