4 * Read the file COPYING
9 * Full author contact details are available in file CREDITS
19 #include "frontends/WorkArea.h"
22 #include FORMS_H_LOCATION
25 class XWorkArea : public WorkArea {
28 XWorkArea(int xpos, int ypos, int width, int height);
32 virtual Painter & getPainter() { return painter_; }
34 virtual int workWidth() const { return work_area->w; }
36 virtual int workHeight() const { return work_area->h; }
38 Window getWin() const { return work_area->form->window; }
40 virtual void setScrollbarParams(int height, int pos, int line_height);
42 Pixmap getPixmap() const { return workareapixmap; }
44 static int work_area_handler(FL_OBJECT *, int event,
46 int /*key*/, void * xev);
48 /// return x position of window
49 int xpos() const { return work_area->x; }
50 /// return y position of window
51 int ypos() const { return work_area->y; }
53 /// xforms callback from scrollbar
55 /// a selection exists
56 virtual void haveSelection(bool) const;
58 virtual string const getClipboard() const;
60 virtual void putClipboard(string const &) const;
62 /// handles SelectionRequest X Event, to fill the clipboard
63 int event_cb(XEvent * xev);
65 /// generate the pixmap, and copy backing pixmap to it,
66 /// and send resize event if needed
67 void redraw(int, int);
69 /// GC used for copying to the screen
73 FL_OBJECT * backgroundbox;
74 /// the workarea free object
75 FL_OBJECT * work_area;
76 /// the scrollbar objcet
77 FL_OBJECT * scrollbar;
78 /// The pixmap overlay on the workarea
79 Pixmap workareapixmap;
80 /// the xforms-specific painter
82 /// if we call redraw with true needed for locking-insets
84 /// the current document's height (for scrollbar)