]> git.lyx.org Git - lyx.git/blob - src/BufferView_pimpl.h
4358e20197396ac012b83a2343ebbfd79b25605d
[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 struct BufferView::Pimpl : public Object {
24         Pimpl(BufferView * i, LyXView * o,
25               int xpos, int ypos, int width, int height);
26         ///
27         Painter & painter();
28         ///
29         void buffer(Buffer *);
30         ///
31         void resize(int xpos, int ypos, int width, int height);
32         ///
33         void resize();
34         ///
35         void redraw();
36         /// Return true if the cursor was fitted.
37         bool fitCursor();
38         ///
39         void redoCurrentBuffer();
40         ///
41         int resizeCurrentBuffer();
42         ///
43         void update();
44         ///
45         void update(BufferView::UpdateCodes);
46         ///
47         void gotoError();
48         /// Update pixmap of screen
49         void updateScreen();
50         ///
51         void workAreaExpose();
52         ///
53         void updateScrollbar();
54         ///
55         void scrollCB(double value);
56         ///
57         Inset * checkInsetHit(LyXText *, 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         FL_OBJECT * figinset_canvas;
130         ///
131         Timeout cursor_timeout;
132         ///
133         BackStack backstack;
134         ///
135         int last_click_x, last_click_y;
136         ///
137         WorkArea * workarea_;
138         ///
139         UpdateInset updatelist;
140         ///
141         void pasteClipboard(bool asPara);
142         ///
143         void stuffClipboard(string const &) const;
144 private:
145         bool using_xterm_cursor;
146 };
147 #endif