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