4 * Copyright 1995-2002 the LyX Team
5 * Read the file COPYING
8 * \author John Levon <moz@compsoc.man.ac.uk>
21 #include "QLPainter.h"
22 #include "QContentPane.h"
25 #include <qscrollbar.h>
30 * Qt-specific implementation of the work area
33 * It consists of a content pane widget, and a scrollbar.
34 * Hopefully soon we can just use QScrollView ...
36 class QWorkArea : public WorkArea, public QWidget {
38 friend class QContentPane;
42 QWorkArea(int x, int y, int w, int h);
45 virtual void greyOut() const { }
48 /// return this widget's painter
49 virtual Painter & getPainter() { return painter_; }
50 /// return the width of the content pane
51 virtual int workWidth() const { return content_->width(); }
52 /// return the height of the content pane
53 virtual int workHeight() const { return content_->height(); }
54 /// resize this widget
55 virtual void resize(int xpos, int ypos, int width, int height);
56 /// FIXME: makes no sense ?
57 virtual void redraw() const { }
58 /// set focus to this widget
59 virtual void setFocus() const { /* FIXME */ }
60 /// does this widget have the focus ?
61 virtual bool hasFocus() const { /* FIXME */ return true; }
63 virtual void setScrollbarParams(int height, int pos, int line_height);
65 /// a selection exists
66 virtual void haveSelection(bool) const;
68 virtual string const getClipboard() const;
70 virtual void putClipboard(string const &) const;
72 /// get the pixmap we paint on to
73 QPixmap * getPixmap() const { return content_->pixmap(); }
75 /// get the content pane widget
76 QWidget * getContent() const { return content_; }
80 QScrollBar * scrollbar_;
82 QContentPane * content_;