]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.h
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetTabular.h
index 22d4a0fcae3a5170f50cdc60d1cc24a965d8455b..79bc8cea23f7fc994408a2315a94f13580c88f00 100644 (file)
@@ -67,7 +67,7 @@ class OutputParams;
 //
 // A helper struct for tables
 //
-class Tabular  {
+class Tabular {
 public:
        ///
        enum Feature {
@@ -238,6 +238,8 @@ public:
        /// index indicating an invalid position
        static const idx_type npos = static_cast<idx_type>(-1);
 
+       /// constructor
+       Tabular();
        /// constructor
        Tabular(BufferParams const &, col_type columns_arg,
                   row_type rows_arg);
@@ -357,7 +359,7 @@ public:
        ///
        void plaintext(Buffer const &, odocstream &,
                       OutputParams const & runparams, int const depth,
-                      bool onlydata, unsigned char delim) const;
+                      bool onlydata, char_type delim) const;
        ///
        bool isMultiColumn(idx_type cell) const;
        ///
@@ -537,7 +539,7 @@ public:
                bool endfoot;
                /// row of endlastfoot
                bool endlastfoot;
-               /// row for a pagebreak
+               /// row for a newpage
                bool newpage;
        };
        ///
@@ -667,7 +669,7 @@ public:
        ///
        void write(Buffer const &, std::ostream &) const;
        ///
-       bool metrics(MetricsInfo &, Dimension &) const;
+       void metrics(MetricsInfo &, Dimension &) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
@@ -677,7 +679,7 @@ public:
        ///
        EDITABLE editable() const { return HIGHLY_EDITABLE; }
        ///
-       bool insetAllowed(Inset::Code) const { return true; }
+       bool insetAllowed(InsetCode code) const;
        ///
        bool allowSpellCheck() const { return true; }
        ///
@@ -700,7 +702,7 @@ public:
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       Code lyxCode() const { return Inset::TABULAR_CODE; }
+       InsetCode lyxCode() const { return 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;
@@ -732,8 +734,9 @@ public:
        // this should return true if we have a "normal" cell, otherwise false.
        // "normal" means without width set!
        /// should all paragraphs be output with "Standard" layout?
-       bool forceDefaultParagraphs(idx_type cell = 0) const;
-
+       virtual bool allowParagraphCustomization(idx_type cell = 0) const;
+       ///
+       virtual bool forceEmptyLayout() { return true; }
        ///
        void addPreview(graphics::PreviewLoader &) const;
 
@@ -743,7 +746,7 @@ public:
        /// set the owning buffer
        void buffer(Buffer const * buf);
        /// lock cell with given index
-       void edit(Cursor & cur, bool left);
+       void edit(Cursor & cur, bool front, EntryDirection entry_from);
        ///
        Inset * editXY(Cursor & cur, int x, int y);
        /// can we go further down on mouse click?