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.
16 #include "frontends/WorkArea.h"
19 #include "lyx_forms.h"
24 class XWorkArea : public WorkArea {
27 XWorkArea(LyXView & owner, int xpos, int ypos, int width, int height);
31 virtual Painter & getPainter() { return painter_; }
33 virtual int workWidth() const { return work_area->w; }
35 virtual int workHeight() const { return work_area->h; }
37 Window getWin() const { return work_area->form->window; }
39 virtual void setScrollbarParams(int height, int pos, int line_height);
41 Pixmap getPixmap() const { return workareapixmap; }
43 static int work_area_handler(FL_OBJECT *, int event,
45 int /*key*/, void * xev);
47 /// return x position of window
48 int xpos() const { return work_area->x; }
49 /// return y position of window
50 int ypos() const { return work_area->y; }
52 /// xforms callback from scrollbar
54 /// a selection exists
55 virtual void haveSelection(bool) const;
57 virtual std::string const getClipboard() const;
59 virtual void putClipboard(std::string const &) const;
61 /// handles SelectionRequest X Event, to fill the clipboard
62 int event_cb(XEvent * xev);
64 /// generate the pixmap, and copy backing pixmap to it,
65 /// and send resize event if needed
66 void redraw(int, int);
68 /// GC used for copying to the screen
71 /// the workarea free object
72 FL_OBJECT * work_area;
73 /// the scrollbar objcet
74 FL_OBJECT * scrollbar;
75 /// The pixmap overlay on the workarea
76 Pixmap workareapixmap;
77 /// the xforms-specific painter
79 /// if we call redraw with true needed for locking-insets
81 /// the current document's height (for scrollbar)