]> git.lyx.org Git - lyx.git/blob - src/BufferView_pimpl.h
d76aab8ab272b9144197cbe0627e2323ef444922
[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 #if 0
56         ///
57         void downCB(long time, int button);
58 #endif
59 #if 0
60         ///
61         void scrollUpOnePage();
62 #endif
63 #if 0
64         ///
65         void scrollDownOnePage();
66 #endif
67         ///
68         void create_view();
69         ///
70         Inset * checkInsetHit(int & x, int & y, unsigned int button);
71         /// 
72         int scrollUp(long time);
73         ///
74         int scrollDown(long time);
75         ///
76         void workAreaMotionNotify(int x, int y, unsigned int state);
77         ///
78         void workAreaButtonPress(int x, int y, unsigned int button);
79         ///
80         void workAreaButtonRelease(int x, int y, unsigned int button);
81         ///
82         void workAreaSelectionNotify(Window win, XEvent * event);
83         ///
84         void doubleClick(int x, int y, unsigned int button);
85         ///
86         void tripleClick(int x, int y, unsigned int button);
87         ///
88         void enterView();
89         ///
90         void leaveView();
91         ///
92         void cursorToggle();
93         ///
94         void cursorPrevious();
95         ///
96         void cursorNext();
97         ///
98         bool available() const;
99         ///
100         void beforeChange();
101         ///
102         void savePosition();
103         ///
104         void restorePosition();
105         ///
106         void setState();
107         ///
108         void insetSleep();
109         ///
110         void insetWakeup();
111         ///
112         void insetUnlock();
113         ///
114         bool focus() const;
115         ///
116         void focus(bool);
117         ///
118         bool active() const;
119         ///
120         bool belowMouse() const;
121         ///
122         void showCursor();
123         ///
124         void hideCursor();
125         ///
126         void toggleSelection(bool = true);
127         ///
128         void toggleToggle();
129         ///
130         void center();
131         ///
132         BufferView * bv_;
133         ///
134         LyXView * owner_;
135         ///
136         Buffer * buffer_;
137         ///
138         LyXScreen * screen;
139         ///
140         long current_scrollbar_value;
141         ///
142         bool lyx_focus;
143         ///
144         bool work_area_focus;
145         ///
146         FL_OBJECT * figinset_canvas;
147         ///
148         FL_OBJECT * timer_cursor;
149         ///
150         BackStack backstack;
151         ///
152         int last_click_x, last_click_y;
153         ///
154         WorkArea * workarea;
155         ///
156         UpdateInset updatelist;
157 private:
158         bool using_xterm_cursor;
159 };
160 #endif