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();
76 /** This holds the mapping between buffer paragraphs and screen rows.
77 This should be private...but not yet. (Lgb)
81 unsigned short paperWidth() const;
83 UpdatableInset * the_locking_inset;
85 void updateInset(Inset * inset, bool mark_dirty);
99 void replaceWord(string const & replacestring);
101 void endOfSpellCheck();
103 void selectLastWord();
105 char * nextWord(float & value);
107 void insertCorrectQuote();
111 bool gotoLabel(string const & label);
119 void pasteEnvironment();
121 void copyEnvironment();
125 void protectedBlank();
129 void menuSeparator();
131 void endOfSentenceDot();
135 void hyphenationPoint();
147 void allFloats(char flag, char figmar);
148 /// removes all autodeletable insets
149 bool removeAutoInsets();
151 void insertErrors(TeXErrors & terr);
153 void setCursorFromRow(int row);
154 /** Insert an inset into the buffer
155 Insert inset into buffer, placing it in a layout of lout,
156 if no_table make sure that it doesn't end up in a table. */
157 bool insertInset(Inset * inset, string const & lout = string(),
158 bool no_table = false);
159 /// open and lock an updatable inset
160 void open_new_inset(UpdatableInset * new_inset);
161 /// Inserts a lyx file at cursor position. Returns false if it fails.
162 bool insertLyXFile(string const & file);
164 bool lockInset(UpdatableInset * inset);
166 void showLockedInsetCursor(long x, long y, int asc, int desc);
168 void hideLockedInsetCursor();
170 void fitLockedInsetCursor(long x, long y, int asc, int desc);
172 int unlockInset(UpdatableInset * inset);
174 void lockedInsetStoreUndo(Undo::undo_kind kind);
180 void toggleSelection(bool = true);
193 bool belowMouse() const;
194 /// A callback for the slider in the scrollbar.
195 void scrollCB(double);
198 static void cursorToggleCB(FL_OBJECT * ob, long);
204 void pushIntoUpdateList(Inset * i);
206 void workAreaExpose();
208 void workAreaButtonPress(int x, int y, unsigned int button);
210 void workAreaButtonRelease(int x, int y, unsigned int button);
212 void workAreaMotionNotify(int x, int y, unsigned int state);
214 void doubleClick(int x, int y, unsigned int button);
216 void tripleClick(int x, int y, unsigned int button);
221 #ifndef XFORMS_CLIPBOARD
223 void workAreaSelectionNotify(Window win, XEvent * event);
226 bool ChangeRefs(string const & from, string const & to);
227 #ifdef XFORMS_CLIPBOARD
229 void pasteClipboard(bool asPara);
231 void stuffClipboard(string const &) const;