4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS
20 #include "frontends/WorkArea.h"
23 #include FORMS_H_LOCATION
26 class XWorkArea : public WorkArea {
29 XWorkArea(int xpos, int ypos, int width, int height);
33 virtual Painter & getPainter() { return painter_; }
35 virtual int workWidth() const { return work_area->w; }
37 virtual int workHeight() const { return work_area->h; }
39 Window getWin() const { return work_area->form->window; }
41 virtual void setScrollbarParams(int height, int pos, int line_height);
43 Pixmap getPixmap() const { return workareapixmap; }
45 static int work_area_handler(FL_OBJECT *, int event,
47 int /*key*/, void * xev);
49 /// return x position of window
50 int xpos() const { return work_area->x; }
51 /// return y position of window
52 int ypos() const { return work_area->y; }
54 /// xforms callback from scrollbar
56 /// a selection exists
57 virtual void haveSelection(bool) const;
59 virtual string const getClipboard() const;
61 virtual void putClipboard(string const &) const;
63 /// handles SelectionRequest X Event, to fill the clipboard
64 int event_cb(XEvent * xev);
66 /// generate the pixmap, and copy backing pixmap to it,
67 /// and send resize event if needed
68 void redraw(int, int);
70 /// GC used for copying to the screen
74 FL_OBJECT * backgroundbox;
75 /// the workarea free object
76 FL_OBJECT * work_area;
77 /// the scrollbar objcet
78 FL_OBJECT * scrollbar;
79 /// The pixmap overlay on the workarea
80 Pixmap workareapixmap;
81 /// the xforms-specific painter
83 /// if we call redraw with true needed for locking-insets
85 /// the current document's height (for scrollbar)