#ifndef WORKAREA_H
#define WORKAREA_H
-#if (defined(Q_WS_X11) && QT_VERSION >= 0x030200)
-#define USE_INPUT_METHODS 1
-#endif
-
#ifdef emit
#undef emit
#endif
-#include "frontends/LyXView.h"
#include "frontends/WorkArea.h"
#include "QLPainter.h"
namespace lyx {
namespace frontend {
+class GuiView;
+
/// for emulating triple click
class double_click {
public:
int x;
int y;
- Qt::ButtonState state;
+ Qt::MouseButton state;
bool active;
bool operator==(QMouseEvent const & e) {
public:
- GuiWorkArea(LyXView & owner, int w, int h);
+ GuiWorkArea(int width, int height, LyXView & lyx_view);
virtual ~GuiWorkArea();
/// return the width of the content pane
QPixmap is implicitely shared so no need to pass by reference.
*/
void drawScreen(int x, int y, QPixmap pixmap);
-
- LyXView & view() { return view_; }
/// copies specified area of pixmap to screen
virtual void expose(int x, int y, int exp_width, int exp_height);
/// paint the cursor and store the background
- virtual void showCursor(int x, int y, int h, Cursor_Shape shape);
+ virtual void showCursor(int x, int y, int h, CursorShape shape);
/// hide the cursor
virtual void removeCursor();
/// key press
void keyPressEvent(QKeyEvent * e);
-#if USE_INPUT_METHODS
protected:
/// IM events
void inputMethodEvent(QInputMethodEvent * e);
-#endif
-public slots:
+public Q_SLOTS:
/// Timeout event Slot for keyboard bufferring.
/// \todo This is not used currently in the code, remove?
void adjustViewWithScrollBar(int action = 0);
private:
- ///
- LyXView & view_;
-
/// Buffer view width.
int workWidth_;
///
QColor cursor_color_;
///
- Cursor_Shape cursor_shape_;
+ CursorShape cursor_shape_;
};
} // namespace frontend