Timeline: now able to define delegating diff mutation binding
This commit is contained in:
parent
a77ecb6d5d
commit
edf577187b
4 changed files with 20 additions and 7 deletions
|
|
@ -149,7 +149,7 @@ namespace model {
|
|||
explicit
|
||||
operator bool() const
|
||||
{
|
||||
return bool(widget_);
|
||||
return bool{widget_};
|
||||
}
|
||||
|
||||
TAR&
|
||||
|
|
@ -167,6 +167,10 @@ namespace model {
|
|||
}
|
||||
|
||||
|
||||
bool isValid() const { return bool{*this}; }
|
||||
bool isActive() const { return bool{*this}; }
|
||||
|
||||
|
||||
/** detach and deactivate this link
|
||||
* @note EX_STRONG (but only under the assumption that also
|
||||
* sigc::trackable::remove_destroy_notify_cllback is EX_STRONG)
|
||||
|
|
|
|||
|
|
@ -81,8 +81,12 @@ namespace timeline {
|
|||
void
|
||||
TimelineGui::buildMutator (lib::diff::TreeMutator::Handle buffer)
|
||||
{
|
||||
if (*this)
|
||||
UNIMPLEMENTED ("actually delegate diff application to the target");
|
||||
if (this->isActive())
|
||||
operator*().buildMutator (buffer); // delegate to TimelineController
|
||||
else // else when no widget exists...
|
||||
buffer.create(
|
||||
TreeMutator::build()
|
||||
.ignoreAllChanges()); // ...consume and ignore diff
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -73,13 +73,15 @@ namespace timeline {
|
|||
UNIMPLEMENTED ("build the timeline UI");
|
||||
}
|
||||
|
||||
TimelineWidget::~TimelineWidget() { }
|
||||
|
||||
TimelineWidget::~TimelineWidget()
|
||||
|
||||
void
|
||||
TimelineWidget::buildMutator (lib::diff::TreeMutator::Handle buff)
|
||||
{
|
||||
control_->buildMutator (buff);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}}// namespace gui::timeline
|
||||
|
|
|
|||
|
|
@ -113,12 +113,15 @@ namespace timeline {
|
|||
*/
|
||||
TimelineWidget (BusTerm::ID identity, BusTerm::ID trackID, BusTerm& nexus);
|
||||
|
||||
~TimelineWidget();
|
||||
~TimelineWidget();
|
||||
|
||||
|
||||
|
||||
public: /* ===== Control interface ===== */
|
||||
|
||||
/** allow for diff mutation (delegated to TimelineController */
|
||||
void buildMutator (lib::diff::TreeMutator::Handle);
|
||||
|
||||
public: /* ===== Signals ===== */
|
||||
|
||||
private:/* ===== Events ===== */
|
||||
|
|
|
|||
Loading…
Reference in a new issue