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
27 #define XFORMS_CLIPBOARD 1
33 BufferView(LyXView * owner, int , int , int, int);
37 Buffer * buffer() const;
41 void buffer(Buffer * b);
43 void resize(int, int, int, int);
53 void update(signed char f);
55 void updateScrollbar();
57 void redoCurrentBuffer();
59 int resizeCurrentBuffer();
63 void cursorPrevious();
67 bool available() const;
69 LyXView * owner() const;
75 void restorePosition();
77 bool NoSavedPositions();
78 /** This holds the mapping between buffer paragraphs and screen rows.
79 This should be private...but not yet. (Lgb)
83 unsigned short paperWidth() const;
85 UpdatableInset * the_locking_inset;
87 void updateInset(Inset * inset, bool mark_dirty);
101 void replaceWord(string const & replacestring);
103 void endOfSpellCheck();
105 void selectLastWord();
107 char * nextWord(float & value);
109 void insertCorrectQuote();
113 bool gotoLabel(string const & label);
121 void pasteEnvironment();
123 void copyEnvironment();
127 void protectedBlank();
131 void menuSeparator();
133 void endOfSentenceDot();
137 void hyphenationPoint();
149 void allFloats(char flag, char figmar);
150 /// removes all autodeletable insets
151 bool removeAutoInsets();
153 void insertErrors(TeXErrors & terr);
155 void setCursorFromRow(int row);
156 /** Insert an inset into the buffer
157 Insert inset into buffer, placing it in a layout of lout,
158 if no_table make sure that it doesn't end up in a table. */
159 bool insertInset(Inset * inset, string const & lout = string(),
160 bool no_table = false);
161 /// open and lock an updatable inset
162 void open_new_inset(UpdatableInset * new_inset);
163 /// Inserts a lyx file at cursor position. Returns false if it fails.
164 bool insertLyXFile(string const & file);
166 bool lockInset(UpdatableInset * inset);
168 void showLockedInsetCursor(long x, long y, int asc, int desc);
170 void hideLockedInsetCursor();
172 void fitLockedInsetCursor(long x, long y, int asc, int desc);
174 int unlockInset(UpdatableInset * inset);
176 void lockedInsetStoreUndo(Undo::undo_kind kind);
182 void toggleSelection(bool = true);
195 bool belowMouse() const;
196 /// A callback for the slider in the scrollbar.
197 void scrollCB(double);
200 static void cursorToggleCB(FL_OBJECT * ob, long);
206 void pushIntoUpdateList(Inset * i);
208 void workAreaExpose();
210 void workAreaButtonPress(int x, int y, unsigned int button);
212 void workAreaButtonRelease(int x, int y, unsigned int button);
214 void workAreaMotionNotify(int x, int y, unsigned int state);
216 void doubleClick(int x, int y, unsigned int button);
218 void tripleClick(int x, int y, unsigned int button);
223 #ifndef XFORMS_CLIPBOARD
225 void workAreaSelectionNotify(Window win, XEvent * event);
228 bool ChangeRefs(string const & from, string const & to);
229 #ifdef XFORMS_CLIPBOARD
231 void pasteClipboard(bool asPara);
233 void stuffClipboard(string const &) const;