2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ======================================================*/
21 #include FORMS_H_LOCATION
29 WorkArea(BufferView *, int xpos, int ypos, int width, int height);
33 Painter & getPainter() { return painter_; }
35 unsigned int workWidth() const { return work_area->w; }
37 unsigned int width() const { return work_area->w + scrollbar->w; }
39 unsigned int height() const { return work_area->h; }
41 int xpos() const { return work_area->x; }
43 int ypos() const { return work_area->y; }
45 void resize(int xpos, int ypos, int width, int height);
48 fl_redraw_object(work_area);
49 fl_redraw_object(scrollbar);
52 void setFocus() const;
54 Window getWin() const { return work_area->form->window; }
56 bool hasFocus() const { return work_area->focus; }
58 bool active() const { return work_area->active; }
60 bool belowMouse() const;
62 bool visible() const { return work_area->form->visible; }
66 void setScrollbar(double pos, double length_fraction) const;
68 void setScrollbarValue(double y) const {
69 fl_set_scrollbar_value(scrollbar, y);
72 void setScrollbarBounds(double, double) const;
74 void setScrollbarIncrements(double inc) const;
76 double getScrollbarValue() const {
77 return fl_get_scrollbar_value(scrollbar);
80 std::pair<float, float> getScrollbarBounds() const {
81 std::pair<float, float> p;
82 fl_get_scrollbar_bounds(scrollbar, &p.first, &p.second);
86 Pixmap getPixmap() const { return workareapixmap; }
88 static int work_area_handler(FL_OBJECT *, int event,
90 int /*key*/, void * xev);
92 static void scroll_cb(FL_OBJECT *, long);
95 void createPixmap(int, int);
97 FL_OBJECT * backgroundbox;
99 FL_OBJECT * work_area;
101 FL_OBJECT * scrollbar;
104 /// The pixmap overlay on the workarea
105 Pixmap workareapixmap;
109 FL_OBJECT * figinset_canvas;