]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettabular.h
updates to minipage inset
[lyx.git] / src / insets / insettabular.h
index 39ee7b6bf6127908fb9d9181f712bd5e75584aae..58e77c0ec3df927c4213bc1d1f71d50374698cea 100644 (file)
@@ -70,11 +70,11 @@ 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);
@@ -135,7 +135,8 @@ public:
     ///
     void InsetKeyPress(XKeyEvent *);
     ///
-    UpdatableInset::RESULT LocalDispatch(BufferView *, int, string const &);
+    UpdatableInset::RESULT LocalDispatch(BufferView *, kb_action,
+                                        string const &);
     ///
     int Latex(Buffer const *, std::ostream &, bool, bool) const;
     ///
@@ -166,7 +167,7 @@ public:
     ///
     Buffer * BufferOwner() const { return const_cast<Buffer *>(buffer); }
     ///
-    LyXText * getLyXText(BufferView *) const;
+    LyXText * getLyXText(BufferView const *, bool const recursive = false) const;
     ///
     void resizeLyXText(BufferView *) const;
     ///
@@ -178,8 +179,8 @@ public:
     // Public structures and variables
     ///
     LyXTabular * tabular;
-       ///
-       Signal0<void> hideDialog;
+    ///
+    Signal0<void> hideDialog;
 
 private:
     ///
@@ -202,13 +203,13 @@ private:
     ///
     UpdatableInset::RESULT moveLeft(BufferView *, bool lock = true);
     ///
-    UpdatableInset::RESULT moveUp(BufferView *);
+    UpdatableInset::RESULT moveUp(BufferView *, bool lock = true);
     ///
-    UpdatableInset::RESULT moveDown(BufferView *);
+    UpdatableInset::RESULT moveDown(BufferView *, bool lock = true);
     ///
-    bool moveNextCell(BufferView *);
+    bool moveNextCell(BufferView *, bool lock = false);
     ///
-    bool movePrevCell(BufferView *);
+    bool movePrevCell(BufferView *, bool lock = false);
     ///
     bool Delete();
     ///
@@ -218,12 +219,19 @@ private:
     ///
     void RemoveTabularRow();
     ///
-    bool hasSelection() const { return ((sel_pos_start != sel_pos_end) ||
-                                      (sel_cell_start != sel_cell_end));}
+    bool hasSelection() const {
+       return sel_cell_start != sel_cell_end;
+    }
+    ///
+    void clearSelection() const {
+       sel_cell_start = sel_cell_end = 0;
+    }
     ///
     bool ActivateCellInset(BufferView *, int x = 0, int y = 0, int button = 0,
                           bool behind = false);
     ///
+    bool ActivateCellInsetAbs(BufferView *, int x = 0, int y = 0, int button = 0);
+    ///
     bool InsetHit(BufferView * bv, int x, int y) const;
     ///
     int GetMaxWidthOfCell(Painter &, int cell) const;
@@ -235,28 +243,24 @@ private:
     bool pasteSelection(BufferView *);
     ///
     bool cutSelection();
+    ///
+    bool isRightToLeft(BufferView *);
 
     //
     // Private structures and variables
     ///
     InsetText * the_locking_inset;
     ///
+    InsetText * old_locking_inset;
+    ///
     Buffer const * buffer;
     ///
     mutable LyXCursor cursor;
     ///
-    mutable LyXCursor old_cursor;
-    ///
-    mutable LyXParagraph::size_type inset_pos;
-    ///
     mutable unsigned int inset_x;
     ///
     mutable unsigned int inset_y;
     ///
-    mutable LyXParagraph::size_type sel_pos_start;
-    ///
-    mutable LyXParagraph::size_type sel_pos_end;
-    ///
     mutable int sel_cell_start;
     ///
     mutable int sel_cell_end;
@@ -269,8 +273,12 @@ private:
     ///
     mutable int actrow;
     ///
+    mutable int first_visible_cell;
+    ///
     bool no_selection;
     ///
+    bool no_draw;
+    ///
     mutable bool locked;
     ///
     mutable UpdateCodes need_update;