Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/time/control.hpp"
Frontend/Interface: controller-element to retrieve and change running time values.
time::Control is a mediator element, which can be attached to some time value entities as mutation, and at the same time allows to register listeners. When configured this way, changes may be fed to the function operator(s). These changes will be imposed to the connected target and the result propagated to the listeners.
Definition at line 134 of file control.hpp.
Public Member Functions | |
template<class SIG > | |
void | connectChangeNotification (SIG const &toNotify) |
install a callback functor to be invoked as notification for any changes imposed onto the observed time entity. More... | |
void | disconnect () |
disconnect from observed entity and cease any change notification | |
void | operator() (TI const &) const |
impose a new value to the connected target. More... | |
void | operator() (Offset const &) const |
impose an offset to the connected target. More... | |
void | operator() (int) const |
nudge the connected target by the given offset steps, using either the target's own grid (when quantised), or a 'natural' nudge grid More... | |
Private Member Functions | |
virtual void | change (Duration &) const |
virtual void | change (TimeSpan &) const |
virtual void | change (QuTime &) const |
Private Attributes | |
mutation::Propagator< TI > | notifyListeners_ |
Additional Inherited Members | |
Static Public Member Functions inherited from Mutation | |
static EncapsulatedMutation | adjust (Offset) |
Convenience factory: simple Mutation to adjust the duration or length of a timespan. More... | |
static EncapsulatedMutation | changeDuration (Duration) |
Convenience factory: simple Mutation to adjust the duration or length of a timespan. More... | |
static EncapsulatedMutation | changeTime (Time) |
Convenience factory to yield a simple Mutation changing the absolute start time. More... | |
static EncapsulatedMutation | materialise (QuTime const &) |
Convenience factory: materialise the given quantised time into an explicit fixed internal time value, according to the underlying time grid; impose the resulting value then as new time point or start point to the target. More... | |
static EncapsulatedMutation | nudge (int adjustment) |
build a time mutation to nudge the target time value by an offset, defined as number of steps on an implicit nudge grid. More... | |
static EncapsulatedMutation | nudge (int adjustment, Symbol gridID) |
build a time mutation to nudge the target time value in steps based on a pre-defined grid. More... | |
Protected Member Functions inherited from Mutator< TI > | |
template<class TAR > | |
void | bind_to (TAR &target) const |
void | ensure_isArmed () const |
void | unbind () |
Static Protected Member Functions inherited from Mutation | |
static TimeValue & | imposeChange (TimeValue &, TimeValue const &) |
static TimeValue & | imposeChange (TimeValue &, Offset const &) |
static TimeValue & | imposeChange (TimeValue &, int) |
static TimeValue & | imposeChange (QuTime &, int) |
Protected Attributes inherited from Mutator< TI > | |
Nudger | nudge_ |
Ofsetter | offset_ |
ValueSetter | setVal_ |
void operator() | ( | TI const & | newValue | ) | const |
impose a new value to the connected target.
If applicable, the target will afterwards reflect that change, and listeners will be notified, passing the target's new state.
error::State | if not connected to a target |
Definition at line 177 of file control.hpp.
void operator() | ( | Offset const & | adjustment | ) | const |
impose an offset to the connected target.
If applicable, the target will be adjusted by the time offset, and listeners will be notified.
error::State | if not connected to a target |
Definition at line 191 of file control.hpp.
void operator() | ( | int | offset_by_steps | ) | const |
nudge the connected target by the given offset steps, using either the target's own grid (when quantised), or a 'natural' nudge grid
error::State | if not connected to a target |
Definition at line 205 of file control.hpp.
void connectChangeNotification | ( | SIG const & | toNotify | ) |
install a callback functor to be invoked as notification for any changes imposed onto the observed time entity.
toNotify | object with operator()(TI const&) |
Definition at line 224 of file control.hpp.
Referenced by TimelineState::setPlaybackPoint().