]> git.lyx.org Git - lyx.git/blob - src/frontends/qt3/qscreen.h
Extracted from r14281
[lyx.git] / src / frontends / qt3 / qscreen.h
1 // -*- C++ -*-
2 /**
3  * \file qscreen.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef QSCREEN_H
13 #define QSCREEN_H
14
15 #include "frontends/GuiCursor.h"
16
17 #include <qcolor.h>
18 #include <qpixmap.h>
19
20 namespace lyx {
21 namespace frontend {
22
23 class QWorkArea;
24
25
26 /**
27  * Qt implementation of toolkit-specific parts of LyXScreen.
28  */
29 class QScreen {
30 public:
31         QScreen(QWorkArea &);
32
33         virtual ~QScreen();
34
35 public:
36         /// repaint the whole content immediately
37         void repaint();
38
39         /// copies specified area of pixmap to screen
40         virtual void expose(int x, int y, int exp_width, int exp_height);
41
42         /// paint the cursor and store the background
43         virtual void showCursor(int x, int y, int h, lyx::frontend::CursorShape shape);
44
45         /// hide the cursor
46         virtual void removeCursor();
47
48 private:
49         /// our owning widget
50         QWorkArea & owner_;
51
52         QPixmap nocursor_pixmap_;
53         QPixmap hcursor_pixmap_;
54         QPixmap vcursor_pixmap_;
55
56         //@{ the cursor pixmap position/size
57         int cursor_x_;
58         int cursor_y_;
59         int cursor_w_;
60         int cursor_h_;
61         //@}
62
63         QColor cursor_color_;
64 };
65
66 } // namespace frontend
67 } // namespace lyx
68
69 #endif // QSCREEN_H