-Change
-Crossfade::restore_state (StateManager::State& state)
-{
- CrossfadeState* xfstate = dynamic_cast<CrossfadeState*> (&state);
- Change what_changed = Change (0);
-
- _in_update = true;
-
- xfstate->fade_in_memento ();
- xfstate->fade_out_memento ();
-
- if (_length != xfstate->length) {
- what_changed = Change (what_changed|LengthChanged);
- _length = xfstate->length;
- }
- if (_active != xfstate->active) {
- what_changed = Change (what_changed|ActiveChanged);
- _active = xfstate->active;
- }
- if (_position != xfstate->position) {
- what_changed = Change (what_changed|PositionChanged);
- _position = xfstate->position;
- }
-
- /* XXX what to do about notifications for these? I don't
- think (G)UI cares about them because they are
- implicit in the bounds.
- */
-
- _follow_overlap = xfstate->follow_overlap;
- _anchor_point = xfstate->anchor_point;
-
- _in_update = false;
-
- return Change (what_changed);
-}
-
-StateManager::State*
-Crossfade::state_factory (std::string why) const
-{
- CrossfadeState* state = new CrossfadeState (why);
-
- state->fade_in_memento = _fade_in.get_memento ();
- state->fade_out_memento = _fade_out.get_memento ();
- state->active = _active;
- state->length = _length;
- state->position = _position;
- state->follow_overlap = _follow_overlap;
- state->anchor_point = _anchor_point;
-
- return state;
-}
-
-UndoAction
-Crossfade::get_memento() const
-{
- return sigc::bind (mem_fun (*(const_cast<Crossfade *> (this)), &StateManager::use_state), _current_state_id);
-}
-