3 #ifndef BUFFERVIEW_PIMPL_H
4 #define BUFFERVIEW_PIMPL_H
6 #include <boost/smart_ptr.hpp>
8 #include "BufferView.h"
9 #include "UpdateInset.h"
10 #include "commandtags.h"
11 #include "frontends/Timeout.h"
23 struct BufferView::Pimpl : public SigC::Object {
25 Pimpl(BufferView * i, LyXView * o,
26 int xpos, int ypos, int width, int height);
30 void buffer(Buffer *);
32 void resize(int xpos, int ypos, int width, int height);
37 /// Return true if the cursor was fitted.
38 bool fitCursor(LyXText *);
40 void redoCurrentBuffer();
42 int resizeCurrentBuffer();
46 void update(LyXText *, BufferView::UpdateCodes);
47 /// Update pixmap of screen
50 void workAreaExpose();
52 void updateScrollbar();
54 void scrollCB(double value);
56 Inset * checkInsetHit(LyXText *, int & x, int & y,
59 int scrollUp(long time);
61 int scrollDown(long time);
63 void workAreaKeyPress(KeySym, unsigned int state);
65 void workAreaMotionNotify(int x, int y, unsigned int state);
67 void workAreaButtonPress(int x, int y, unsigned int button);
69 void workAreaButtonRelease(int x, int y, unsigned int button);
71 void doubleClick(int x, int y, unsigned int button);
73 void tripleClick(int x, int y, unsigned int button);
81 void cursorPrevious(LyXText *);
83 void cursorNext(LyXText *);
85 bool available() const;
87 void beforeChange(LyXText *);
89 void savePosition(unsigned int i);
91 void restorePosition(unsigned int i);
93 bool isSavedPosition(unsigned int i);
109 bool belowMouse() const;
115 void toggleSelection(bool = true);
121 bool Dispatch(kb_action action, string const & argument);
124 friend class BufferView;
133 boost::scoped_ptr<LyXScreen> screen_;
135 long current_scrollbar_value;
137 Timeout cursor_timeout;
145 UpdateInset updatelist;
147 void pasteClipboard(bool asPara);
149 void stuffClipboard(string const &) const;
151 bool using_xterm_cursor;
156 /// Cursor paragraph Id
159 LyXParagraph::size_type par_pos;
161 Position() : par_id(0), par_pos(0) {}
163 Position(string const & f, int id, LyXParagraph::size_type pos)
164 : filename(f), par_id(id), par_pos(pos) {}
167 std::vector<Position> saved_positions;
169 void moveCursorUpdate(bool selecting);
170 /// Get next inset of this class from current cursor position
171 Inset * getInsetByCode(Inset::Code code);
173 void MenuInsertLyXFile(string const & filen);