4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * \author Abdelrazak Younes
11 * Full author contact details are available in file CREDITS.
14 #ifndef BASE_WORKAREA_H
15 #define BASE_WORKAREA_H
17 #include "frontends/KeyModifier.h"
18 #include "frontends/LyXView.h"
28 * The work area class represents the widget that provides the
29 * view onto a document. It is owned by the BufferView, and
30 * is responsible for handing events back to its owning BufferView.
31 * It works in concert with the BaseScreen class to update the
32 * widget view of a document.
38 WorkArea() : lyx_view_(0) {}
40 virtual ~WorkArea() {}
42 /// redraw the screen, without using existing pixmap
43 virtual void redraw() = 0;
45 /// Process Key pressed event.
46 /// This needs to be public because it is accessed externally by GuiView.
47 virtual void processKeySym(KeySymbol const & key, KeyModifier mod) = 0;
49 /// Return the LyXView this workArea belongs to
50 LyXView const & view() const { return *lyx_view_; }
51 LyXView & view() { return *lyx_view_; }
53 /// close this work area.
54 /// Slot for Buffer::closing signal.
55 virtual void close() = 0;
56 /// This function is called when the buffer readonly status change.
57 virtual void setReadOnly(bool) = 0;
59 /// Update window titles of all users.
60 virtual void updateWindowTitle() = 0;
67 } // namespace frontend
70 #endif // BASE_WORKAREA_H