]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GScreen.h
Minipage is no more (long live the box inset)
[lyx.git] / src / frontends / gtk / GScreen.h
1 // -*- C++ -*-
2 /**
3  * \file GScreen.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Huang Ying
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GSCREEN_H
13 #define GSCREEN_H
14
15 #include "screen.h"
16
17 class GWorkArea;
18
19 /** The class GScreen is used for the main Textbody.
20     Concretely, the screen is held in a pixmap.  This pixmap is kept up to
21     date and used to optimize drawing on the screen.
22     This class also handles the drawing of the cursor and partly the selection.
23  */
24 class GScreen : public LyXScreen {
25 public:
26         ///
27         GScreen(GWorkArea &);
28
29         ///
30         virtual ~GScreen();
31
32         /// Sets the cursor color to LColor::cursor.
33         virtual void setCursorColor(Glib::RefPtr<Gdk::GC> gc);
34         ///
35         virtual void removeCursor();
36         ///
37         virtual void showCursor(int x, int y, int h,
38                                 Cursor_Shape shape);
39
40 protected:
41         /// get the work area
42         virtual WorkArea & workarea() const;
43
44         /// Copies specified area of pixmap to screen
45         virtual void expose(int x, int y, int w, int h);
46
47 private:
48         /// our owning widget
49         GWorkArea & owner_;
50
51         ///
52         Glib::RefPtr<Gdk::Pixmap> cursorPixmap_;
53         ///
54         int cursorX_;
55         ///
56         int cursorY_;
57         ///
58         int cursorW_;
59         ///
60         int cursorH_;
61 };
62
63 #endif