![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "stage/model/tangible.hpp"
Interface common to all UI elements of relevance for the Lumiera application.
Any non-local and tangible interface interaction will at some point pass through this foundation element, which forms the joint and attachment to the UI backbone, which is the UI-Bus. Any tangible element acquires a distinct identity and has to be formed starting from an already existing bus nexus.
NonCopyable for good reason: the UI-Bus Nexus adds a direct reference into the routing table, tied to the given Tangible's ID (identity. Consequently you must not store tangibles in STL containers, since these might re-allocate and thus change the location in memory. Definition at line 156 of file tangible.hpp.
Public Types | |
| using | ID = ctrl::BusTerm::ID |
| using | LuidH = lib::hash::LuidH |
Public Member Functions | |
| virtual | ~Tangible () |
| this is an interface | |
| operator string () const | |
| diagnostic representation. | |
| operator LuidH () const | |
| ID | getID () const |
| void | reset () |
| invoke the generic reset hook | |
| void | clearMsg () |
| invoke the hook to clear notification messages | |
| void | clearErr () |
| invoke the hook to clear error markers | |
| template<typename... ARGS> | |
| void | invoke (Symbol cmdID, ARGS &&...) |
| void | invoke (Symbol cmdID, Rec &&arguments) |
| Perform a command or action, once the execution context has been established. | |
| void | slotExpand () |
| Expand this element and remember the expanded state. | |
| void | slotCollapse () |
| Collapse or minimise this element and remember the collapsed state. | |
| void | slotReveal () |
| Cause the element to be brought into sight. | |
| void | markFlash () |
| highlight the element visually to catch the user's attention | |
| void | markMsg (string message) |
| push a notification (or warning) message to the element. | |
| void | markErr (string error) |
| push an error state tag to the element | |
| void | mark (GenNode const &) |
| generic handler for all incoming "state mark" messages | |
| void | installExpander (Expander::ProbeFun, Expander::ChangeFun) |
| Configure the (optional) functionality to expand or collapse the UI-Element. | |
| 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 changes to the opaque data structure, in accordance to the semantics of the tree diff language. | |
| template<typename... ARGS> | |
| void | invoke (Symbol cmdID, ARGS &&... args) |
| convenience shortcut to issue a command with several arguments | |
Public Member Functions inherited from DiffMutable | |
| virtual | ~DiffMutable () |
| this is an interface | |
Friends | |
| constexpr size_t | treeMutatorSize (const Tangible *) |
| override default size traits for diff application. | |
Protected Types | |
| using | Rec = lib::diff::Rec |
| using | GenNode = lib::diff::GenNode |
Protected Member Functions | |
| Tangible (ID identity, ctrl::BusTerm &nexus) | |
| virtual bool | doReset ()=0 |
| virtual bool | doClearMsg ()=0 |
| virtual bool | doClearErr ()=0 |
| virtual bool | doExpand (bool yes) |
| generic default implementation of the expand/collapse functionality. | |
| virtual void | doReveal () |
| generic default implementation of the "reveal" functionality. | |
| virtual bool | doMsg (string)=0 |
| virtual bool | doErr (string)=0 |
| virtual void | doFlash ()=0 |
| virtual void | doMark (GenNode const &)=0 |
| default implementation and catch-all handler for receiving »state mark« messages. | |
Protected Attributes | |
| ctrl::BusTerm | uiBus_ |
| Expander | expand_ |
| Revealer | reveal_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
|
inlineprotected |
Definition at line 174 of file tangible.hpp.
|
virtual |
this is an interface
Definition at line 37 of file tangible.cpp.
| using ID = ctrl::BusTerm::ID |
Definition at line 162 of file tangible.hpp.
| using LuidH = lib::hash::LuidH |
Definition at line 163 of file tangible.hpp.
|
protected |
Definition at line 165 of file tangible.hpp.
|
protected |
Definition at line 166 of file tangible.hpp.
| operator string | ( | ) | const |
diagnostic representation.
Definition at line 44 of file tangible.cpp.
References lib::meta::typeStr().
Here is the call graph for this function:
|
inline |
Definition at line 184 of file tangible.hpp.
References BusTerm::getID(), and Tangible::uiBus_.
Here is the call graph for this function:
|
inline |
Definition at line 186 of file tangible.hpp.
References BusTerm::getID(), and Tangible::uiBus_.
Here is the call graph for this function:| void reset | ( | ) |
invoke the generic reset hook
true from this doReset() hook. As a consequence, a new "reset" state mark is emitted, which causes the PresentationStateManager to discard any state previously recorded for this element. Definition at line 65 of file tangible.cpp.
References Tangible::doReset(), stage::MARK_reset, BusTerm::note(), and Tangible::uiBus_.
Referenced by BusTerm_test::captureStateMark(), Tangible::doMark(), and AbstractTangible_test::notify().
Here is the call graph for this function:
Here is the caller graph for this function:| void clearMsg | ( | ) |
invoke the hook to clear notification messages
Definition at line 98 of file tangible.cpp.
References Tangible::doClearMsg(), stage::MARK_clearMsg, BusTerm::note(), and Tangible::uiBus_.
Referenced by Tangible::doMark().
Here is the call graph for this function:
Here is the caller graph for this function:| void clearErr | ( | ) |
invoke the hook to clear error markers
true in case any actual (sticky) error state has been cleared. Again, this causes emitting of a "resetErr" state mark, which will purge any sticky error state remembered within the state manager. Definition at line 87 of file tangible.cpp.
References Tangible::doClearErr(), stage::MARK_clearErr, BusTerm::note(), and Tangible::uiBus_.
Referenced by Tangible::doMark().
Here is the call graph for this function:
Here is the caller graph for this function:| void invoke | ( | Symbol | cmdID, |
| ARGS && | ... | ||
| ) |
Referenced by BusTerm_test::commandInvocation(), AbstractTangible_test::invokeCommand(), InteractionDirector::newSequence(), InteractionDirector::newTrack(), InteractionDirector::populateContent_afterStart(), and InteractionDirector::saveSnapshot().
Here is the caller graph for this function:Perform a command or action, once the execution context has been established.
After binding (and recording) the command arguments, as supplied with the record, the command action is executed right away.
| cmdID | indicates the global command definition to be invoked |
| arguments | suitable tuple of values, to be used to outfit the prototype |
Definition at line 242 of file tangible.cpp.
References BusTerm::act(), and Tangible::uiBus_.
Here is the call graph for this function:| void slotExpand | ( | ) |
Expand this element and remember the expanded state.
This is a generic Slot to connect UI signals against.
true, the state change is deemed relevant and persistent, and thus a "state mark" is sent on the UI-Bus. Definition at line 161 of file tangible.cpp.
References Tangible::doExpand(), stage::MARK_expand, BusTerm::note(), and Tangible::uiBus_.
Referenced by BusTerm_test::attachNewBusTerm(), BusTerm_test::captureStateMark(), BusTerm_test::clearStates(), AbstractTangible_test::markState(), and AbstractTangible_test::revealer().
Here is the call graph for this function:
Here is the caller graph for this function:| void slotCollapse | ( | ) |
Collapse or minimise this element and remember the collapsed state.
This is a generic Slot to connect UI signals against.
Definition at line 173 of file tangible.cpp.
References Tangible::doExpand(), stage::MARK_expand, BusTerm::note(), and Tangible::uiBus_.
Referenced by BusTerm_test::captureStateMark(), BusTerm_test::clearStates(), and AbstractTangible_test::markState().
Here is the call graph for this function:
Here is the caller graph for this function:| void slotReveal | ( | ) |
Cause the element to be brought into sight.
This is a generic Slot to connect UI signals against; the same action can also be triggered by sending a mark message over the UI-Bus with the symbol "`reveal`".
Definition at line 213 of file tangible.cpp.
References Tangible::doReveal().
Referenced by AbstractTangible_test::revealer().
Here is the call graph for this function:
Here is the caller graph for this function:| void markFlash | ( | ) |
highlight the element visually to catch the user's attention
Definition at line 110 of file tangible.cpp.
References Tangible::doFlash().
Here is the call graph for this function:| void markMsg | ( | string | message | ) |
push a notification (or warning) message to the element.
| message | notification text |
Definition at line 130 of file tangible.cpp.
References Tangible::doMsg(), stage::MARK_Message, BusTerm::note(), and Tangible::uiBus_.
Referenced by Tangible::mark().
Here is the call graph for this function:
Here is the caller graph for this function:| void markErr | ( | string | error | ) |
push an error state tag to the element
Definition at line 141 of file tangible.cpp.
References Tangible::doErr(), stage::MARK_Error, BusTerm::note(), and Tangible::uiBus_.
Referenced by BusTerm_test::captureStateMark(), and Tangible::mark().
Here is the call graph for this function:
Here is the caller graph for this function:| void mark | ( | GenNode const & | stateMark | ) |
generic handler for all incoming "state mark" messages
Definition at line 251 of file tangible.cpp.
References GenNode::data, Tangible::doFlash(), Tangible::doMark(), DataCap::get(), BareEntryID::getSym(), GenNode::idi, stage::MARK_Error, stage::MARK_Flash, stage::MARK_Message, Tangible::markErr(), and Tangible::markMsg().
Referenced by Controller::doMark(), MockElm::doMark(), and TrackPresenter::relinkContents().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Configure the (optional) functionality to expand or collapse the UI-Element.
| detectCurrExpansionState | a lambda or function<bool()> to retrieve if the element is currently expanded |
| howto_expand_collapse | a lambda or function<void(bool)> to switch the element's expansion state |
Definition at line 273 of file tangible.hpp.
References Tangible::expand_.
Referenced by MockElm::MockElm(), and NotificationHub::NotificationHub().
Here is the caller graph for this function:
|
inline |
Configure the (optional) functionality to bring the UI-Element into sight.
| how_to_uncover_the_element | a lambda or function<void()> to actually cause the necessary actions. |
Definition at line 288 of file tangible.hpp.
References Tangible::reveal_.
Referenced by NotificationHub::NotificationHub(), and AbstractTangible_test::revealer().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in NotificationHub, Controller, Widget, and MockElm.
Referenced by Tangible::reset().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in NotificationHub, Controller, Widget, and MockElm.
Referenced by Tangible::clearMsg().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in NotificationHub, Controller, Widget, and MockElm.
Referenced by Tangible::clearErr().
Here is the caller graph for this function:
|
protectedvirtual |
generic default implementation of the expand/collapse functionality.
Based on the expand_ functor, which needs to be configured explicitly to enable this functionality.
true if the actual expansion state has been changed. Reimplemented in MockElm.
Definition at line 187 of file tangible.cpp.
References Expander::canExpand(), and Tangible::expand_.
Referenced by Tangible::doMark(), Tangible::slotCollapse(), and Tangible::slotExpand().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
generic default implementation of the "reveal" functionality.
Based on the reveal_ functor, which needs to be configured explicitly to enable this functionality.
Reimplemented in MockElm.
Definition at line 225 of file tangible.cpp.
References Revealer::canReveal(), and Tangible::reveal_.
Referenced by Tangible::doMark(), and Tangible::slotReveal().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in NotificationHub, Controller, Widget, and MockElm.
Referenced by Tangible::markMsg().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in NotificationHub, Controller, Widget, and MockElm.
Referenced by Tangible::markErr().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in NotificationHub, Controller, Widget, and MockElm.
Referenced by Tangible::mark(), and Tangible::markFlash().
Here is the caller graph for this function:
|
protectedpure virtual |
default implementation and catch-all handler for receiving »state mark« messages.
Such messages serve either to cause a presentation state effect specific to this element, or they are used to re-play a former state change to restore some specific UI state captured within a past working session. Events handled here:
bool argument calls the doExpand(bool) virtual function. It is up to the concrete element to give this a tangible meaning, e.g. a track might switch to detail view and a clip might reveal attached effects.doReset()doReveal(myID) on this parent. For instance, a clip might ask the enclosing track, which in turn might call the enclosing timeline display for help, resulting in a scroll action to bring the clip into sight. Implemented in Controller, Widget, MockElm, and NotificationHub.
Definition at line 286 of file tangible.cpp.
References Tangible::clearErr(), Tangible::clearMsg(), GenNode::data, Tangible::doExpand(), Tangible::doReveal(), DataCap::get(), BareEntryID::getSym(), GenNode::idi, stage::MARK_clearErr, stage::MARK_clearMsg, stage::MARK_expand, stage::MARK_reset, stage::MARK_reveal, BusTerm::note(), Tangible::reset(), and Tangible::uiBus_.
Referenced by Controller::doMark(), and Tangible::mark().
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
build a custom implementation of the TreeMutator interface, suitably wired to cause appropriate changes to the opaque data structure, in accordance to the semantics of the tree diff language.
| buffer | a buffer handle, which can be used to placement-construct |
Implements DiffMutable.
Implemented in NotificationHub, InteractionDirector, AssetController, MarkerWidget, RulerTrack, TimelineController, TrackPresenter, ClipPresenter, and MockElm.
|
inline |
convenience shortcut to issue a command with several arguments
Definition at line 259 of file tangible.hpp.
References BusTerm::act(), stage::model::commandMessage(), and Tangible::uiBus_.
Here is the call graph for this function:
|
protected |
Definition at line 168 of file tangible.hpp.
Referenced by TrackPresenter::buildMutator(), Tangible::clearErr(), Tangible::clearMsg(), Tangible::doMark(), Tangible::getID(), MockElm::getID(), Tangible::invoke(), Tangible::invoke(), MockElm::kill(), Tangible::markErr(), Tangible::markMsg(), Tangible::operator LuidH(), Tangible::reset(), Tangible::slotCollapse(), and Tangible::slotExpand().
|
protected |
Definition at line 170 of file tangible.hpp.
Referenced by Tangible::doExpand(), and Tangible::installExpander().
|
protected |
Definition at line 171 of file tangible.hpp.
Referenced by Tangible::doReveal(), and Tangible::installRevealer().
|
friend |
override default size traits for diff application.
Definition at line 229 of file tangible.hpp.
Inheritance diagram for Tangible:
Collaboration diagram for Tangible: