]> git.lyx.org Git - lyx.git/blob - src/BufferView_pimpl.h
Add missing std::
[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 "Timeout.h"
9
10 #ifdef __GNUG__
11 #pragma interface
12 #endif
13
14 class LyXView;
15 class WorkArea;
16 class LyXScreen;
17
18 #ifdef SIGC_CXX_NAMESPACES
19 using SigC::Object;
20 #endif
21
22 ///
23 struct BufferView::Pimpl : public Object {
24         ///
25         Pimpl(BufferView * i, LyXView * o,
26               int xpos, int ypos, int width, int height);
27         ///
28         Painter & painter();
29         ///
30         void buffer(Buffer *);
31         ///
32         void resize(int xpos, int ypos, int width, int height);
33         ///
34         void resize();
35         ///
36         void redraw();
37         /// Return true if the cursor was fitted.
38         bool fitCursor(LyXText *);
39         ///
40         void redoCurrentBuffer();
41         ///
42         int resizeCurrentBuffer();
43         ///
44         void update();
45         //
46         void update(BufferView::UpdateCodes);
47         /// Update pixmap of screen
48         void updateScreen();
49         ///
50         void workAreaExpose();
51         ///
52         void updateScrollbar();
53         ///
54         void scrollCB(double value);
55         ///
56         Inset * checkInsetHit(LyXText *, int & x, int & y,
57                               unsigned int button);
58         /// 
59         int scrollUp(long time);
60         ///
61         int scrollDown(long time);
62         ///
63         void workAreaKeyPress(KeySym, unsigned int state);
64         ///
65         void workAreaMotionNotify(int x, int y, unsigned int state);
66         ///
67         void workAreaButtonPress(int x, int y, unsigned int button);
68         ///
69         void workAreaButtonRelease(int x, int y, unsigned int button);
70         ///
71         void doubleClick(int x, int y, unsigned int button);
72         ///
73         void tripleClick(int x, int y, unsigned int button);
74         ///
75         void enterView();
76         ///
77         void leaveView();
78         ///
79         void cursorToggle();
80         ///
81         void cursorPrevious(LyXText *);
82         ///
83         void cursorNext(LyXText *);
84         ///
85         bool available() const;
86         ///
87         void beforeChange();
88         ///
89         void savePosition(unsigned int i);
90         ///
91         void restorePosition(unsigned int i);
92         ///
93         bool isSavedPosition(unsigned int i);
94         ///
95         void setState();
96         ///
97         void insetSleep();
98         ///
99         void insetWakeup();
100         ///
101         void insetUnlock();
102         ///
103         bool focus() const;
104         ///
105         void focus(bool);
106         ///
107         bool active() const;
108         ///
109         bool belowMouse() const;
110         ///
111         void showCursor();
112         ///
113         void hideCursor();
114         ///
115         void toggleSelection(bool = true);
116         ///
117         void toggleToggle();
118         ///
119         void center();
120         ///
121         BufferView * bv_;
122         ///
123         LyXView * owner_;
124         ///
125         Buffer * buffer_;
126         ///
127         LyXScreen * screen_;
128         ///
129         long current_scrollbar_value;
130         ///
131         FL_OBJECT * figinset_canvas;
132         ///
133         Timeout cursor_timeout;
134         ///
135         int last_click_x;
136         ///
137         int last_click_y;
138         ///
139         WorkArea * workarea_;
140         ///
141         UpdateInset updatelist;
142         ///
143         void pasteClipboard(bool asPara);
144         ///
145         void stuffClipboard(string const &) const;
146 private:
147         ///
148         bool using_xterm_cursor;
149
150         struct Position {
151                 /// Filename
152                 string filename;
153                 /// Cursor paragraph Id
154                 int par_id;
155                 /// Cursor position
156                 int par_pos;
157                 ///
158                 Position() : par_id(0), par_pos(0) {}
159                 ///
160                 Position(string const & f, int id, int pos)
161                         : filename(f), par_id(id), par_pos(pos) {}
162         };
163         std::vector<Position> saved_positions;
164 };
165 #endif