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"
22 #ifdef SIGC_CXX_NAMESPACES
27 struct BufferView::Pimpl : public Object {
29 Pimpl(BufferView * i, LyXView * o,
30 int xpos, int ypos, int width, int height);
34 void buffer(Buffer *);
36 void resize(int xpos, int ypos, int width, int height);
41 /// Return true if the cursor was fitted.
42 bool fitCursor(LyXText *);
44 void redoCurrentBuffer();
46 int resizeCurrentBuffer();
50 void update(LyXText *, BufferView::UpdateCodes);
51 /// Update pixmap of screen
54 void workAreaExpose();
56 void updateScrollbar();
58 void scrollCB(double value);
60 Inset * checkInsetHit(LyXText *, int & x, int & y,
63 int scrollUp(long time);
65 int scrollDown(long time);
67 void workAreaKeyPress(KeySym, unsigned int state);
69 void workAreaMotionNotify(int x, int y, unsigned int state);
71 void workAreaButtonPress(int x, int y, unsigned int button);
73 void workAreaButtonRelease(int x, int y, unsigned int button);
75 void doubleClick(int x, int y, unsigned int button);
77 void tripleClick(int x, int y, unsigned int button);
85 void cursorPrevious(LyXText *);
87 void cursorNext(LyXText *);
89 bool available() const;
91 void beforeChange(LyXText *);
93 void savePosition(unsigned int i);
95 void restorePosition(unsigned int i);
97 bool isSavedPosition(unsigned int i);
113 bool belowMouse() const;
119 void toggleSelection(bool = true);
125 bool Dispatch(kb_action action, string const & argument);
128 friend class BufferView;
137 boost::scoped_ptr<LyXScreen> screen_;
139 long current_scrollbar_value;
141 FL_OBJECT * figinset_canvas;
143 Timeout cursor_timeout;
151 UpdateInset updatelist;
153 void pasteClipboard(bool asPara);
155 void stuffClipboard(string const &) const;
157 bool using_xterm_cursor;
162 /// Cursor paragraph Id
165 LyXParagraph::size_type par_pos;
167 Position() : par_id(0), par_pos(0) {}
169 Position(string const & f, int id, LyXParagraph::size_type pos)
170 : filename(f), par_id(id), par_pos(pos) {}
173 std::vector<Position> saved_positions;
175 void moveCursorUpdate(bool selecting);
176 /// Get next inset of this class from current cursor position
177 Inset * getInsetByCode(Inset::Code code);
179 void MenuInsertLyXFile(string const & filen);