3 #ifndef BUFFERVIEW_PIMPL_H
4 #define BUFFERVIEW_PIMPL_H
6 #include "BufferView.h"
7 #include "UpdateInset.h"
8 #include "commandtags.h"
9 #include "frontends/Timeout.h"
19 #ifdef SIGC_CXX_NAMESPACES
24 struct BufferView::Pimpl : public Object {
26 Pimpl(BufferView * i, LyXView * o,
27 int xpos, int ypos, int width, int height);
31 void buffer(Buffer *);
33 void resize(int xpos, int ypos, int width, int height);
38 /// Return true if the cursor was fitted.
39 bool fitCursor(LyXText *);
41 void redoCurrentBuffer();
43 int resizeCurrentBuffer();
47 void update(LyXText *, BufferView::UpdateCodes);
48 /// Update pixmap of screen
51 void workAreaExpose();
53 void updateScrollbar();
55 void scrollCB(double value);
57 Inset * checkInsetHit(LyXText *, int & x, int & y,
60 int scrollUp(long time);
62 int scrollDown(long time);
64 void workAreaKeyPress(KeySym, unsigned int state);
66 void workAreaMotionNotify(int x, int y, unsigned int state);
68 void workAreaButtonPress(int x, int y, unsigned int button);
70 void workAreaButtonRelease(int x, int y, unsigned int button);
72 void doubleClick(int x, int y, unsigned int button);
74 void tripleClick(int x, int y, unsigned int button);
82 void cursorPrevious(LyXText *);
84 void cursorNext(LyXText *);
86 bool available() const;
88 void beforeChange(LyXText *);
90 void savePosition(unsigned int i);
92 void restorePosition(unsigned int i);
94 bool isSavedPosition(unsigned int i);
110 bool belowMouse() const;
116 void toggleSelection(bool = true);
122 bool Dispatch(kb_action action, string const & argument);
132 long current_scrollbar_value;
134 FL_OBJECT * figinset_canvas;
136 Timeout cursor_timeout;
142 WorkArea * workarea_;
144 UpdateInset updatelist;
146 void pasteClipboard(bool asPara);
148 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) {}
166 std::vector<Position> saved_positions;
168 void moveCursorUpdate(bool selecting);
169 /// Get next inset of this class from current cursor position
170 Inset * getInsetByCode(Inset::Code code);
171 void MenuInsertLyXFile(string const & filen);