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
30 BufferView(LyXView * owner, int , int , int, int);
34 Buffer * buffer() const;
38 void buffer(Buffer * b);
40 void resize(int, int, int, int);
50 void update(signed char f);
52 void smallUpdate(signed char f);
54 void updateScrollbar();
56 void redoCurrentBuffer();
58 int resizeCurrentBuffer();
62 void cursorPrevious();
66 bool available() const;
68 LyXView * owner() const;
74 void restorePosition();
75 /** This holds the mapping between buffer paragraphs and screen rows.
76 This should be private...but not yet. (Lgb)
80 unsigned short paperWidth() const;
82 UpdatableInset * the_locking_inset;
84 void updateInset(Inset * inset, bool mark_dirty);
98 void replaceWord(string const & replacestring);
100 void endOfSpellCheck();
102 void selectLastWord();
104 char * nextWord(float & value);
106 void insertCorrectQuote();
110 bool gotoLabel(string const & label);
118 void pasteEnvironment();
120 void copyEnvironment();
124 void protectedBlank();
128 void menuSeparator();
130 void endOfSentenceDot();
134 void hyphenationPoint();
146 void allFloats(char flag, char figmar);
147 /// removes all autodeletable insets
148 bool removeAutoInsets();
150 void insertErrors(TeXErrors & terr);
152 void setCursorFromRow(int row);
153 /** Insert an inset into the buffer
154 Insert inset into buffer, placing it in a layout of lout,
155 if no_table make sure that it doesn't end up in a table. */
156 void insertInset(Inset * inset, string const & lout = string(),
157 bool no_table = false);
158 /// open and lock an updatable inset
159 void open_new_inset(UpdatableInset * new_inset);
160 /// Inserts a lyx file at cursor position. Returns false if it fails.
161 bool insertLyXFile(string const & file);
163 bool lockInset(UpdatableInset * inset);
165 void showLockedInsetCursor(long x, long y, int asc, int desc);
167 void hideLockedInsetCursor();
169 void fitLockedInsetCursor(long x, long y, int asc, int desc);
171 int unlockInset(UpdatableInset * inset);
173 void lockedInsetStoreUndo(Undo::undo_kind kind);
179 void toggleSelection(bool = true);
192 bool belowMouse() const;
193 /// A callback for the up arrow in the scrollbar.
194 void upCB(long time, int button);
195 /// A callback for the slider in the scrollbar.
196 void scrollCB(double);
197 /// A callback for the down arrow in the scrollbar.
198 void downCB(long time, int button);
201 static void cursorToggleCB(FL_OBJECT * ob, long);
207 void pushIntoUpdateList(Inset * i);
209 void workAreaExpose();
211 void workAreaButtonPress(int x, int y, unsigned int button);
213 void workAreaButtonRelease(int x, int y, unsigned int button);
215 void workAreaMotionNotify(int x, int y, unsigned int state);
217 void doubleClick(int x, int y, unsigned int button);
219 void tripleClick(int x, int y, unsigned int button);
225 void workAreaSelectionNotify(Window win, XEvent * event);