]> git.lyx.org Git - features.git/blob - src/frontends/controllers/BCView.h
Embedding: fix a few embedding bugs
[features.git] / src / frontends / controllers / BCView.h
1 // -*- C++ -*-
2 /**
3  * \file BCView.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Allan Rae
8  * \author Angus Leeming
9  * \author Baruch Even
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef BCVIEW_H
15 #define BCVIEW_H
16
17 namespace lyx {
18 namespace frontend {
19
20 class ButtonController;
21 class ButtonPolicy;
22
23
24 /** \c BCView is the View to ButtonController's Controller. It
25  *  stores the individual GUI widgets and sets their activation state
26  *  upon receipt of instructions from the controller.
27  *
28  *  It is a base class. The true, GUI, instantiations derive from it.
29  */
30 class BCView
31 {
32 public:
33         BCView(ButtonController & p) : parent(p) {}
34         virtual ~BCView() {}
35
36         //@{
37         /// Refresh the status of the Ok, Apply, Restore, Cancel buttons.
38         virtual void refresh() const = 0;
39         /// Refresh the status of any widgets in the read_only list
40         virtual void refreshReadOnly() const = 0;
41         //@}
42
43         /// A shortcut to the BP of the BC.
44         ButtonPolicy const & bp() const;
45         ButtonPolicy & bp();
46
47         ButtonController & parent;
48 };
49
50
51 } // namespace frontend
52 } // namespace lyx
53
54 #endif // BCVIEW_H