mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
6a742b7aa0
SConscript: removed qscreen.C frontends/qt4/Makefile.am: removed qscreen.C frontends/screen.h: remove workarea() constness frontends/qt3/qscreen.[Ch]: ditto frontends/gtk/GScreen.[Ch]: ditto frontends/xforms/xscreen.[Ch]: ditto frontends/qt4/LyXScreenFactory.C: now return the QWorkarea directly frontends/qt4/QWorkArea.[Ch]: inherits LyXScreen, handle the cursor painting frontends/qt4/qscreen.[Ch]: removed git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13981 a592a061-630c-0410-9148-cb99ea01b6c8
69 lines
1.3 KiB
C++
69 lines
1.3 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GScreen.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Huang Ying
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef GSCREEN_H
|
|
#define GSCREEN_H
|
|
|
|
#include "screen.h"
|
|
|
|
#include <gtkmm.h>
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
class GWorkArea;
|
|
|
|
/** The class GScreen is used for the main Textbody.
|
|
Concretely, the screen is held in a pixmap. This pixmap is kept up to
|
|
date and used to optimize drawing on the screen.
|
|
This class also handles the drawing of the cursor and partly the selection.
|
|
*/
|
|
class GScreen : public LyXScreen {
|
|
public:
|
|
///
|
|
GScreen(GWorkArea &);
|
|
|
|
///
|
|
virtual ~GScreen();
|
|
|
|
/// Sets the cursor color to LColor::cursor.
|
|
virtual void setCursorColor(Glib::RefPtr<Gdk::GC> gc);
|
|
///
|
|
virtual void removeCursor();
|
|
///
|
|
virtual void showCursor(int x, int y, int h, Cursor_Shape shape);
|
|
protected:
|
|
/// get the work area
|
|
virtual WorkArea & workarea();
|
|
|
|
/// Copies specified area of pixmap to screen
|
|
virtual void expose(int x, int y, int w, int h);
|
|
private:
|
|
/// our owning widget
|
|
GWorkArea & owner_;
|
|
|
|
///
|
|
Glib::RefPtr<Gdk::Pixmap> cursorPixmap_;
|
|
///
|
|
int cursorX_;
|
|
///
|
|
int cursorY_;
|
|
///
|
|
int cursorW_;
|
|
///
|
|
int cursorH_;
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif
|