129 #ifndef STAGE_MODEL_TANGIBLE_H 130 #define STAGE_MODEL_TANGIBLE_H 141 #include <sigc++/trackable.h> 166 :
public sigc::trackable
171 using ID = ctrl::BusTerm::ID;
184 : uiBus_{nexus.
attach(identity, *
this)}
192 operator string()
const;
193 operator LuidH()
const {
return uiBus_.getID().getHash(); }
195 ID getID()
const {
return uiBus_.getID();}
201 template<
typename...ARGS>
202 void invoke (
Symbol cmdID, ARGS&&...);
203 void invoke (
Symbol cmdID,
Rec&& arguments);
218 virtual bool doReset() =0;
219 virtual bool doClearMsg() =0;
220 virtual bool doClearErr() =0;
224 virtual bool doMsg (
string) =0;
225 virtual bool doErr (
string) =0;
226 virtual void doFlash() =0;
237 friend constexpr
size_t 249 template<
typename...ARGS>
255 using GenNodeIL = std::initializer_list<GenNode>;
259 Rec(Rec::TYPE_NIL_SYM
261 ,GenNodeIL {std::forward<ARGS> (args)...}));
266 template<
typename...ARGS>
268 Tangible::invoke (
Symbol cmdID, ARGS&&... args)
283 Expander::ChangeFun howto_expand_collapse)
285 expand_ =
Expander{move (detectCurrExpansionState), move (howto_expand_collapse)};
299 reveal_ =
Revealer{move (how_to_uncover_the_element)};
Abstraction or descriptor interface for a data structure exposing the ability for mutation by receivi...
virtual ~Tangible()
this is an interface
friend constexpr size_t treeMutatorSize(const Tangible *)
override default size traits for diff application.
void slotExpand()
Expand this element and remember the expanded state.
connection point at the UI-Bus.
void installRevealer(Revealer::RevealeItFun)
Configure the (optional) functionality to bring the UI-Element into sight.
virtual void buildMutator(lib::diff::TreeMutator::Handle)=0
build a custom implementation of the TreeMutator interface, suitably wired to cause appropriate chang...
void reset()
invoke the generic reset hook
Any copy and copy construction prohibited.
void mark(GenNode const &)
generic handler for all incoming "state mark" messages
Helper components to implement some standard UI-element actions by installing a functor.
Functor component to support the default implementation of revealing an UI-Element.
virtual bool doExpand(bool yes)
generic default implementation of the expand/collapse functionality.
Attachment point to the UI-Bus.
void clearMsg()
invoke the hook to clear notification messages
Token or Atom with distinct identity.
BusTerm attach(ID, Tangible &newNode)
Builder function: establish and wire a new BusTerm.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
void markMsg(string message)
push a notification (or warning) message to the element.
A handle to allow for safe »remote implantation« of an unknown subclass into a given opaque InPlaceBu...
void markFlash()
highlight the element visually to catch the user's attention
Marker types to indicate a literal string and a Symbol.
void markErr(string error)
push an error state tag to the element
Lumiera GTK UI implementation root.
virtual void doMark(GenNode const &)=0
default implementation and catch-all handler for receiving »state mark« messages. ...
lib::diff::GenNode commandMessage(Symbol cmdID, ARGS &&... args)
convenience shortcut to build a message suitable for command invocation
virtual void doReveal()
generic default implementation of the "reveal" functionality.
void slotCollapse()
Collapse or minimise this element and remember the collapsed state.
void installExpander(Expander::ProbeFun, Expander::ChangeFun)
Configure the (optional) functionality to expand or collapse the UI-Element.
Lumiera error handling (C++ interface).
Hash implementation based on a lumiera unique object id (LUID) When invoking the default ctor...
Functor component to support the default implementation of expanding/collapsing.
Bare symbolic and hash ID used for accounting of asset like entries.
Interface common to all UI elements of relevance for the Lumiera application.
void clearErr()
invoke the hook to clear error markers
object-like record of data.
virtual void act(GenNode const &command)
prepare or trigger invocation of a command.
generic data element node within a tree
Marker or capability interface: an otherwise not further disclosed data structure, which can be transformed through "tree diff messages".
void slotReveal()
Cause the element to be brought into sight.