]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.h
Small fix.
[lyx.git] / src / BufferView.h
index b1e1e11b8b7a5043a90b829f6a358ec6b9f98477..c29a3447e6c28a4e7a56e6561ef0688b9774e5c7 100644 (file)
@@ -23,12 +23,20 @@ class LyXView;
 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);
        ///
@@ -38,6 +46,10 @@ public:
        ///
        Painter & painter();
        ///
+       LyXScreen * screen() const;
+       ///
+       WorkArea * workarea() const;
+       ///
        void buffer(Buffer * b);
        ///
        void resize(int, int, int, int);
@@ -50,10 +62,12 @@ public:
        ///
        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();
@@ -80,7 +94,7 @@ public:
        */
        LyXText * text;
        ///
-       unsigned short paperWidth() const;
+       int workWidth() const;
        ///
        UpdatableInset * the_locking_inset;
        ///
@@ -139,14 +153,18 @@ public:
        void menuUndo();
        ///
        void menuRedo();
+#ifndef NEW_INSETS
        ///
        void toggleFloat();
        ///
        void openStuff();
+#endif
        ///
        void insertNote();
+#ifndef NEW_INSETS
        ///
        void allFloats(char flag, char figmar);
+#endif
        /// removes all autodeletable insets
        bool removeAutoInsets();
        ///
@@ -159,7 +177,7 @@ public:
        bool insertInset(Inset * inset, string const & lout = string(),
                         bool no_table = false);
        /// open and lock an updatable inset
-       void open_new_inset(UpdatableInset * new_inset);
+       bool open_new_inset(UpdatableInset * new_inset);
        /// Inserts a lyx file at cursor position. Returns false if it fails.
        bool insertLyXFile(string const & file);
        ///
@@ -196,9 +214,6 @@ public:
        /// A callback for the slider in the scrollbar.
        void scrollCB(double);
 
-       ///
-       static void cursorToggleCB(FL_OBJECT * ob, long);
-
        ///
        void setState();
 
@@ -220,21 +235,20 @@ public:
        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 pasteClipboard(bool asPara);
        ///
        void stuffClipboard(string const &) const;
-#endif
 private:
        struct Pimpl;
+       friend struct BufferView::Pimpl;
        Pimpl * pimpl_;
 };
 
+
+BufferView::UpdateCodes operator|(BufferView::UpdateCodes uc1,
+                                 BufferView::UpdateCodes uc2);
+
 #endif