#include "LString.h"
#include "lyxcursor.h"
#include "lyxfunc.h"
+#include <sigc++/signal_system.h>
+
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Signal0;
+#endif
class LyXLex;
class Painter;
class BufferView;
class Buffer;
-class Dialogs;
class InsetTabular : public UpdatableInset {
public:
///
enum UpdateCodes {
NONE = 0,
- INIT,
- FULL,
- CELL,
- CURSOR,
- SELECTION
+ CURSOR = 1,
+ CELL = 2,
+ SELECTION = 3,
+ FULL = 4,
+ INIT = 5
};
///
InsetTabular(Buffer const &, int rows = 1, int columns = 1);
// Public structures and variables
///
LyXTabular * tabular;
+ ///
+ Signal0<void> hideDialog;
private:
///
bool hasSelection() const { return ((sel_pos_start != sel_pos_end) ||
(sel_cell_start != sel_cell_end));}
///
+ void clearSelection() const {
+ sel_pos_start = sel_pos_end = sel_cell_start = sel_cell_end = 0;
+ }
+ ///
bool ActivateCellInset(BufferView *, int x = 0, int y = 0, int button = 0,
bool behind = false);
///
///
mutable LyXCursor old_cursor;
///
- mutable int inset_pos;
+ mutable LyXParagraph::size_type inset_pos;
///
mutable unsigned int inset_x;
///
mutable unsigned int inset_y;
///
- mutable int sel_pos_start;
+ mutable LyXParagraph::size_type sel_pos_start;
///
- mutable int sel_pos_end;
+ mutable LyXParagraph::size_type sel_pos_end;
///
mutable int sel_cell_start;
///
mutable bool locked;
///
mutable UpdateCodes need_update;
- ///
- mutable Dialogs * dialogs_;
};
#endif