]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.h
Improve fullscreen capabilities ( http://bugzilla.lyx.org/show_bug.cgi?id=4146 ).
[lyx.git] / src / BufferView.h
index 53821b76931c1cecee2765e303a9f9a370a3edc8..2fe006418818b839c25e3271dc218e8b66f8fb66 100644 (file)
@@ -52,19 +52,16 @@ enum CursorStatus {
 /// Scrollbar Parameters.
 struct ScrollbarParameters
 {
-       void reset(int h = 0, int p = 0, int l = 0)
-       {
-               height = h;
-               position = p;
-               lineScrollHeight = l;
-       }
-
-       /// Total document height in pixels.
-       int height;
+       /// Minimum scrollbar position in pixels.
+       int min;
+       /// Maximum scrollbar position in pixels.
+       int max;
        /// Current position in the document in pixels.
        int position;
        /// Line-scroll amount in pixels.
-       int lineScrollHeight;
+       int single_step;
+       /// Page-scroll amount in pixels.
+       int page_step;
 };
 
 /// Screen view of a Buffer.
@@ -108,7 +105,7 @@ public:
        /// \return Tool tip for the given position.
        docstring toolTip(int x, int y) const;
        /// \return the context menu for the given position.
-       Menu const & contextMenu(int x, int y) const;
+       docstring contextMenu(int x, int y) const;
 
        /// Save the current position as bookmark.
        /// if idx == 0, save to temp_bookmark
@@ -130,10 +127,16 @@ public:
        /// set the cursor based on the given TeX source row.
        void setCursorFromRow(int row);
 
-       /// Ensure the cursor is visible.
-       /// This method will automatically scroll and update the BufferView and updated 
+       /// Ensure that the BufferView cursor is visible.
+       /// This method will automatically scroll and update the BufferView
        /// if needed.
        void showCursor();
+       /// Ensure the passed cursor \p dit is visible.
+       /// This method will automatically scroll and update the BufferView
+       /// if needed.
+       void showCursor(DocIterator const & dit);
+       /// 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.