]> git.lyx.org Git - lyx.git/blob - src/frontends/WorkArea.h
remove unneeded functions
[lyx.git] / src / frontends / WorkArea.h
1 // -*- C++ -*-
2 /**
3  * \file WorkArea.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  * \author John Levon
9  * \author Abdelrazak Younes
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef BASE_WORKAREA_H
15 #define BASE_WORKAREA_H
16
17 #include "frontends/KeyModifier.h"
18
19 namespace lyx {
20
21 class BufferView;
22 class KeySymbol;
23
24 namespace frontend {
25
26 /**
27  * The work area class represents the widget that provides the
28  * view onto a document. It is owned by the BufferView, and
29  * is responsible for handing events back to its owning BufferView.
30  * It works in concert with the BaseScreen class to update the
31  * widget view of a document.
32  */
33 class WorkArea
34 {
35 public:
36         ///
37         WorkArea() {}
38         ///
39         virtual ~WorkArea();
40
41         ///
42         virtual BufferView & bufferView() = 0;
43         ///
44         virtual BufferView const & bufferView() const = 0;
45
46         /// return true if has the keyboard input focus.
47         virtual bool hasFocus() const = 0;
48
49         /// return true if has this WorkArea is visible.
50         virtual bool isVisible() const = 0;
51
52         /// return the width of the work area in pixels
53         virtual int width() const = 0;
54
55         /// return the height of the work area in pixels
56         virtual int height() const = 0;
57
58         /**
59          * Update the scrollbar.
60          * @param height the total document height in pixels
61          * @param pos the current position in the document, in pixels
62          * @param line_height the line-scroll amount, in pixels
63          */
64         virtual void setScrollbarParams(int height, int pos, int line_height) = 0;
65
66         ///
67         virtual void scheduleRedraw() = 0;
68
69         /// redraw the screen, without using existing pixmap
70         virtual void redraw() = 0;
71         ///
72         virtual void stopBlinkingCursor() = 0;
73         virtual void startBlinkingCursor() = 0;
74
75         /// Process Key pressed event.
76         /// This needs to be public because it is accessed externally by GuiView.
77         virtual void processKeySym(KeySymbol const & key, KeyModifier mod) = 0;
78
79         /// close this work area.
80         /// Slot for Buffer::closing signal.
81         virtual void close() = 0;
82         /// This function is called when the buffer readonly status change.
83         virtual void setReadOnly(bool) = 0;
84
85         /// Update window titles of all users.
86         virtual void updateWindowTitle() = 0;
87 };
88
89 } // namespace frontend
90 } // namespace lyx
91
92 #endif // BASE_WORKAREA_H