]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/qscreen.h
some tabular fixes for the problems reported by Helge
[lyx.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
16 #include "screen.h"
17 #include <qrect.h>
18 #include <boost/scoped_ptr.hpp>
19
20 class QWorkArea;
21 class WorkArea;
22
23
24 /**
25  * Qt implementation of toolkit-specific parts of LyXScreen.
26  */
27 class QScreen : public LyXScreen {
28 public:
29         QScreen(QWorkArea &);
30
31         virtual ~QScreen();
32
33 protected:
34         /// get the work area
35         virtual WorkArea & workarea() const;
36
37         /// repaint the whole content immediately
38         void repaint();
39
40         /// copies specified area of pixmap to screen
41         virtual void expose(int x, int y, int exp_width, int exp_height);
42
43         /// paint the cursor and store the background
44         virtual void showCursor(int x, int y, int h, Cursor_Shape shape);
45
46         /// hide the cursor
47         virtual void removeCursor();
48
49 private:
50         /// our owning widget
51         QWorkArea & owner_;
52
53         boost::scoped_ptr<QPixmap> nocursor_pixmap_;
54
55         //@{ the cursor pixmap position/size
56         int cursor_x_;
57         int cursor_y_;
58         int cursor_w_;
59         int cursor_h_;
60         //@}
61 };
62
63 #endif // QSCREEN_H