]> git.lyx.org Git - lyx.git/blob - src/BufferView.C
remove some more unneeded focus stuff
[lyx.git] / src / BufferView.C
1 /**
2  * \file BufferView.C
3  * Copyright 1995-2002 the LyX Team
4  * Read the file COPYING
5  *
6  * \author unknown
7  * \author John Levon <moz@compsoc.man.ac.uk>
8  */
9
10 #include <config.h>
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include "BufferView.h"
17 #include "BufferView_pimpl.h"
18 #include "lyxtext.h"
19 #include "frontends/screen.h"
20 #include "frontends/WorkArea.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();
47 }
48
49
50 LyXView * BufferView::owner() const
51 {
52         return pimpl_->owner_;
53 }
54
55
56 Painter & BufferView::painter() const
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::scrollDocView(int value)
105 {
106         pimpl_->scrollDocView(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::insetUnlock()
183 {
184         pimpl_->insetUnlock();
185 }
186
187
188 int BufferView::workWidth() const
189 {
190         return pimpl_->workarea().workWidth();
191 }
192
193
194 void BufferView::showCursor()
195 {
196         pimpl_->showCursor();
197 }
198
199
200 void BufferView::hideCursor()
201 {
202         pimpl_->hideCursor();
203 }
204
205
206 void BufferView::toggleSelection(bool b)
207 {
208         pimpl_->toggleSelection(b);
209 }
210
211
212 void BufferView::toggleToggle()
213 {
214         pimpl_->toggleToggle();
215 }
216
217
218 void BufferView::center()
219 {
220         pimpl_->center();
221 }
222
223
224 void BufferView::pasteClipboard(bool asPara)
225 {
226         pimpl_->pasteClipboard(asPara);
227 }
228
229
230 string const BufferView::getClipboard() const
231 {
232         return pimpl_->workarea().getClipboard();
233 }
234
235
236 void BufferView::stuffClipboard(string const & stuff) const
237 {
238         pimpl_->stuffClipboard(stuff);
239 }
240
241
242 BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
243                                   BufferView::UpdateCodes uc2)
244 {
245         return static_cast<BufferView::UpdateCodes>
246                 (static_cast<int>(uc1) | static_cast<int>(uc2));
247 }
248
249 bool BufferView::Dispatch(kb_action action, string const & argument)
250 {
251         return pimpl_->Dispatch(action, argument);
252 }