]> git.lyx.org Git - lyx.git/blob - src/BufferView_pimpl.h
Forgot to add this files.
[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();
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 workAreaMotionNotify(int x, int y, unsigned int state);
67         ///
68         void workAreaButtonPress(int x, int y, unsigned int button);
69         ///
70         void workAreaButtonRelease(int x, int y, unsigned int button);
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         bool NoSavedPositions();
95         ///
96         void setState();
97         ///
98         void insetSleep();
99         ///
100         void insetWakeup();
101         ///
102         void insetUnlock();
103         ///
104         bool focus() const;
105         ///
106         void focus(bool);
107         ///
108         bool active() const;
109         ///
110         bool belowMouse() const;
111         ///
112         void showCursor();
113         ///
114         void hideCursor();
115         ///
116         void toggleSelection(bool = true);
117         ///
118         void toggleToggle();
119         ///
120         void center();
121         ///
122         BufferView * bv_;
123         ///
124         LyXView * owner_;
125         ///
126         Buffer * buffer_;
127         ///
128         LyXScreen * screen_;
129         ///
130         long current_scrollbar_value;
131         ///
132         FL_OBJECT * figinset_canvas;
133         ///
134         Timeout cursor_timeout;
135         ///
136         BackStack backstack;
137         ///
138         int last_click_x, last_click_y;
139         ///
140         WorkArea * workarea_;
141         ///
142         UpdateInset updatelist;
143         ///
144         void pasteClipboard(bool asPara);
145         ///
146         void stuffClipboard(string const &) const;
147 private:
148         ///
149         bool using_xterm_cursor;
150 };
151 #endif