]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.h
* lfuns doxification for math macros
[lyx.git] / src / BufferView.h
index 847d67ab294c07550cd53c473daae391a9c5ff0b..765267b421b0aaa68a9ea3b33ad8f8a926d85a15 100644 (file)
@@ -36,6 +36,7 @@ class FuncRequest;
 class FuncStatus;
 class Intl;
 class Inset;
+class Menu;
 class ParIterator;
 class ParagraphMetrics;
 class Point;
@@ -104,6 +105,10 @@ public:
        void updateScrollbar();
        /// return the Scrollbar Parameters.
        ScrollbarParameters const & scrollbarParameters() const;
+       /// \return Tool tip for the given position.
+       docstring toolTip(int x, int y) const;
+       /// \return the context menu for the given position.
+       docstring contextMenu(int x, int y) const;
 
        /// Save the current position as bookmark.
        /// if idx == 0, save to temp_bookmark
@@ -125,8 +130,12 @@ public:
        /// set the cursor based on the given TeX source row.
        void setCursorFromRow(int row);
 
-       /// center the document view around the cursor.
-       void center();
+       /// Ensure the cursor is visible.
+       /// This method will automatically scroll and update the BufferView and updated 
+       /// if needed.
+       void showCursor();
+       /// LFUN_SCROLL Helper.
+       void lfunScroll(FuncRequest const & cmd);
        /// scroll down document by the given number of pixels.
        void scrollDown(int pixels);
        /// scroll up document by the given number of pixels.
@@ -143,14 +152,15 @@ public:
        /// return the pixel height of the document view.
        int workHeight() const;
 
+
        /// translate and insert a character, using the correct keymap.
        void translateAndInsert(char_type c, Text * t, Cursor & cur);
 
        /// return true for events that will handle.
        FuncStatus getStatus(FuncRequest const & cmd);
        /// execute the given function.
-       /// \return the Update::flags for further metrics update.
-       Update::flags dispatch(FuncRequest const & argument);
+       /// \return true if the function has been processed.
+       bool dispatch(FuncRequest const & argument);
 
        /// request an X11 selection.
        /// \return the selected string.
@@ -241,10 +251,11 @@ public:
        void setGuiDelegate(frontend::GuiBufferViewDelegate *);
 
        ///
-       docstring contentsOfPlaintextFile(support::FileName const & f,
-               bool asParagraph);
+       docstring contentsOfPlaintextFile(support::FileName const & f);
        // Insert plain text file (if filename is empty, prompt for one)
        void insertPlaintextFile(support::FileName const & f, bool asParagraph);
+       ///
+       void insertLyXFile(support::FileName const & f);
 
 private:
        /// noncopyable
@@ -263,7 +274,7 @@ private:
                Text const & text, //< The Text where we start searching.
                int x, //< x-coordinate on screen
                int y  //< y-coordinate on screen
-               );
+               ) const;
 
        ///
        int width_;
@@ -272,11 +283,6 @@ private:
        ///
        Buffer & buffer_;
 
-       ///
-       void menuInsertLyXFile(std::string const & filen);
-
-       void updateOffsetRef();
-
        struct Private;
        Private * const d;
 };