]> git.lyx.org Git - features.git/blob - src/BufferView_pimpl.h
better mouse pointer handling, actualy makes sense now
[features.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         ///
32         void fitCursor();
33         ///
34         void redoCurrentBuffer();
35         ///
36         int resizeCurrentBuffer();
37         ///
38         void update();
39         ///
40         void update(signed char f);
41         ///
42         void smallUpdate(signed char f);
43         ///
44         void gotoError();
45         /// Update pixmap of screen
46         void updateScreen();
47         ///
48         void workAreaExpose();
49         ///
50         void updateScrollbar();
51         ///
52         void scrollCB(double value);
53         ///
54         void downCB(long time, int button);
55         ///
56         void scrollUpOnePage();
57         ///
58         void scrollDownOnePage();
59         ///
60         void create_view();
61         ///
62         Inset * checkInsetHit(int & x, int & y, unsigned int button);
63         /// 
64         int scrollUp(long time);
65         ///
66         int scrollDown(long time);
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 workAreaSelectionNotify(Window win, XEvent * event);
75         ///
76         void doubleClick(int x, int y, unsigned int button);
77         ///
78         void tripleClick(int x, int y, unsigned int button);
79         ///
80         void enterView();
81         ///
82         void leaveView();
83         ///
84         void cursorToggle();
85         ///
86         void cursorPrevious();
87         ///
88         void cursorNext();
89         ///
90         bool available() const;
91         ///
92         void beforeChange();
93         ///
94         void savePosition();
95         ///
96         void restorePosition();
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         bool lyx_focus;
135         ///
136         bool work_area_focus;
137         ///
138         FL_OBJECT * figinset_canvas;
139         ///
140         FL_OBJECT * timer_cursor;
141         ///
142         BackStack backstack;
143         ///
144         int last_click_x, last_click_y;
145         ///
146         WorkArea * workarea;
147         ///
148         UpdateInset updatelist;
149 private:
150         bool using_xterm_cursor;
151 };
152 #endif