Lumiera  0.pre.03
»edit your freedom«
controller.hpp
Go to the documentation of this file.
1 /*
2  CONTROLLER.hpp - generic interface of a sub-controller
3 
4  Copyright (C) Lumiera.org
5  2015, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
38 #ifndef STAGE_MODEL_CONTROLLER_H
39 #define STAGE_MODEL_CONTROLLER_H
40 
41 
42 #include "lib/error.hpp"
43 #include "stage/model/tangible.hpp"
44 //#include "lib/symbol.hpp"
45 //#include "lib/util.hpp"
46 
47 //#include <string>
48 
49 
50 namespace stage {
51 namespace model {
52 
53 // using lib::HashVal;
54 // using util::isnil;
55 // using std::string;
56 
57 
61  class Controller
62  : public Tangible
63  {
64 
65  /* ==== Tangible interface ==== */
66 
67  virtual bool
68  doReset() override
69  {
70  UNIMPLEMENTED ("Controller reset");
71  }
72 
73  virtual bool
74  doMsg (string text) override
75  {
76  UNIMPLEMENTED ("Controller doMsg");
77  }
78 
79  virtual bool
80  doClearMsg () override
81  {
82  UNIMPLEMENTED ("Controller doClearMsg");
83  }
84 
85  virtual bool
86  doErr (string text) override
87  {
88  UNIMPLEMENTED ("Controller doErr");
89  }
90 
91  virtual bool
92  doClearErr () override
93  {
94  UNIMPLEMENTED ("Controller doClearErr");
95  }
96 
97  virtual void
98  doFlash() override
99  {
100  UNIMPLEMENTED ("Controller doFlash");
101  }
102 
103  protected:
108  virtual void
109  doMark (GenNode const& mark) override
110  {
111  // forward to default handler
112  Tangible::doMark (mark);
113  }
114 
115 
116  public:
117  using Tangible::Tangible;
118 
119  };
120 
121 
122 
123 }} // namespace stage::model
124 #endif /*STAGE_MODEL_CONTROLLER_H*/
Abstraction: a tangible element of the User Interface.
void mark(GenNode const &)
generic handler for all incoming "state mark" messages
Definition: tangible.cpp:260
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
virtual void doMark(GenNode const &)=0
default implementation and catch-all handler for receiving »state mark« messages. ...
Definition: tangible.cpp:295
Lumiera error handling (C++ interface).
Interface common to all UI elements of relevance for the Lumiera application.
Definition: tangible.hpp:165
generic data element node within a tree
Definition: gen-node.hpp:231
virtual void doMark(GenNode const &mark) override
default handler for all generic mark messages.
Definition: controller.hpp:109