Lumiera  0.pre.03
»edityourfreedom«
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 GUI_MODEL_CONTROLLER_H
39 #define GUI_MODEL_CONTROLLER_H
40 
41 
42 #include "lib/error.hpp"
43 #include "gui/model/tangible.hpp"
44 //#include "lib/symbol.hpp"
45 //#include "lib/util.hpp"
46 
47 //#include <string>
48 
49 
50 namespace gui {
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 
107  virtual void
108  doMark (GenNode const& mark) override
109  {
110  // forward to default handler
111  Tangible::doMark (mark);
112  }
113 
114 
115  public:
116  using Tangible::Tangible;
117 
118  };
119 
120 
121 
122 }} // namespace gui::model
123 #endif /*GUI_MODEL_CONTROLLER_H*/
virtual bool doClearErr() override
Definition: controller.hpp:92
Abstraction: a tangible element of the User Interface.
void mark(GenNode const &)
generic handler for all incoming "state mark" messages
Definition: tangible.cpp:246
virtual bool doClearMsg() override
Definition: controller.hpp:80
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:47
virtual bool doReset() override
Definition: controller.hpp:68
virtual void doMark(GenNode const &)=0
default implementation and catch-all handler for receiving »state mark« messages. ...
Definition: tangible.cpp:281
virtual bool doErr(string text) override
Definition: controller.hpp:86
virtual void doMark(GenNode const &mark) override
default handler for all generic mark messages.
Definition: controller.hpp:108
virtual bool doMsg(string text) override
Definition: controller.hpp:74
virtual void doFlash() override
Definition: controller.hpp:98
Lumiera error handling (C++ interface).
Interface common to all UI elements of relevance for the Lumiera application.
Definition: tangible.hpp:165
Tangible(ID identity, ctrl::BusTerm &nexus)
Definition: tangible.hpp:183
generic data element node within a tree
Definition: gen-node.hpp:213