class LyXText;
class TeXErrors;
class Buffer;
-
-#define XFORMS_CLIPBOARD 1
+class LyXScreen;
+class WorkArea;
///
class BufferView {
public:
+ ///
+ enum UpdateCodes {
+ UPDATE = 0,
+ SELECT = 1,
+ FITCUR = 2,
+ CHANGE = 4
+ };
+
///
BufferView(LyXView * owner, int , int , int, int);
///
///
Painter & painter();
///
+ LyXScreen * screen() const;
+ ///
+ WorkArea * workarea() const;
+ ///
void buffer(Buffer * b);
///
void resize(int, int, int, int);
///
void update();
///
- void update(signed char f);
+ void update(UpdateCodes uc);
///
void updateScrollbar();
///
+ Inset * checkInsetHit(LyXText *, int & x, int & y, unsigned int button);
+ ///
void redoCurrentBuffer();
///
int resizeCurrentBuffer();
void savePosition();
///
void restorePosition();
+ ///
+ bool NoSavedPositions();
/** This holds the mapping between buffer paragraphs and screen rows.
This should be private...but not yet. (Lgb)
*/
LyXText * text;
///
- unsigned short paperWidth() const;
+ int workWidth() const;
///
UpdatableInset * the_locking_inset;
///
/// A callback for the slider in the scrollbar.
void scrollCB(double);
- ///
- static void cursorToggleCB(FL_OBJECT * ob, long);
-
///
void setState();
void enterView();
///
void leaveView();
-#ifndef XFORMS_CLIPBOARD
- ///
- void workAreaSelectionNotify(Window win, XEvent * event);
-#endif
///
bool ChangeRefs(string const & from, string const & to);
-#ifdef XFORMS_CLIPBOARD
///
- void pasteSelection(bool asPara);
-#endif
+ void pasteClipboard(bool asPara);
+ ///
+ void stuffClipboard(string const &) const;
private:
struct Pimpl;
+ friend struct BufferView::Pimpl;
Pimpl * pimpl_;
};
+
+BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
+ BufferView::UpdateCodes uc2);
+
#endif