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.
17 #include "QLPainter.h"
18 #include "QContentPane.h"
20 #include <qscrollbar.h>
28 * Qt-specific implementation of the work area
31 * It consists of a content pane widget, and a scrollbar.
32 * Hopefully soon we can just use QScrollView ...
34 class QWorkArea : public WorkArea, public QWidget {
36 friend class QContentPane;
38 QWorkArea(LyXView & owner, int w, int h);
41 /// return this widget's painter
42 virtual Painter & getPainter() { return painter_; }
43 /// return the width of the content pane
44 virtual int workWidth() const { return content_->width(); }
45 /// return the height of the content pane
46 virtual int workHeight() const { return content_->height(); }
48 virtual void setScrollbarParams(int height, int pos, int line_height);
50 /// a selection exists
51 virtual void haveSelection(bool) const;
53 virtual std::string const getClipboard() const;
55 virtual void putClipboard(std::string const &) const;
57 virtual void dragEnterEvent(QDragEnterEvent * event);
59 virtual void dropEvent(QDropEvent* event);
61 /// get the pixmap we paint on to
62 QPixmap * getPixmap() const { return content_->pixmap(); }
64 /// get the content pane widget
65 QWidget * getContent() const { return content_; }
68 QScrollBar * scrollbar_;
70 QContentPane * content_;