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 void redoCurrentBuffer();
71 int resizeCurrentBuffer();
75 void cursorPrevious();
79 bool available() const;
81 LyXView * owner() const;
87 void restorePosition();
89 bool NoSavedPositions();
90 /** This holds the mapping between buffer paragraphs and screen rows.
91 This should be private...but not yet. (Lgb)
95 int workWidth() const;
97 UpdatableInset * the_locking_inset;
99 void updateInset(Inset * inset, bool mark_dirty);
113 void replaceWord(string const & replacestring);
115 void endOfSpellCheck();
117 void selectLastWord();
119 char * nextWord(float & value);
121 void insertCorrectQuote();
125 bool gotoLabel(string const & label);
133 void pasteEnvironment();
135 void copyEnvironment();
139 void protectedBlank();
143 void menuSeparator();
145 void endOfSentenceDot();
149 void hyphenationPoint();
161 void allFloats(char flag, char figmar);
162 /// removes all autodeletable insets
163 bool removeAutoInsets();
165 void insertErrors(TeXErrors & terr);
167 void setCursorFromRow(int row);
168 /** Insert an inset into the buffer
169 Insert inset into buffer, placing it in a layout of lout,
170 if no_table make sure that it doesn't end up in a table. */
171 bool insertInset(Inset * inset, string const & lout = string(),
172 bool no_table = false);
173 /// open and lock an updatable inset
174 void open_new_inset(UpdatableInset * new_inset);
175 /// Inserts a lyx file at cursor position. Returns false if it fails.
176 bool insertLyXFile(string const & file);
178 bool lockInset(UpdatableInset * inset);
180 void showLockedInsetCursor(long x, long y, int asc, int desc);
182 void hideLockedInsetCursor();
184 void fitLockedInsetCursor(long x, long y, int asc, int desc);
186 int unlockInset(UpdatableInset * inset);
188 void lockedInsetStoreUndo(Undo::undo_kind kind);
194 void toggleSelection(bool = true);
207 bool belowMouse() const;
208 /// A callback for the slider in the scrollbar.
209 void scrollCB(double);
215 void pushIntoUpdateList(Inset * i);
217 void workAreaExpose();
219 void workAreaButtonPress(int x, int y, unsigned int button);
221 void workAreaButtonRelease(int x, int y, unsigned int button);
223 void workAreaMotionNotify(int x, int y, unsigned int state);
225 void doubleClick(int x, int y, unsigned int button);
227 void tripleClick(int x, int y, unsigned int button);
233 bool ChangeRefs(string const & from, string const & to);
235 void pasteClipboard(bool asPara);
237 void stuffClipboard(string const &) const;
240 friend struct BufferView::Pimpl;
245 BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
246 BufferView::UpdateCodes uc2);