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