]> git.lyx.org Git - lyx.git/blob - src/BufferView_pimpl.h
3914f4574431823dcb51e61bbc41efaac56163ad
[lyx.git] / src / BufferView_pimpl.h
1 // -*- C++ -*-
2
3 #ifndef BUFFERVIEW_PIMPL_H
4 #define BUFFERVIEW_PIMPL_H
5
6 #include "BufferView.h"
7 #include "UpdateInset.h"
8 #include "BackStack.h"
9
10 #ifdef __GNUG__
11 #pragma interface
12 #endif
13
14 class LyXView;
15 class WorkArea;
16 class LyXScreen;
17
18 struct BufferView::Pimpl {
19         Pimpl(BufferView * i, LyXView * o,
20               int xpos, int ypos, int width, int height);
21         ///
22         Painter & painter();
23         ///
24         void buffer(Buffer *);
25         ///
26         void resize(int xpos, int ypos, int width, int height);
27         ///
28         void resize();
29         ///
30         void redraw();
31         /// Return true if the cursor was fitted.
32         bool fitCursor();
33         ///
34         void redoCurrentBuffer();
35         ///
36         int resizeCurrentBuffer();
37         ///
38         void update();
39         ///
40         void update(signed char f);
41 #if 0
42         ///
43         void smallUpdate(signed char f);
44 #endif
45         ///
46         void gotoError();
47         /// Update pixmap of screen
48         void updateScreen();
49         ///
50         void workAreaExpose();
51         ///
52         void updateScrollbar();
53         ///
54         void scrollCB(double value);
55         ///
56         void create_view();
57         ///
58         Inset * checkInsetHit(int & x, int & y, unsigned int button);
59         /// 
60         int scrollUp(long time);
61         ///
62         int scrollDown(long time);
63         ///
64         void workAreaMotionNotify(int x, int y, unsigned int state);
65         ///
66         void workAreaButtonPress(int x, int y, unsigned int button);
67         ///
68         void workAreaButtonRelease(int x, int y, unsigned int button);
69         ///
70         void workAreaSelectionNotify(Window win, XEvent * event);
71         ///
72         void doubleClick(int x, int y, unsigned int button);
73         ///
74         void tripleClick(int x, int y, unsigned int button);
75         ///
76         void enterView();
77         ///
78         void leaveView();
79         ///
80         void cursorToggle();
81         ///
82         void cursorPrevious();
83         ///
84         void cursorNext();
85         ///
86         bool available() const;
87         ///
88         void beforeChange();
89         ///
90         void savePosition();
91         ///
92         void restorePosition();
93         ///
94         void setState();
95         ///
96         void insetSleep();
97         ///
98         void insetWakeup();
99         ///
100         void insetUnlock();
101         ///
102         bool focus() const;
103         ///
104         void focus(bool);
105         ///
106         bool active() const;
107         ///
108         bool belowMouse() const;
109         ///
110         void showCursor();
111         ///
112         void hideCursor();
113         ///
114         void toggleSelection(bool = true);
115         ///
116         void toggleToggle();
117         ///
118         void center();
119         ///
120         BufferView * bv_;
121         ///
122         LyXView * owner_;
123         ///
124         Buffer * buffer_;
125         ///
126         LyXScreen * screen;
127         ///
128         long current_scrollbar_value;
129         ///
130         bool lyx_focus;
131         ///
132         bool work_area_focus;
133         ///
134         FL_OBJECT * figinset_canvas;
135         ///
136         FL_OBJECT * timer_cursor;
137         ///
138         BackStack backstack;
139         ///
140         int last_click_x, last_click_y;
141         ///
142         WorkArea * workarea;
143         ///
144         UpdateInset updatelist;
145 private:
146         bool using_xterm_cursor;
147 };
148 #endif