]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/XWorkArea.h
move splash into screen greyOut(). Still not enabled (needs grfx work)
[lyx.git] / src / frontends / xforms / XWorkArea.h
1 // -*- C++ -*-
2 /**
3  * \file XWorkArea.h
4  * Copyright 1995-2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author unknown
8  * \author John Levon <moz@compsoc.man.ac.uk>
9  */
10
11 #ifndef XWORKAREA_H
12 #define XWORKAREA_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "frontends/WorkArea.h"
19 #include "XPainter.h"
20
21 #include FORMS_H_LOCATION
22
23 ///
24 class XWorkArea : public WorkArea {
25 public:
26         ///
27         XWorkArea(int xpos, int ypos, int width, int height);
28         ///
29         ~XWorkArea();
30         ///
31         virtual Painter & getPainter() { return painter_; }
32         ///
33         virtual int workWidth() const { return work_area->w; }
34         ///
35         virtual int workHeight() const { return work_area->h; }
36         ///
37         virtual void redraw() const {
38                 //fl_redraw_object(work_area);
39                 //fl_redraw_object(scrollbar);
40         }
41         ///
42         Window getWin() const { return work_area->form->window; }
43         ///
44         virtual void setScrollbarParams(int height, int pos, int line_height);
45         ///
46         Pixmap getPixmap() const { return workareapixmap; }
47         /// xforms callback
48         static int work_area_handler(FL_OBJECT *, int event,
49                                      FL_Coord, FL_Coord,
50                                      int /*key*/, void * xev);
51  
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; }
56  
57         /// xforms callback from scrollbar
58         void scroll_cb();
59         /// a selection exists
60         virtual void haveSelection(bool) const;
61         ///
62         virtual string const getClipboard() const;
63         ///
64         virtual void putClipboard(string const &) const;
65
66         /// handles SelectionRequest X Event, to fill the clipboard
67         int event_cb(XEvent * xev);
68 private:
69         ///
70         void createPixmap(int, int);
71
72         ///
73         FL_OBJECT * backgroundbox;
74         ///
75         FL_OBJECT * work_area;
76         ///
77         FL_OBJECT * scrollbar;
78         /// The pixmap overlay on the workarea
79         Pixmap workareapixmap;
80         ///
81         XPainter painter_;
82         /// if we call redraw with true needed for locking-insets
83         bool screen_cleared;
84         /// the current document's height (for scrollbar)
85         int doc_height_;
86 };
87  
88 #endif // XWORKAREA_H