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.
16 #include "QLPainter.h"
17 #include "QContentPane.h"
19 #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 QWidget {
38 friend class QContentPane;
40 QWorkArea(LyXView & owner, int w, int h);
43 /// return this widget's painter
44 virtual lyx::frontend::Painter & getPainter() { return painter_; }
45 /// return the width of the content pane
46 virtual int workWidth() const { return content_->width(); }
47 /// return the height of the content pane
48 virtual int workHeight() const { return content_->height(); }
50 virtual void setScrollbarParams(int height, int pos, int line_height);
52 /// a selection exists
53 virtual void haveSelection(bool);
55 virtual std::string const getClipboard() const;
57 virtual void putClipboard(std::string const &);
59 virtual void dragEnterEvent(QDragEnterEvent * event);
61 virtual void dropEvent(QDropEvent* event);
63 /// get the pixmap we paint on to
64 QPixmap * getPixmap() const { return content_->pixmap(); }
66 /// get the content pane widget
67 QWidget * getContent() const { return content_; }
74 /// The owning LyXView
78 QScrollBar * scrollbar_;
80 QContentPane * content_;
87 } // namespace frontend