4 * Copyright 1995-2002 the LyX Team
5 * Read the file COPYING
7 * \author John Levon <moz@compsoc.man.ac.uk>
10 #ifndef QCONTENTPANE_H
11 #define QCONTENTPANE_H
19 #include <boost/smart_ptr.hpp>
22 #include <qscrollbar.h>
29 * Widget for actually drawing the document on
31 class QContentPane : public QWidget {
35 QContentPane(QWorkArea * parent);
37 /// return the backing pixmap
38 QPixmap * pixmap() const { return pixmap_.get(); }
41 /// repaint part of the widget
42 void paintEvent(QPaintEvent * e);
43 /// widget has been resized
44 void resizeEvent(QResizeEvent * e);
46 /// mouse button press
47 void mousePressEvent(QMouseEvent * e);
48 /// mouse button release
49 void mouseReleaseEvent(QMouseEvent * e);
50 /// mouse double click of button
51 void mouseDoubleClickEvent(QMouseEvent * e);
53 void mouseMoveEvent(QMouseEvent * e);
56 void keyPressEvent(QKeyEvent * e);
59 void scrollBarChanged(int);
65 /// the double buffered pixmap
66 boost::scoped_ptr<QPixmap> pixmap_;
69 #endif // QCONTENTPANE_H