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();
166 void allFloats(char flag, char figmar);
168 /// removes all autodeletable insets
169 bool removeAutoInsets();
171 void insertErrors(TeXErrors & terr);
173 void setCursorFromRow(int row);
174 /** Insert an inset into the buffer
175 Insert inset into buffer, placing it in a layout of lout,
176 if no_table make sure that it doesn't end up in a table. */
177 bool insertInset(Inset * inset, string const & lout = string(),
178 bool no_table = false);
179 /// open and lock an updatable inset
180 bool open_new_inset(UpdatableInset * new_inset);
181 /// Inserts a lyx file at cursor position. Returns false if it fails.
182 bool insertLyXFile(string const & file);
184 bool lockInset(UpdatableInset * inset);
186 void showLockedInsetCursor(long x, long y, int asc, int desc);
188 void hideLockedInsetCursor();
190 void fitLockedInsetCursor(long x, long y, int asc, int desc);
192 int unlockInset(UpdatableInset * inset);
194 void lockedInsetStoreUndo(Undo::undo_kind kind);
200 void toggleSelection(bool = true);
213 bool belowMouse() const;
214 /// A callback for the slider in the scrollbar.
215 void scrollCB(double);
221 void pushIntoUpdateList(Inset * i);
223 void workAreaExpose();
225 void workAreaButtonPress(int x, int y, unsigned int button);
227 void workAreaButtonRelease(int x, int y, unsigned int button);
229 void workAreaMotionNotify(int x, int y, unsigned int state);
231 void doubleClick(int x, int y, unsigned int button);
233 void tripleClick(int x, int y, unsigned int button);
239 bool ChangeRefs(string const & from, string const & to);
241 void pasteClipboard(bool asPara);
243 void stuffClipboard(string const &) const;
246 friend struct BufferView::Pimpl;
251 BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
252 BufferView::UpdateCodes uc2);