]> git.lyx.org Git - lyx.git/blobdiff - src/WorkArea.h
Applied Angus patch to compile on DEC C++ and to avoid name clashes
[lyx.git] / src / WorkArea.h
index 3be02d3625d7687c1f6e4db31bdda263e01a16c2..dc3e26a5413d2bcd4fc5a4296c1b38f7e4787acd 100644 (file)
 
 #include <utility>
 
+#include <sigc++/signal_system.h>
+
 #include FORMS_H_LOCATION
 #include "Painter.h"
 
-class BufferView;
-
-#define XFORMS_CLIPBOARD 1
-
+///
 class WorkArea {
 public:
        ///
-       WorkArea(BufferView *, int xpos, int ypos, int width, int height);
+       WorkArea(int xpos, int ypos, int width, int height);
        ///
        ~WorkArea();
        ///
        Painter & getPainter() { return painter_; }
        ///
-       unsigned int workWidth() const { return work_area->w; }
+       int workWidth() const { return work_area->w; }
        ///
        unsigned int width() const { return work_area->w + scrollbar->w; }
        ///
@@ -79,7 +78,7 @@ public:
                return fl_get_scrollbar_value(scrollbar);
        }
        ///
-       std::pair<float, float> getScrollbarBounds() const {
+       std::pair<float, float> const getScrollbarBounds() const {
                std::pair<float, float> p;
                fl_get_scrollbar_bounds(scrollbar, &p.first, &p.second);
                return p;
@@ -92,12 +91,35 @@ public:
                                     int /*key*/, void * xev);
        /// xforms callback
        static void scroll_cb(FL_OBJECT *, long);
-#ifdef XFORMS_CLIPBOARD
        ///
-       string getClipboard() const;
+       string const getClipboard() const;
        ///
        void putClipboard(string const &) const;
-#endif
+       // Signals
+       ///
+       SigC::Signal0<void> workAreaExpose;
+       ///
+       SigC::Signal1<void, double> scrollCB;
+       ///
+       SigC::Signal2<void, KeySym, unsigned int> workAreaKeyPress;
+       ///
+       SigC::Signal3<void, int, int, unsigned int> workAreaButtonPress;
+       ///
+       SigC::Signal3<void, int, int, unsigned int> workAreaButtonRelease;
+       ///
+       SigC::Signal3<void, int, int, unsigned int> workAreaMotionNotify;
+       ///
+       SigC::Signal0<void> workAreaFocus;
+       ///
+       SigC::Signal0<void> workAreaUnfocus;
+       ///
+       SigC::Signal0<void> workAreaEnter;
+       ///
+       SigC::Signal0<void> workAreaLeave;
+       ///
+       SigC::Signal3<void, int, int, unsigned int> workAreaDoubleClick;
+       ///
+       SigC::Signal3<void, int, int, unsigned int> workAreaTripleClick;
 private:
        ///
        void createPixmap(int, int);
@@ -107,13 +129,13 @@ private:
        FL_OBJECT * work_area;
        ///
        FL_OBJECT * scrollbar;
-       ///
-       BufferView * owner;
        /// The pixmap overlay on the workarea
        Pixmap workareapixmap;
        ///
        Painter painter_;
        ///
        FL_OBJECT * figinset_canvas;
+       /// if we call redraw with true needed for locking-insets
+       bool screen_cleared;
 };
 #endif