X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FWorkArea.h;h=7c00df597da8480065aa6e0f56b4d9b5d69df6c2;hb=8cb2e519b3975cc643f2c93706137cf2e6a4f4d8;hp=e0a4f26e0360162445906673734caf2bcaa54f92;hpb=a0cf758d5a79140045c2a90e2ff5878e0b391bcc;p=lyx.git diff --git a/src/WorkArea.h b/src/WorkArea.h index e0a4f26e03..7c00df597d 100644 --- a/src/WorkArea.h +++ b/src/WorkArea.h @@ -17,17 +17,25 @@ #endif #include -using std::pair; + +#include #include FORMS_H_LOCATION #include "Painter.h" -class BufferView; +#ifdef SIGC_CXX_NAMESPACES +using SigC::Signal0; +using SigC::Signal1; +using SigC::Signal2; +using SigC::Signal3; +#endif + +/// class WorkArea { public: /// - WorkArea(BufferView *, int xpos, int ypos, int width, int height); + WorkArea(int xpos, int ypos, int width, int height); /// ~WorkArea(); /// @@ -35,9 +43,9 @@ public: /// int workWidth() const { return work_area->w; } /// - int width() const { return work_area->w + scrollbar->w; } + unsigned int width() const { return work_area->w + scrollbar->w; } /// - int height() const { return work_area->h; } + unsigned int height() const { return work_area->h; } /// int xpos() const { return work_area->x; } /// @@ -48,8 +56,6 @@ public: void redraw() const { fl_redraw_object(work_area); fl_redraw_object(scrollbar); - fl_redraw_object(button_down); - fl_redraw_object(button_up); } /// void setFocus() const; @@ -60,25 +66,29 @@ public: /// bool active() const { return work_area->active; } /// + bool belowMouse() const; + /// bool visible() const { return work_area->form->visible; } /// void greyOut() const; /// void setScrollbar(double pos, double length_fraction) const; /// - void setScrollbarValue(double y) const { fl_set_slider_value(scrollbar, y); } + void setScrollbarValue(double y) const { + fl_set_scrollbar_value(scrollbar, y); + } /// void setScrollbarBounds(double, double) const; /// - void setScrollbarIncrements(float inc) const; + void setScrollbarIncrements(double inc) const; /// double getScrollbarValue() const { - return fl_get_slider_value(scrollbar); + return fl_get_scrollbar_value(scrollbar); } /// - pair getScrollbarBounds() const { - pair p; - fl_get_slider_bounds(scrollbar, &p.first, &p.second); + std::pair const getScrollbarBounds() const { + std::pair p; + fl_get_scrollbar_bounds(scrollbar, &p.first, &p.second); return p; } /// @@ -88,11 +98,36 @@ public: FL_Coord, FL_Coord, int /*key*/, void * xev); /// xforms callback - static void up_cb(FL_OBJECT *, long); - /// xforms callback - static void down_cb(FL_OBJECT *, long); - /// xforms callback static void scroll_cb(FL_OBJECT *, long); + /// + string const getClipboard() const; + /// + void putClipboard(string const &) const; + // Signals + /// + Signal0 workAreaExpose; + /// + Signal1 scrollCB; + /// + Signal2 workAreaKeyPress; + /// + Signal3 workAreaButtonPress; + /// + Signal3 workAreaButtonRelease; + /// + Signal3 workAreaMotionNotify; + /// + Signal0 workAreaFocus; + /// + Signal0 workAreaUnfocus; + /// + Signal0 workAreaEnter; + /// + Signal0 workAreaLeave; + /// + Signal3 workAreaDoubleClick; + /// + Signal3 workAreaTripleClick; private: /// void createPixmap(int, int); @@ -102,17 +137,13 @@ private: FL_OBJECT * work_area; /// FL_OBJECT * scrollbar; - /// - FL_OBJECT * button_down; - /// - FL_OBJECT * button_up; - /// - 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