]> git.lyx.org Git - features.git/blob - src/frontends/qt2/qscreen.h
update ignore, and make sure to dist the lyx2lyx_version.py.in template file
[features.git] / src / frontends / qt2 / 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 "screen.h"
16 #include <qcolor.h>
17 #include <qpixmap.h>
18
19 class QWorkArea;
20 class WorkArea;
21
22
23 /**
24  * Qt implementation of toolkit-specific parts of LyXScreen.
25  */
26 class QScreen : public LyXScreen {
27 public:
28         QScreen(QWorkArea &);
29
30         virtual ~QScreen();
31
32 protected:
33         /// get the work area
34         virtual WorkArea & workarea() const;
35
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, Cursor_Shape 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 #endif // QSCREEN_H