mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
ace550953a
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4435 a592a061-630c-0410-9148-cb99ea01b6c8
70 lines
1.3 KiB
C++
70 lines
1.3 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file QContentPane.h
|
|
* Copyright 1995-2002 the LyX Team
|
|
* Read the file COPYING
|
|
*
|
|
* \author John Levon <moz@compsoc.man.ac.uk>
|
|
*/
|
|
|
|
#ifndef QCONTENTPANE_H
|
|
#define QCONTENTPANE_H
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
#include <config.h>
|
|
#include <utility>
|
|
#include <boost/smart_ptr.hpp>
|
|
|
|
#include <qwidget.h>
|
|
#include <qscrollbar.h>
|
|
#include <qpixmap.h>
|
|
#include <qevent.h>
|
|
|
|
class QWorkArea;
|
|
|
|
/**
|
|
* Widget for actually drawing the document on
|
|
*/
|
|
class QContentPane : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
QContentPane(QWorkArea * parent);
|
|
|
|
/// return the backing pixmap
|
|
QPixmap * pixmap() const { return pixmap_.get(); }
|
|
|
|
protected:
|
|
/// repaint part of the widget
|
|
void paintEvent(QPaintEvent * e);
|
|
/// widget has been resized
|
|
void resizeEvent(QResizeEvent * e);
|
|
|
|
/// mouse button press
|
|
void mousePressEvent(QMouseEvent * e);
|
|
/// mouse button release
|
|
void mouseReleaseEvent(QMouseEvent * e);
|
|
/// mouse double click of button
|
|
void mouseDoubleClickEvent(QMouseEvent * e);
|
|
/// mouse motion
|
|
void mouseMoveEvent(QMouseEvent * e);
|
|
|
|
/// key press
|
|
void keyPressEvent(QKeyEvent * e);
|
|
|
|
public slots:
|
|
void scrollBarChanged(int);
|
|
|
|
private:
|
|
/// owning widget
|
|
QWorkArea * wa_;
|
|
|
|
/// the double buffered pixmap
|
|
boost::scoped_ptr<QPixmap> pixmap_;
|
|
};
|
|
|
|
#endif // QCONTENTPANE_H
|