class InsetTabular : public UpdatableInset {
public:
+ ///
+ enum UpdateCodes {
+ NONE = 0,
+ INIT,
+ FULL,
+ CELL,
+ CURSOR,
+ SELECTION
+ };
///
InsetTabular(Buffer *, int rows=1, int columns=1);
///
///
int width(Painter &, LyXFont const & f) const;
///
- void draw(BufferView *, const LyXFont &, int , float &) const;
+ void draw(BufferView *, const LyXFont &, int , float &, bool) const;
///
- void update(BufferView *, LyXFont const &, bool);
+ void update(BufferView *, LyXFont const &, bool =false);
///
const char * EditMessage() const;
///
///
void InsetUnlock(BufferView *);
///
- void UpdateLocal(BufferView *, bool what, bool mark_dirty);
+ void UpdateLocal(BufferView *, UpdateCodes, bool mark_dirty);
///
bool LockInsetInInset(BufferView *, UpdatableInset *);
///
///
Inset::Code LyxCode() const { return Inset::TABULAR_CODE; }
///
- void GetCursorPos(int & x, int & y) const;
+ void GetCursorPos(BufferView *, int & x, int & y) const;
///
void ToggleInsetCursor(BufferView *);
///
LyXTabular * tabular;
private:
- void calculate_width_of_cells(BufferView *, LyXFont const &, bool =false) const;
+ bool calculate_dimensions_of_cells(BufferView *, LyXFont const &, bool =false) const;
///
void DrawCellLines(Painter &, int x, int baseline, int row, int cell)
const;
///
void setPos(Painter &, int x, int y) const;
///
- bool SetCellDimensions(Painter & pain, int cell, int row);
- ///
UpdatableInset::RESULT moveRight(BufferView *, bool lock=true);
UpdatableInset::RESULT moveLeft(BufferView *, bool lock=true);
UpdatableInset::RESULT moveUp(BufferView *);
oldcell,
actcol,
actrow;
- bool
- locked,
- no_selection;
- mutable bool
- init_inset;
+ bool no_selection;
+ mutable bool locked;
+ mutable UpdateCodes need_update;
};
#endif