]> git.lyx.org Git - lyx.git/blob - src/BufferView.C
fix typo that put too many include paths for most people
[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 "lyxscreen.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
182 void BufferView::insetSleep()
183 {
184         pimpl_->insetSleep();
185 }
186
187
188 void BufferView::insetWakeup()
189 {
190         pimpl_->insetWakeup();
191 }
192
193
194 void BufferView::insetUnlock()
195 {
196         pimpl_->insetUnlock();
197 }
198
199
200 bool BufferView::focus() const
201 {
202         return pimpl_->focus();
203 }
204
205
206 void BufferView::focus(bool f)
207 {
208         pimpl_->focus(f);
209 }
210
211
212 bool BufferView::active() const
213 {
214         return pimpl_->active();
215 }
216
217
218 int BufferView::workWidth() const
219 {
220     return pimpl_->workarea_.workWidth();
221 }
222
223
224 bool BufferView::belowMouse() const
225 {
226         return pimpl_->belowMouse();
227 }
228
229
230 void BufferView::showCursor()
231 {
232         pimpl_->showCursor();
233 }
234
235
236 void BufferView::hideCursor()
237 {
238         pimpl_->hideCursor();
239 }
240
241
242 void BufferView::toggleSelection(bool b)
243 {
244         pimpl_->toggleSelection(b);
245 }
246
247
248 void BufferView::toggleToggle()
249 {
250         pimpl_->toggleToggle();
251 }
252
253
254 void BufferView::center()
255 {
256         pimpl_->center();
257 }
258
259
260 void BufferView::pasteClipboard(bool asPara)
261 {
262         pimpl_->pasteClipboard(asPara);
263 }
264
265
266 string const BufferView::getClipboard() const
267 {
268         return pimpl_->workarea_.getClipboard();
269 }
270
271
272 void BufferView::stuffClipboard(string const & stuff) const
273 {
274         pimpl_->stuffClipboard(stuff);
275 }
276
277
278 BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
279                                   BufferView::UpdateCodes uc2)
280 {
281         return static_cast<BufferView::UpdateCodes>
282                 (static_cast<int>(uc1) | static_cast<int>(uc2));
283 }
284
285 bool BufferView::Dispatch(kb_action action, string const & argument)
286 {
287         return pimpl_->Dispatch(action, argument);
288 }