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);
45 /// keyboard focus in this widget
46 void focusInEvent(QFocusEvent * e);
47 /// keyboard focus lost
48 void focusOutEvent(QFocusEvent * e);
50 /// mouse button press
51 void mousePressEvent(QMouseEvent * e);
52 /// mouse button release
53 void mouseReleaseEvent(QMouseEvent * e);
54 /// mouse double click of button
55 void mouseDoubleClickEvent(QMouseEvent * e);
57 void mouseMoveEvent(QMouseEvent * e);
60 void keyPressEvent(QKeyEvent * e);
63 void scrollBarChanged(int);
69 /// the double buffered pixmap
70 boost::scoped_ptr<QPixmap> pixmap_;
73 #endif // QCONTENTPANE_H