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 resize(int xpos, int ypos, int width, int height);
39 virtual void redraw() const {
40 fl_redraw_object(work_area);
41 fl_redraw_object(scrollbar);
44 virtual void setFocus() const;
46 Window getWin() const { return work_area->form->window; }
48 virtual bool hasFocus() const { return work_area->focus; }
50 virtual void greyOut() const;
52 virtual void setScrollbarParams(int height, int pos, int line_height);
54 Pixmap getPixmap() const { return workareapixmap; }
56 static int work_area_handler(FL_OBJECT *, int event,
58 int /*key*/, void * xev);
60 /// return x position of window
61 int xpos() const { return work_area->x; }
62 /// return y position of window
63 int ypos() const { return work_area->y; }
65 /// xforms callback from scrollbar
67 /// a selection exists
68 virtual void haveSelection(bool) const;
70 virtual string const getClipboard() const;
72 virtual void putClipboard(string const &) const;
74 /// handles SelectionRequest X Event, to fill the clipboard
75 int event_cb(XEvent * xev);
78 void createPixmap(int, int);
81 FL_OBJECT * backgroundbox;
83 FL_OBJECT * work_area;
85 FL_OBJECT * scrollbar;
87 mutable FL_OBJECT * splash_;
89 mutable FL_OBJECT * splash_text_;
90 /// The pixmap overlay on the workarea
91 Pixmap workareapixmap;
94 /// if we call redraw with true needed for locking-insets
96 /// the current document's height (for scrollbar)
100 #endif // XWORKAREA_H