2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ======================================================*/
21 #include <sigc++/signal_system.h>
23 #include FORMS_H_LOCATION
26 #ifdef SIGC_CXX_NAMESPACES
45 int xpos, int ypos, int width, int height);
49 Painter & getPainter() { return painter_; }
51 int workWidth() const { return work_area->w; }
53 unsigned int width() const { return work_area->w + scrollbar->w; }
55 unsigned int height() const { return work_area->h; }
57 int xpos() const { return work_area->x; }
59 int ypos() const { return work_area->y; }
61 void resize(int xpos, int ypos, int width, int height);
64 fl_redraw_object(work_area);
65 fl_redraw_object(scrollbar);
68 void setFocus() const;
70 Window getWin() const { return work_area->form->window; }
72 bool hasFocus() const { return work_area->focus; }
74 bool active() const { return work_area->active; }
76 bool belowMouse() const;
78 bool visible() const { return work_area->form->visible; }
82 void setScrollbar(double pos, double length_fraction) const;
84 void setScrollbarValue(double y) const {
85 fl_set_scrollbar_value(scrollbar, y);
88 void setScrollbarBounds(double, double) const;
90 void setScrollbarIncrements(double inc) const;
92 double getScrollbarValue() const {
93 return fl_get_scrollbar_value(scrollbar);
96 std::pair<float, float> const getScrollbarBounds() const {
97 std::pair<float, float> p;
98 fl_get_scrollbar_bounds(scrollbar, &p.first, &p.second);
102 Pixmap getPixmap() const { return workareapixmap; }
104 static int work_area_handler(FL_OBJECT *, int event,
106 int /*key*/, void * xev);
108 static void scroll_cb(FL_OBJECT *, long);
110 string const getClipboard() const;
112 void putClipboard(string const &) const;
115 BufferView * owner() const { return owner_; }
119 Signal0<void> workAreaExpose;
121 Signal1<void, double> scrollCB;
123 Signal2<void, KeySym, unsigned int> workAreaKeyPress;
125 Signal3<void, int, int, unsigned int> workAreaButtonPress;
127 Signal3<void, int, int, unsigned int> workAreaButtonRelease;
129 Signal3<void, int, int, unsigned int> workAreaMotionNotify;
131 Signal0<void> workAreaFocus;
133 Signal0<void> workAreaUnfocus;
135 Signal0<void> workAreaEnter;
137 Signal0<void> workAreaLeave;
139 Signal3<void, int, int, unsigned int> workAreaDoubleClick;
141 Signal3<void, int, int, unsigned int> workAreaTripleClick;
144 void createPixmap(int, int);
146 FL_OBJECT * backgroundbox;
148 FL_OBJECT * work_area;
150 FL_OBJECT * scrollbar;
155 /// The pixmap overlay on the workarea
156 Pixmap workareapixmap;
160 FL_OBJECT * figinset_canvas;
161 /// if we call redraw with true needed for locking-insets