]> git.lyx.org Git - lyx.git/blob - src/BufferView_pimpl.h
7dbea916305364e01dd7a9a339312a2bedd96c5f
[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         ///
66         void workAreaSelectionNotify(Window win, XEvent * event);
67         ///
68         void doubleClick(int x, int y, unsigned int button);
69         ///
70         void tripleClick(int x, int y, unsigned int button);
71         ///
72         void enterView();
73         ///
74         void leaveView();
75         ///
76         void cursorToggle();
77         ///
78         void cursorPrevious();
79         ///
80         void cursorNext();
81         ///
82         bool available() const;
83         ///
84         void beforeChange();
85         ///
86         void savePosition();
87         ///
88         void restorePosition();
89         ///
90         void setState();
91         ///
92         void insetSleep();
93         ///
94         void insetWakeup();
95         ///
96         void insetUnlock();
97         ///
98         bool focus() const;
99         ///
100         void focus(bool);
101         ///
102         bool active() const;
103         ///
104         bool belowMouse() const;
105         ///
106         void showCursor();
107         ///
108         void hideCursor();
109         ///
110         void toggleSelection(bool = true);
111         ///
112         void toggleToggle();
113         ///
114         void center();
115         ///
116         BufferView * bv_;
117         ///
118         LyXView * owner_;
119         ///
120         Buffer * buffer_;
121         ///
122         LyXScreen * screen;
123         ///
124         long current_scrollbar_value;
125         ///
126         bool lyx_focus;
127         ///
128         bool work_area_focus;
129         ///
130         FL_OBJECT * figinset_canvas;
131         ///
132         FL_OBJECT * timer_cursor;
133         ///
134         BackStack backstack;
135         ///
136         int last_click_x, last_click_y;
137         ///
138         WorkArea * workarea;
139         ///
140         UpdateInset updatelist;
141 private:
142         bool using_xterm_cursor;
143 };
144 #endif