4 * Copyright 1995-2002 the LyX Team
5 * Read the file COPYING
8 * \author John Levon <moz@compsoc.man.ac.uk>
18 #include "frontends/Painter.h"
19 #include "frontends/mouse_state.h"
20 #include "frontends/key_state.h"
21 #include "frontends/LyXKeySym.h"
23 #include <boost/signals/signal0.hpp>
24 #include <boost/signals/signal1.hpp>
25 #include <boost/signals/signal2.hpp>
26 #include <boost/signals/signal3.hpp>
36 virtual ~WorkArea() {}
38 virtual Painter & getPainter() = 0;
40 virtual int workWidth() const = 0;
42 virtual int workHeight() const = 0;
45 virtual void resize(int xpos, int ypos, int width, int height) = 0;
47 virtual void redraw() const = 0;
49 virtual void setFocus() const = 0;
51 virtual bool hasFocus() const = 0;
53 virtual void greyOut() const = 0;
55 virtual void setScrollbarParams(int height, int pos, int line_height) = 0;
57 /// a selection exists
58 virtual void haveSelection(bool) const = 0;
60 virtual string const getClipboard() const = 0;
62 virtual void putClipboard(string const &) const = 0;
65 boost::signal0<void> workAreaExpose;
67 boost::signal1<void, int> scrollDocView;
69 boost::signal2<void, LyXKeySymPtr, key_modifier::state> workAreaKeyPress;
71 boost::signal3<void, int, int, mouse_button::state> workAreaButtonPress;
73 boost::signal3<void, int, int, mouse_button::state> workAreaButtonRelease;
75 boost::signal3<void, int, int, mouse_button::state> workAreaMotionNotify;
77 boost::signal0<void> workAreaFocus;
79 boost::signal0<void> workAreaUnfocus;
81 boost::signal3<void, int, int, mouse_button::state> workAreaDoubleClick;
83 boost::signal3<void, int, int, mouse_button::state> workAreaTripleClick;
84 /// emitted when an X client has requested our selection
85 boost::signal0<void> selectionRequested;
86 /// emitted when another X client has stolen our selection
87 boost::signal0<void> selectionLost;