]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/screen.h
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / screen.h
index 9f87cb5c6b5aea531b478ad42071604eebf4bb60..d0d3dc741e4f455fbd76a4ea5e70419e2f07aac9 100644 (file)
@@ -7,16 +7,14 @@
  * \author unknown
  * \author John Levon
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef SCREEN_H
 #define SCREEN_H
 
-#include "RowList.h"
-
 class LyXText;
-class LyXCursor;
+class CursorSlice;
 class WorkArea;
 class BufferView;
 
@@ -38,76 +36,27 @@ public:
 
        virtual ~LyXScreen();
 
-       /**
-        * draw the screen from a given position
-        * @param y the text position to draw from
-        *
-        * Uses as much of the already printed pixmap as possible
-        */
-       virtual void draw(LyXText *, BufferView *, unsigned int y) = 0;
-
-       /**
-        * fit the cursor onto the visible work area, scrolling if necessary
-        * @param bv the buffer view
-        * @param vheight the height of the visible region
-        * @param base_y the top of the lyxtext to look at
-        * @param x the new x position
-        * @param y the new y position
-        * @param a ascent of the cursor's row
-        * @param d descent of the cursor's row
-        * @return true if the work area needs scrolling as a result
-        */
-       bool fitManualCursor(BufferView * bv, LyXText * text,
-               int x, int y, int a, int d);
-
        /// redraw the screen, without using existing pixmap
-       virtual void redraw(BufferView * bv, LyXText * text);
-
-       /**
-        * topCursorVisible - get a new "top" to make the cursor visible
-        * in a LyXText
-        *
-        * This helper function calculates a new y co-ordinate for
-        * the top of the containing region such that the cursor contained
-        * within the LyXText is "nicely" visible.
-        */
-       virtual unsigned int topCursorVisible(LyXText *);
+       virtual void redraw(BufferView & bv);
 
        /**
         * fitCursor - fit the cursor onto the work area
-        * @param text the text containing the cursor
         * @param bv the bufferview
         * @return true if a change was necessary
         *
         * Scrolls the screen so that the cursor is visible
         */
-       virtual bool fitCursor(LyXText *, BufferView *);
-
-       /**
-        * update - update part of the screen rendering
-        * @param bv the bufferview
-        * @param xo the x offset into the text
-        * @param yo the x offset into the text
-        *
-        * Updates part of the screen. If bv->text->needRefresh is
-        * true, we update from the
-        * point of change to the end of the screen.
-        */
-       virtual void update(BufferView & bv, int yo = 0, int xo = 0);
+       virtual bool fitCursor(BufferView *);
 
        /// hide the visible cursor, if it is visible
        void hideCursor();
-       
+
        /// show the cursor if it is not visible
        void showCursor(BufferView & bv);
 
        /// toggle the cursor's visibility
        void toggleCursor(BufferView & bv);
 
-       /// FIXME
-       virtual void toggleSelection(LyXText *, BufferView *, bool = true,
-                            int y_offset = 0, int x_offset = 0);
-
 protected:
        /// cause the display of the given area of the work area
        virtual void expose(int x, int y, int w, int h) = 0;
@@ -131,10 +80,6 @@ protected:
        /// hide the cursor
        virtual void removeCursor() = 0;
 
-       /// y1 and y2 are coordinates of the screen
-       void drawFromTo(LyXText *, BufferView *, int y1, int y2,
-                       int y_offset = 0, int x_offset = 0);
-
 private:
        /// grey out (no buffer)
        void greyOut();