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
39 BufferView(LyXView * owner, int , int , int, int);
43 Buffer * buffer() const;
47 void buffer(Buffer * b);
49 void resize(int, int, int, int);
59 void update(UpdateCodes uc);
61 void updateScrollbar();
63 void redoCurrentBuffer();
65 int resizeCurrentBuffer();
69 void cursorPrevious();
73 bool available() const;
75 LyXView * owner() const;
81 void restorePosition();
83 bool NoSavedPositions();
84 /** This holds the mapping between buffer paragraphs and screen rows.
85 This should be private...but not yet. (Lgb)
89 int workWidth() const;
91 UpdatableInset * the_locking_inset;
93 void updateInset(Inset * inset, bool mark_dirty);
107 void replaceWord(string const & replacestring);
109 void endOfSpellCheck();
111 void selectLastWord();
113 char * nextWord(float & value);
115 void insertCorrectQuote();
119 bool gotoLabel(string const & label);
127 void pasteEnvironment();
129 void copyEnvironment();
133 void protectedBlank();
137 void menuSeparator();
139 void endOfSentenceDot();
143 void hyphenationPoint();
155 void allFloats(char flag, char figmar);
156 /// removes all autodeletable insets
157 bool removeAutoInsets();
159 void insertErrors(TeXErrors & terr);
161 void setCursorFromRow(int row);
162 /** Insert an inset into the buffer
163 Insert inset into buffer, placing it in a layout of lout,
164 if no_table make sure that it doesn't end up in a table. */
165 bool insertInset(Inset * inset, string const & lout = string(),
166 bool no_table = false);
167 /// open and lock an updatable inset
168 void open_new_inset(UpdatableInset * new_inset);
169 /// Inserts a lyx file at cursor position. Returns false if it fails.
170 bool insertLyXFile(string const & file);
172 bool lockInset(UpdatableInset * inset);
174 void showLockedInsetCursor(long x, long y, int asc, int desc);
176 void hideLockedInsetCursor();
178 void fitLockedInsetCursor(long x, long y, int asc, int desc);
180 int unlockInset(UpdatableInset * inset);
182 void lockedInsetStoreUndo(Undo::undo_kind kind);
188 void toggleSelection(bool = true);
201 bool belowMouse() const;
202 /// A callback for the slider in the scrollbar.
203 void scrollCB(double);
206 static void cursorToggleCB(void * ob);
212 void pushIntoUpdateList(Inset * i);
214 void workAreaExpose();
216 void workAreaButtonPress(int x, int y, unsigned int button);
218 void workAreaButtonRelease(int x, int y, unsigned int button);
220 void workAreaMotionNotify(int x, int y, unsigned int state);
222 void doubleClick(int x, int y, unsigned int button);
224 void tripleClick(int x, int y, unsigned int button);
230 bool ChangeRefs(string const & from, string const & to);
232 void pasteClipboard(bool asPara);
234 void stuffClipboard(string const &) const;
241 BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
242 BufferView::UpdateCodes uc2);