4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS
18 #include "QLPainter.h"
19 #include "QContentPane.h"
22 #include <qscrollbar.h>
27 * Qt-specific implementation of the work area
30 * It consists of a content pane widget, and a scrollbar.
31 * Hopefully soon we can just use QScrollView ...
33 class QWorkArea : public WorkArea, public QWidget {
35 friend class QContentPane;
37 QWorkArea(int x, int y, int w, int h);
40 /// return this widget's painter
41 virtual Painter & getPainter() { return painter_; }
42 /// return the width of the content pane
43 virtual int workWidth() const { return content_->width(); }
44 /// return the height of the content pane
45 virtual int workHeight() const { return content_->height(); }
47 virtual void setScrollbarParams(int height, int pos, int line_height);
49 /// a selection exists
50 virtual void haveSelection(bool) const;
52 virtual string const getClipboard() const;
54 virtual void putClipboard(string const &) const;
56 /// get the pixmap we paint on to
57 QPixmap * getPixmap() const { return content_->pixmap(); }
59 /// get the content pane widget
60 QWidget * getContent() const { return content_; }
63 QScrollBar * scrollbar_;
65 QContentPane * content_;