]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.h
Remove color dependency of framed note, fix bug 3598
[lyx.git] / src / insets / InsetTabular.h
index 8a75f45bbbbb829216a2cc1e1e5015c7411ab111..bc8c36a27dbe90ad5ffb3b44cba3d402e6032787 100644 (file)
@@ -144,10 +144,14 @@ public:
                ///
                UNSET_ROTATE_TABULAR,
                ///
+               TOGGLE_ROTATE_TABULAR,
+               ///
                SET_ROTATE_CELL,
                ///
                UNSET_ROTATE_CELL,
                ///
+               TOGGLE_ROTATE_CELL,
+               ///
                SET_USEBOX,
                ///
                SET_LTHEAD,
@@ -444,7 +448,7 @@ public:
                          boost::shared_ptr<InsetText>) const;
        /// Search for \param inset in the tabular, with the
        ///
-       idx_type getCellFromInset(InsetBase const * inset) const;
+       idx_type getCellFromInset(Inset const * inset) const;
        ///
        row_type rows() const { return rows_; }
        ///
@@ -661,7 +665,7 @@ private:
 
 
 
-class InsetTabular : public InsetOld {
+class InsetTabular : public Inset {
 public:
        ///
        InsetTabular(Buffer const &, row_type rows = 1,
@@ -683,7 +687,7 @@ public:
        ///
        EDITABLE editable() const { return HIGHLY_EDITABLE; }
        ///
-       bool insetAllowed(InsetBase::Code) const { return true; }
+       bool insetAllowed(Inset::Code) const { return true; }
        ///
        bool allowSpellCheck() const { return true; }
        ///
@@ -693,7 +697,7 @@ public:
            insets that may contain several paragraphs */
        bool noFontChange() const { return true; }
        ///
-       bool display() const { return tabular.isLongTabular(); }
+       DisplayType display() const { return tabular.isLongTabular() ? AlignCenter : Inline; }
        ///
        int latex(Buffer const &, odocstream &,
                  OutputParams const &) const;
@@ -706,7 +710,7 @@ public:
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       Code lyxCode() const { return InsetBase::TABULAR_CODE; }
+       Code lyxCode() const { return Inset::TABULAR_CODE; }
        /// get offset of this cursor slice relative to our upper left corner
        void cursorPos(BufferView const & bv, CursorSlice const & sl,
                bool boundary, int & x, int & y) const;
@@ -726,7 +730,7 @@ public:
        ///
        boost::shared_ptr<InsetText> cell(idx_type);
        ///
-       LyXText * getText(int) const;
+       Text * getText(int) const;
 
        /// set the change for the entire inset
        void setChange(Change const & change);
@@ -751,7 +755,7 @@ public:
        /// lock cell with given index
        void edit(Cursor & cur, bool left);
        ///
-       InsetBase * editXY(Cursor & cur, int x, int y);
+       Inset * editXY(Cursor & cur, int x, int y);
        /// can we go further down on mouse click?
        bool descendable() const { return true; }
 
@@ -771,7 +775,7 @@ protected:
        int scroll() const { return scx_; }
 
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual std::auto_ptr<Inset> doClone() const;
 
        ///
        void drawCellLines(frontend::Painter &, int x, int y, row_type row,
@@ -810,6 +814,10 @@ private:
        /// return the cell nearest to x, y
        idx_type getNearestCell(BufferView &, int x, int y) const;
 
+       /// test the rotation state of the give cell range.
+       bool oneCellHasRotationState(bool rotated,
+                               row_type row_start, row_type row_end, 
+                               col_type col_start, col_type col_end) const;
        ///
        Buffer const * buffer_;
        ///
@@ -827,7 +835,7 @@ public:
        ///
        InsetTabularMailer(InsetTabular const & inset);
        ///
-       virtual InsetBase & inset() const { return inset_; }
+       virtual Inset & inset() const { return inset_; }
        ///
        virtual std::string const & name() const { return name_; }
        ///