2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ====================================================== */
19 #include FORMS_H_LOCATION
41 BufferView(LyXView * owner, int , int , int, int);
45 Buffer * buffer() const;
49 LyXScreen * screen() const;
51 WorkArea * workarea() const;
53 void buffer(Buffer * b);
55 void resize(int, int, int, int);
65 void update(UpdateCodes uc);
67 void updateScrollbar();
69 Inset * checkInsetHit(LyXText *, int & x, int & y, unsigned int button);
71 void redoCurrentBuffer();
73 int resizeCurrentBuffer();
77 void cursorPrevious();
81 bool available() const;
83 LyXView * owner() const;
89 void restorePosition();
91 bool NoSavedPositions();
92 /** This holds the mapping between buffer paragraphs and screen rows.
93 This should be private...but not yet. (Lgb)
97 int workWidth() const;
99 UpdatableInset * the_locking_inset;
101 void updateInset(Inset * inset, bool mark_dirty);
115 void replaceWord(string const & replacestring);
117 void endOfSpellCheck();
119 void selectLastWord();
121 char * nextWord(float & value);
123 void insertCorrectQuote();
127 bool gotoLabel(string const & label);
135 void pasteEnvironment();
137 void copyEnvironment();
141 void protectedBlank();
145 void menuSeparator();
147 void endOfSentenceDot();
151 void hyphenationPoint();
163 void allFloats(char flag, char figmar);
164 /// removes all autodeletable insets
165 bool removeAutoInsets();
167 void insertErrors(TeXErrors & terr);
169 void setCursorFromRow(int row);
170 /** Insert an inset into the buffer
171 Insert inset into buffer, placing it in a layout of lout,
172 if no_table make sure that it doesn't end up in a table. */
173 bool insertInset(Inset * inset, string const & lout = string(),
174 bool no_table = false);
175 /// open and lock an updatable inset
176 bool open_new_inset(UpdatableInset * new_inset);
177 /// Inserts a lyx file at cursor position. Returns false if it fails.
178 bool insertLyXFile(string const & file);
180 bool lockInset(UpdatableInset * inset);
182 void showLockedInsetCursor(long x, long y, int asc, int desc);
184 void hideLockedInsetCursor();
186 void fitLockedInsetCursor(long x, long y, int asc, int desc);
188 int unlockInset(UpdatableInset * inset);
190 void lockedInsetStoreUndo(Undo::undo_kind kind);
196 void toggleSelection(bool = true);
209 bool belowMouse() const;
210 /// A callback for the slider in the scrollbar.
211 void scrollCB(double);
217 void pushIntoUpdateList(Inset * i);
219 void workAreaExpose();
221 void workAreaButtonPress(int x, int y, unsigned int button);
223 void workAreaButtonRelease(int x, int y, unsigned int button);
225 void workAreaMotionNotify(int x, int y, unsigned int state);
227 void doubleClick(int x, int y, unsigned int button);
229 void tripleClick(int x, int y, unsigned int button);
235 bool ChangeRefs(string const & from, string const & to);
237 void pasteClipboard(bool asPara);
239 void stuffClipboard(string const &) const;
242 friend struct BufferView::Pimpl;
247 BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
248 BufferView::UpdateCodes uc2);