]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettabular.h
Make it compile when USE_BOOST_FORMAT is unset
[lyx.git] / src / insets / insettabular.h
index 5014ab164116af8282f24b6f619f838d14dacccc..83a45fedcc1dc0c9c064756022bce75206f172a7 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
-/* This file is part of
- * ======================================================
+/**
+ * \file insettabular.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
+ * \author Jürgen Vigna
  *
- *           Copyright 1995-2001 The LyX Team.
- *
- *======================================================
+ * Full author contact details are available in file CREDITS
  */
 // This is the rewrite of the tabular (table) support.
 
@@ -129,17 +129,14 @@ public:
        bool insetAllowed(Inset::Code code) const;
        ///
        bool isTextInset() const { return true; }
+       /** returns true if, when outputing LaTeX, font changes should
+            be closed before generating this inset. This is needed for
+            insets that may contain several paragraphs */
+       bool noFontChange() const { return true; }
        ///
        bool display() const { return tabular->IsLongTabular(); }
        ///
-       bool insetButtonRelease(BufferView *, int, int, mouse_button::state);
-       ///
-       void insetButtonPress(BufferView *, int, int, mouse_button::state);
-       ///
-       void insetMotionNotify(BufferView *, int, int, mouse_button::state);
-       ///
-       UpdatableInset::RESULT localDispatch(BufferView *, kb_action,
-                                            string const &);
+       RESULT localDispatch(FuncRequest const &);
        ///
        int latex(Buffer const *, std::ostream &, bool, bool) const;
        ///
@@ -212,8 +209,12 @@ public:
        LyXCursor const & cursor(BufferView *) const;
        ///
        bool allowSpellcheck() { return true; }
-       string const selectNextWordToSpellcheck(BufferView *, float & value) const;
+       ///
+       WordLangTuple const
+       selectNextWordToSpellcheck(BufferView *, float & value) const;
+       ///
        void selectSelectedWord(BufferView *);
+       ///
        void toggleSelection(BufferView *, bool kill_selection);
        ///
        bool searchForward(BufferView *, string const &,
@@ -225,6 +226,9 @@ public:
        // "normal" means without width set!
        bool forceDefaultParagraphs(Inset const * in) const;
 
+       ///
+       void addPreview(grfx::PreviewLoader &) const;
+
        //
        // Public structures and variables
        ///
@@ -232,7 +236,21 @@ public:
        ///
        boost::signal0<void> hideDialog;
 
+       /// are some cells selected ?
+       bool hasSelection() const {
+               return has_selection;
+       }
 private:
+       ///
+       void lfunMousePress(FuncRequest const &);
+       ///
+       // the bool return is used to see if we opened a dialog so that we can
+       // check this from an outer inset and open the dialog of the outer inset
+       // if that one has one!
+       ///
+       bool lfunMouseRelease(FuncRequest const &);
+       ///
+       void lfunMouseMotion(FuncRequest const &);
        ///
        bool calculate_dimensions_of_cells(BufferView *, LyXFont const &,
                                           bool = false) const;
@@ -251,13 +269,13 @@ private:
        ///
        void setPos(BufferView *, int x, int y) const;
        ///
-       UpdatableInset::RESULT moveRight(BufferView *, bool lock = true);
+       RESULT moveRight(BufferView *, bool lock = true);
        ///
-       UpdatableInset::RESULT moveLeft(BufferView *, bool lock = true);
+       RESULT moveLeft(BufferView *, bool lock = true);
        ///
-       UpdatableInset::RESULT moveUp(BufferView *, bool lock = true);
+       RESULT moveUp(BufferView *, bool lock = true);
        ///
-       UpdatableInset::RESULT moveDown(BufferView *, bool lock = true);
+       RESULT moveDown(BufferView *, bool lock = true);
        ///
        bool moveNextCell(BufferView *, bool lock = false);
        ///
@@ -271,10 +289,6 @@ private:
        ///
        void removeTabularRow();
        ///
-       bool hasSelection() const {
-               return has_selection;
-       }
-       ///
        void clearSelection() const {
                sel_cell_start = sel_cell_end = 0;
                has_selection = false;
@@ -309,7 +323,7 @@ private:
        void getSelection(int & scol, int & ecol,
                          int & srow, int & erow) const;
        ///
-       string selectNextWordInt(BufferView *, float & value) const;
+       WordLangTuple selectNextWordInt(BufferView *, float & value) const;
        ///
        bool insertAsciiString(BufferView *, string const & buf, bool usePaste);