2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team
10 * ====================================================== */
19 #include FORMS_H_LOCATION
24 typedef unsigned short Dimension;
28 /** The class LyXScreen is used for the main Textbody.
29 Concretely, the screen is held in a pixmap. This pixmap is kept up to
30 date and used to optimize drawing on the screen.
31 This class also handles the drawing of the cursor and partly the selection.
46 LyXScreen(WorkArea &, LyXText * text_ptr);
48 /** Draws the screen form textposition y. Uses as much of
49 the already printed pixmap as possible */
52 /// Redraws the screen, without using existing pixmap
55 /// Returns a new top so that the cursor is visible
56 long TopCursorVisible();
57 /// Redraws the screen such that the cursor is visible
66 void ShowManualCursor(long x, long y, int asc, int desc,
68 /// returns 1 if first has changed, otherwise 0
69 int FitManualCursor(long, long, int, int);
71 void ToggleSelection(bool = true);
75 /** Updates part of the screen. If text->status is
76 LyXText::NEED_MORE_REFRESH, we update from the
77 point of change and to the end of the screen.
78 If text->status is LyXText::NEED_VERY_LITTLE_REFRESH,
79 we only update the current row. */
82 /** Updates part of the screen. Updates till row with cursor,
83 or only current row */
86 /// first visible pixel-row
92 /// Copies specified area of pixmap to screen
93 void expose(int x, int y, int exp_width, int exp_height);
95 /// y1 and y2 are coordinates of the screen
96 void DrawFromTo(int y1, int y2);
98 /// y is a coordinate of the text
99 void DrawOneRow(Row * row, long & y_text);
108 Pixmap cursor_pixmap;
118 long screen_refresh_y;
120 Row * screen_refresh_row;