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"
17 #include "frontends/Clipboard.h"
20 #include "LayoutEngine.h"
22 #include "lyx_forms.h"
32 XWorkArea(LyXView & owner, int width, int height);
36 virtual Painter & getPainter() { return painter_; }
38 virtual int workWidth() const { return work_area->w; }
40 virtual int workHeight() const { return work_area->h; }
42 Window getWin() const { return work_area->form->window; }
44 virtual void setScrollbarParams(int height, int pos, int line_height);
46 Pixmap getPixmap() const { return workareapixmap; }
48 static int work_area_handler(FL_OBJECT *, int event,
50 int /*key*/, void * xev);
52 /// return x position of window
53 int xpos() const { return work_area->x; }
54 /// return y position of window
55 int ypos() const { return work_area->y; }
57 /// xforms callback from scrollbar
59 /// a selection exists
60 virtual void haveSelection(bool);
62 virtual std::string const getClipboard() const;
64 virtual void putClipboard(std::string const &);
66 /// handles SelectionRequest X Event, to fill the clipboard
67 int event_cb(XEvent * xev);
71 /// generate the pixmap, and copy backing pixmap to it,
72 /// and send resize event if needed
73 void redraw(int, int);
75 /// GC used for copying to the screen
78 /// the workarea free object
79 FL_OBJECT * work_area;
80 /// the scrollbar objcet
81 FL_OBJECT * scrollbar;
82 /// The pixmap overlay on the workarea
83 Pixmap workareapixmap;
84 /// the xforms-specific painter
86 /// if we call redraw with true needed for locking-insets
88 /// the current document's height (for scrollbar)
91 boost::shared_ptr<Box> wa_box_;
96 } // namespace frontend