2002-06-19 03:38:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file qscreen.h
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-06-19 03:38:44 +00:00
|
|
|
*
|
2002-09-24 13:57:09 +00:00
|
|
|
* \author John Levon
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-06-19 03:38:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QSCREEN_H
|
|
|
|
#define QSCREEN_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "screen.h"
|
|
|
|
#include <qrect.h>
|
2002-09-24 13:57:09 +00:00
|
|
|
#include <boost/scoped_ptr.hpp>
|
|
|
|
|
2003-09-05 15:06:13 +00:00
|
|
|
class QWorkArea;
|
2002-09-24 13:57:09 +00:00
|
|
|
class WorkArea;
|
|
|
|
|
|
|
|
|
2002-06-19 03:38:44 +00:00
|
|
|
/**
|
|
|
|
* Qt implementation of toolkit-specific parts of LyXScreen.
|
|
|
|
*/
|
|
|
|
class QScreen : public LyXScreen {
|
|
|
|
public:
|
|
|
|
QScreen(QWorkArea &);
|
|
|
|
|
|
|
|
virtual ~QScreen();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
/// get the work area
|
2003-09-05 15:06:13 +00:00
|
|
|
virtual WorkArea & workarea() const;
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-09-12 16:02:28 +00:00
|
|
|
/// repaint the whole content immediately
|
|
|
|
void repaint();
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-06-19 03:38:44 +00:00
|
|
|
/// copies specified area of pixmap to screen
|
2002-09-24 13:57:09 +00:00
|
|
|
virtual void expose(int x, int y, int exp_width, int exp_height);
|
2002-06-19 03:38:44 +00:00
|
|
|
|
2003-05-03 18:05:53 +00:00
|
|
|
/// paint the cursor and store the background
|
|
|
|
virtual void showCursor(int x, int y, int h, Cursor_Shape shape);
|
|
|
|
|
|
|
|
/// hide the cursor
|
|
|
|
virtual void removeCursor();
|
|
|
|
|
2002-06-19 03:38:44 +00:00
|
|
|
private:
|
|
|
|
/// our owning widget
|
|
|
|
QWorkArea & owner_;
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-06-19 03:38:44 +00:00
|
|
|
boost::scoped_ptr<QPixmap> nocursor_pixmap_;
|
|
|
|
|
2003-03-14 00:20:42 +00:00
|
|
|
//@{ the cursor pixmap position/size
|
2002-06-19 03:38:44 +00:00
|
|
|
int cursor_x_;
|
|
|
|
int cursor_y_;
|
|
|
|
int cursor_w_;
|
|
|
|
int cursor_h_;
|
2002-07-30 00:53:57 +00:00
|
|
|
//@}
|
2002-06-19 03:38:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QSCREEN_H
|