]> git.lyx.org Git - lyx.git/blob - src/BufferView.C
more guii moving around.
[lyx.git] / src / BufferView.C
1 /* This file is part of
2  * ======================================================
3  *
4  *           LyX, The Document Processor
5  *
6  *           Copyright 1995 Matthias Ettrich
7  *           Copyright 1995-2001 The LyX Team.
8  *
9  * ====================================================== */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "BufferView.h"
18 #include "BufferView_pimpl.h"
19 #include "lyxtext.h"
20 #include "frontends/screen.h"
21
22
23 BufferView::BufferView(LyXView * o, int xpos, int ypos,
24                        int width, int height)
25         : pimpl_(new Pimpl(this, o, xpos, ypos, width, height))
26 {
27         text = 0;
28 }
29
30
31 BufferView::~BufferView()
32 {
33         delete text;
34         delete pimpl_;
35 }
36
37
38 Buffer * BufferView::buffer() const
39 {
40         return pimpl_->buffer_;
41 }
42
43
44 LyXScreen * BufferView::screen() const
45 {
46         return pimpl_->screen_.get();
47 }
48
49
50 LyXView * BufferView::owner() const
51 {
52         return pimpl_->owner_;
53 }
54
55
56 Painter & BufferView::painter()
57 {
58         return pimpl_->painter();
59 }
60
61
62 void BufferView::buffer(Buffer * b)
63 {
64         pimpl_->buffer(b);
65 }
66
67
68 void BufferView::resize(int xpos, int ypos, int width, int height)
69 {
70         pimpl_->resize(xpos, ypos, width, height);
71 }
72
73
74 void BufferView::resize()
75 {
76         pimpl_->resize();
77 }
78
79
80 void BufferView::redraw()
81 {
82         pimpl_->redraw();
83 }
84
85
86 bool BufferView::fitCursor()
87 {
88         return pimpl_->fitCursor();
89 }
90
91
92 void BufferView::update()
93 {
94         pimpl_->update();
95 }
96
97
98 void BufferView::updateScrollbar()
99 {
100         pimpl_->updateScrollbar();
101 }
102
103
104 void BufferView::scrollCB(double value)
105 {
106         pimpl_->scrollCB(value);
107 }
108
109
110 Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y)
111 {
112         return pimpl_->checkInsetHit(text, x, y);
113 }
114
115
116 void BufferView::redoCurrentBuffer()
117 {
118         pimpl_->redoCurrentBuffer();
119 }
120
121
122 int BufferView::resizeCurrentBuffer()
123 {
124         return pimpl_->resizeCurrentBuffer();
125 }
126
127
128 void BufferView::cursorPrevious(LyXText * text)
129 {
130         pimpl_->cursorPrevious(text);
131 }
132
133
134 void BufferView::cursorNext(LyXText * text)
135 {
136         pimpl_->cursorNext(text);
137 }
138
139
140 bool BufferView::available() const
141 {
142         return pimpl_->available();
143 }
144
145
146 void BufferView::beforeChange(LyXText * text)
147 {
148         pimpl_->beforeChange(text);
149 }
150
151
152 void BufferView::savePosition(unsigned int i)
153 {
154         pimpl_->savePosition(i);
155 }
156
157
158 void BufferView::restorePosition(unsigned int i)
159 {
160         pimpl_->restorePosition(i);
161 }
162
163
164 bool BufferView::isSavedPosition(unsigned int i)
165 {
166         return pimpl_->isSavedPosition(i);
167 }
168
169
170 void BufferView::update(LyXText * text, UpdateCodes f)
171 {
172         pimpl_->update(text, f);
173 }
174
175
176 void BufferView::setState()
177 {
178         pimpl_->setState();
179 }
180
181 #if 0
182 void BufferView::insetSleep()
183 {
184         pimpl_->insetSleep();
185 }
186
187
188 void BufferView::insetWakeup()
189 {
190         pimpl_->insetWakeup();
191 }
192 #endif
193
194
195 void BufferView::insetUnlock()
196 {
197         pimpl_->insetUnlock();
198 }
199
200
201 bool BufferView::focus() const
202 {
203         return pimpl_->focus();
204 }
205
206
207 void BufferView::focus(bool f)
208 {
209         pimpl_->focus(f);
210 }
211
212
213 bool BufferView::active() const
214 {
215         return pimpl_->active();
216 }
217
218
219 int BufferView::workWidth() const
220 {
221     return pimpl_->workarea_.workWidth();
222 }
223
224
225 bool BufferView::belowMouse() const
226 {
227         return pimpl_->belowMouse();
228 }
229
230
231 void BufferView::showCursor()
232 {
233         pimpl_->showCursor();
234 }
235
236
237 void BufferView::hideCursor()
238 {
239         pimpl_->hideCursor();
240 }
241
242
243 void BufferView::toggleSelection(bool b)
244 {
245         pimpl_->toggleSelection(b);
246 }
247
248
249 void BufferView::toggleToggle()
250 {
251         pimpl_->toggleToggle();
252 }
253
254
255 void BufferView::center()
256 {
257         pimpl_->center();
258 }
259
260
261 void BufferView::pasteClipboard(bool asPara)
262 {
263         pimpl_->pasteClipboard(asPara);
264 }
265
266
267 string const BufferView::getClipboard() const
268 {
269         return pimpl_->workarea_.getClipboard();
270 }
271
272
273 void BufferView::stuffClipboard(string const & stuff) const
274 {
275         pimpl_->stuffClipboard(stuff);
276 }
277
278
279 BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
280                                   BufferView::UpdateCodes uc2)
281 {
282         return static_cast<BufferView::UpdateCodes>
283                 (static_cast<int>(uc1) | static_cast<int>(uc2));
284 }
285
286 bool BufferView::Dispatch(kb_action action, string const & argument)
287 {
288         return pimpl_->Dispatch(action, argument);
289 }