120 #ifndef STAGE_MODEL_TANGIBLE_H 121 #define STAGE_MODEL_TANGIBLE_H 132 #include <sigc++/trackable.h> 157 :
public sigc::trackable
162 using ID = ctrl::BusTerm::ID;
175 : uiBus_{nexus.
attach(identity, *
this)}
183 operator string()
const;
184 operator LuidH()
const {
return uiBus_.getID().getHash(); }
186 ID getID()
const {
return uiBus_.getID();}
192 template<
typename...ARGS>
193 void invoke (
Symbol cmdID, ARGS&&...);
194 void invoke (
Symbol cmdID,
Rec&& arguments);
209 virtual bool doReset() =0;
210 virtual bool doClearMsg() =0;
211 virtual bool doClearErr() =0;
215 virtual bool doMsg (
string) =0;
216 virtual bool doErr (
string) =0;
217 virtual void doFlash() =0;
228 friend constexpr
size_t 240 template<
typename...ARGS>
246 using GenNodeIL = std::initializer_list<GenNode>;
250 Rec(Rec::TYPE_NIL_SYM
252 ,GenNodeIL {std::forward<ARGS> (args)...}));
257 template<
typename...ARGS>
259 Tangible::invoke (
Symbol cmdID, ARGS&&... args)
274 Expander::ChangeFun howto_expand_collapse)
276 expand_ =
Expander{move (detectCurrExpansionState), move (howto_expand_collapse)};
290 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.