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(Painter & pain, const LyXFont &, int , float &) const;
+ void draw(BufferView *, const LyXFont &, int , float &, bool) const;
+ ///
+ void update(BufferView *, LyXFont const &, bool =false);
///
const char * EditMessage() const;
///
void Edit(BufferView *, int x, int y, unsigned int);
///
+ bool doClearArea() const { return !locked; };
+ ///
void InsetUnlock(BufferView *);
///
- void UpdateLocal(BufferView *, bool flag = true);
+ 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(Painter &, LyXFont const &) 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 *);
///
int GetMaxWidthOfCell(Painter &, int cell) const;
///
- void recomputeTextInsets(Painter &, const LyXFont &) const;
+ void recomputeTextInsets(BufferView *, const LyXFont &) const;
///
/// Private structures and variables
oldcell,
actcol,
actrow;
- bool
- locked,
- no_selection;
- mutable bool
- init_inset;
+ bool no_selection;
+ mutable bool locked;
+ mutable UpdateCodes need_update;
};
#endif