]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.h
redraw fix 1.
[lyx.git] / src / BufferView_pimpl.h
index 28958ad5797766e1ad54c19fdcf8cb99c82f8cce..05a390b28fed8b7aa3e659f5fe6e0e9e753b2c4a 100644 (file)
@@ -15,6 +15,7 @@
 #include "frontends/Timeout.h"
 #include "frontends/key_state.h"
 #include "frontends/mouse_state.h"
+#include "frontends/LyXKeySym.h"
 #include "box.h"
 #include "insets/insetspecialchar.h"
 #include "support/types.h"
 
 class LyXView;
 class WorkArea;
-class LScreen;
-
-// FIXME: remove
-#include <X11/Xlib.h>
+class LyXScreen;
  
 ///
 struct BufferView::Pimpl : public boost::signals::trackable {
@@ -43,15 +41,9 @@ struct BufferView::Pimpl : public boost::signals::trackable {
        /// return the work area for this bview
        WorkArea & workarea() const;
        /// return the screen for this bview
-       LScreen & screen() const;
+       LyXScreen & screen() const;
        ///
        void buffer(Buffer *);
-       ///
-       void resize(int xpos, int ypos, int width, int height);
-       ///
-       void resize();
-       ///
-       void redraw();
        /// Return true if the cursor was fitted.
        bool fitCursor();
        ///
@@ -62,26 +54,28 @@ struct BufferView::Pimpl : public boost::signals::trackable {
        void update();
        //
        void update(LyXText *, BufferView::UpdateCodes);
-       /// Update pixmap of screen
-       void updateScreen();
+       /**
+        * Repaint pixmap. Used for when we've made a visible
+        * change but don't need the full update() logic
+        */
+       void repaint();
        ///
-       void workAreaExpose();
+       void workAreaResize();
        ///
        void updateScrollbar();
        ///
-       void scrollCB(double value);
+       void scrollDocView(int value);
        /**
         * Returns an inset if inset was hit, or 0 if not.
         *
         * If hit, the coordinates are changed relative to the inset.
         */
        Inset * checkInsetHit(LyXText *, int & x, int & y);
+       /// wheel mouse scroll
+       int scroll(long time);
        ///
-       int scrollUp(long time);
-       ///
-       int scrollDown(long time);
-       ///
-       void workAreaKeyPress(KeySym, key_modifier::state state);
+       void workAreaKeyPress(LyXKeySymPtr key,
+                             key_modifier::state state);
        ///
        void workAreaMotionNotify(int x, int y, mouse_button::state state);
        ///
@@ -117,10 +111,6 @@ struct BufferView::Pimpl : public boost::signals::trackable {
        ///
        void insetUnlock();
        ///
-       bool focus() const;
-       ///
-       void focus(bool);
-       ///
        void showCursor();
        ///
        void hideCursor();
@@ -174,12 +164,10 @@ private:
        ///
        Buffer * buffer_;
        ///
-       boost::scoped_ptr<LScreen> screen_;
+       boost::scoped_ptr<LyXScreen> screen_;
        ///
        boost::scoped_ptr<WorkArea> workarea_;
        ///
-       long current_scrollbar_value;
-       ///
        Timeout cursor_timeout;
        ///
        void pasteClipboard(bool asPara);
@@ -210,4 +198,4 @@ private:
        ///
        void MenuInsertLyXFile(string const & filen);
 };
-#endif
+#endif // BUFFERVIEW_PIMPL_H