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
40 BufferView(LyXView * owner, int , int , int, int);
44 Buffer * buffer() const;
48 LyXScreen * screen() const;
50 void buffer(Buffer * b);
52 void resize(int, int, int, int);
62 void update(UpdateCodes uc);
64 void updateScrollbar();
66 void redoCurrentBuffer();
68 int resizeCurrentBuffer();
72 void cursorPrevious();
76 bool available() const;
78 LyXView * owner() const;
84 void restorePosition();
86 bool NoSavedPositions();
87 /** This holds the mapping between buffer paragraphs and screen rows.
88 This should be private...but not yet. (Lgb)
92 int workWidth() const;
94 UpdatableInset * the_locking_inset;
96 void updateInset(Inset * inset, bool mark_dirty);
110 void replaceWord(string const & replacestring);
112 void endOfSpellCheck();
114 void selectLastWord();
116 char * nextWord(float & value);
118 void insertCorrectQuote();
122 bool gotoLabel(string const & label);
130 void pasteEnvironment();
132 void copyEnvironment();
136 void protectedBlank();
140 void menuSeparator();
142 void endOfSentenceDot();
146 void hyphenationPoint();
158 void allFloats(char flag, char figmar);
159 /// removes all autodeletable insets
160 bool removeAutoInsets();
162 void insertErrors(TeXErrors & terr);
164 void setCursorFromRow(int row);
165 /** Insert an inset into the buffer
166 Insert inset into buffer, placing it in a layout of lout,
167 if no_table make sure that it doesn't end up in a table. */
168 bool insertInset(Inset * inset, string const & lout = string(),
169 bool no_table = false);
170 /// open and lock an updatable inset
171 void open_new_inset(UpdatableInset * new_inset);
172 /// Inserts a lyx file at cursor position. Returns false if it fails.
173 bool insertLyXFile(string const & file);
175 bool lockInset(UpdatableInset * inset);
177 void showLockedInsetCursor(long x, long y, int asc, int desc);
179 void hideLockedInsetCursor();
181 void fitLockedInsetCursor(long x, long y, int asc, int desc);
183 int unlockInset(UpdatableInset * inset);
185 void lockedInsetStoreUndo(Undo::undo_kind kind);
191 void toggleSelection(bool = true);
204 bool belowMouse() const;
205 /// A callback for the slider in the scrollbar.
206 void scrollCB(double);
209 static void cursorToggleCB(void * ob);
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;
244 BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
245 BufferView::UpdateCodes uc2);