4 * Copyright 1995-2002 the LyX Team
5 * Read the file COPYING
8 * \author John Levon <moz@compsoc.man.ac.uk>
18 #include "frontends/WorkArea.h"
21 #include FORMS_H_LOCATION
24 class XWorkArea : public WorkArea {
27 XWorkArea(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 string const getClipboard() const;
59 virtual void putClipboard(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
72 FL_OBJECT * backgroundbox;
73 /// the workarea free object
74 FL_OBJECT * work_area;
75 /// the scrollbar objcet
76 FL_OBJECT * scrollbar;
77 /// The pixmap overlay on the workarea
78 Pixmap workareapixmap;
79 /// the xforms-specific painter
81 /// if we call redraw with true needed for locking-insets
83 /// the current document's height (for scrollbar)