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)
5  2015, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
29 #ifndef STAGE_MODEL_CONTROLLER_H
30 #define STAGE_MODEL_CONTROLLER_H
31 
32 
33 #include "lib/error.hpp"
34 #include "stage/model/tangible.hpp"
35 //#include "lib/symbol.hpp"
36 //#include "lib/util.hpp"
37 
38 //#include <string>
39 
40 
41 namespace stage {
42 namespace model {
43 
44 // using lib::HashVal;
45 // using util::isnil;
46 // using std::string;
47 
48 
52  class Controller
53  : public Tangible
54  {
55 
56  /* ==== Tangible interface ==== */
57 
58  virtual bool
59  doReset() override
60  {
61  UNIMPLEMENTED ("Controller reset");
62  }
63 
64  virtual bool
65  doMsg (string text) override
66  {
67  UNIMPLEMENTED ("Controller doMsg");
68  }
69 
70  virtual bool
71  doClearMsg () override
72  {
73  UNIMPLEMENTED ("Controller doClearMsg");
74  }
75 
76  virtual bool
77  doErr (string text) override
78  {
79  UNIMPLEMENTED ("Controller doErr");
80  }
81 
82  virtual bool
83  doClearErr () override
84  {
85  UNIMPLEMENTED ("Controller doClearErr");
86  }
87 
88  virtual void
89  doFlash() override
90  {
91  UNIMPLEMENTED ("Controller doFlash");
92  }
93 
94  protected:
99  virtual void
100  doMark (GenNode const& mark) override
101  {
102  // forward to default handler
103  Tangible::doMark (mark);
104  }
105 
106 
107  public:
108  using Tangible::Tangible;
109 
110  };
111 
112 
113 
114 }} // namespace stage::model
115 #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:251
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
virtual void doMark(GenNode const &)=0
default implementation and catch-all handler for receiving »state mark« messages. ...
Definition: tangible.cpp:286
Lumiera error handling (C++ interface).
Interface common to all UI elements of relevance for the Lumiera application.
Definition: tangible.hpp:156
generic data element node within a tree
Definition: gen-node.hpp:222
virtual void doMark(GenNode const &mark) override
default handler for all generic mark messages.
Definition: controller.hpp:100