/// cursor enters
virtual void edit(LCursor & cur, bool left);
/// cursor enters
- virtual InsetBase * editXY(LCursor & cur, int x, int y);
+ virtual InsetBase * editXY(LCursor & cur, int x, int y) const;
/// compute the size of the object returned in dim
virtual void metrics(MetricsInfo & mi, Dimension & dim) const = 0;
/// add space for markers
void metricsMarkers2(Dimension & dim, int framesize = 1) const;
/// last drawn position for 'important' insets
- virtual int xo() const { return 0; }
+ int xo() const;
/// last drawn position for 'important' insets
- virtual int yo() const { return 0; }
+ int yo() const;
/// set x/y drawing position cache if available
virtual void setPosCache(PainterInfo const &, int, int) const {}
/// do we cover screen position x/y?
virtual bool covers(int x, int y) const;
/// get the screen positions of the cursor (see note in cursor.C)
- virtual void getCursorPos(CursorSlice const & cur, int & x, int & y) const;
+ virtual void getCursorPos(LCursor const & cur, int & x, int & y) const;
/// is this an inset that can be moved into?
virtual bool isActive() const { return nargs() > 0; }
/// number of columns in gridlike structures
virtual size_t ncols() const { return 0; }
/// is called when the cursor leaves this inset
- virtual void notifyCursorLeaves(idx_type) {}
+ virtual void notifyCursorLeaves(LCursor &) {}
/// request "external features"
virtual void validate(LaTeXFeatures &) const {}
///
VSPACE_CODE,
///
- MATHGRID_CODE,
- ///
- MATHHULL_CODE
+ MATHMACROARG_CODE
};
/** returns the Code corresponding to the \c name.
enum mode_type {UNDECIDED_MODE, TEXT_MODE, MATH_MODE};
/// return text or mathmode if that is possible to determine
virtual mode_type currentMode() const { return UNDECIDED_MODE; }
+ /// returns whether this inset is allowed in other insets of given mode
+ virtual bool allowedIn(mode_type) const { return true; }
/// is this inset allowed within a font change?
virtual bool noFontChange() const { return false; }