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