]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/xscreen.h
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / xscreen.h
1 // -*- C++ -*-
2 /**
3  * \file xscreen.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef XSCREEN_H
14 #define XSCREEN_H
15
16
17 #include "screen.h"
18 #include <X11/Xlib.h> // for Pixmap, GC
19
20 class XWorkArea;
21
22 /** The class XScreen is used for the main Textbody.
23     Concretely, the screen is held in a pixmap.  This pixmap is kept up to
24     date and used to optimize drawing on the screen.
25     This class also handles the drawing of the cursor and partly the selection.
26  */
27 class XScreen : public LyXScreen {
28 public:
29         ///
30         XScreen(XWorkArea &);
31
32         ///
33         virtual ~XScreen();
34
35         /// Sets the cursor color to LColor::cursor.
36         virtual void setCursorColor();
37         ///
38         virtual void hideCursor();
39         ///
40         virtual void showManualCursor(LyXText const *, int x, int y,
41                               int asc, int desc,
42                               Cursor_Shape shape);
43
44         /** Draws the screen form textposition y. Uses as much of
45             the already printed pixmap as possible */
46         virtual void draw(LyXText *, BufferView *, unsigned int y);
47
48 protected:
49         /// get the work area
50         virtual WorkArea & workarea() const { return owner_; }
51
52         /// Copies specified area of pixmap to screen
53         virtual void expose(int x, int y, int w, int h);
54
55 private:
56         /// our owning widget
57         XWorkArea & owner_;
58
59         ///
60         Pixmap cursor_pixmap;
61         ///
62         int cursor_pixmap_x;
63         ///
64         int cursor_pixmap_y;
65         ///
66         int cursor_pixmap_w;
67         ///
68         int cursor_pixmap_h;
69         ///
70         GC gc_copy;
71 };
72
73 #endif