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 virtual void redraw() const {
38 fl_redraw_object(work_area);
39 fl_redraw_object(scrollbar);
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) const;
62 virtual string const getClipboard() const;
64 virtual void putClipboard(string const &) const;
66 /// handles SelectionRequest X Event, to fill the clipboard
67 int event_cb(XEvent * xev);
70 void createPixmap(int, int);
73 FL_OBJECT * backgroundbox;
75 FL_OBJECT * work_area;
77 FL_OBJECT * scrollbar;
79 mutable FL_OBJECT * splash_;
81 mutable FL_OBJECT * splash_text_;
82 /// The pixmap overlay on the workarea
83 Pixmap workareapixmap;
86 /// if we call redraw with true needed for locking-insets
88 /// the current document's height (for scrollbar)