LibreOffice Module slideshow (master) 1
|
This interface extends AnimationNode with some file-private accessor methods. More...
#include <basenode.hxx>
Classes | |
class | StateTransition |
state transition handling More... | |
Public Member Functions | |
BaseNode (css::uno::Reference< css::animations::XAnimationNode > const &xNode, BaseContainerNodeSharedPtr pParent, NodeContext const &rContext) | |
BaseNode (const BaseNode &)=delete | |
BaseNode & | operator= (const BaseNode &)=delete |
void | setSelf (const BaseNodeSharedPtr &rSelf) |
Provide the node with a shared_ptr to itself. More... | |
virtual void | showState () const |
virtual const char * | getDescription () const |
const ::std::shared_ptr< BaseContainerNode > & | getParentNode () const |
virtual void | dispose () override |
Dispose all object references. More... | |
virtual bool | init () override |
Init this node. More... | |
virtual bool | resolve () override |
Resolve node start time. More... | |
virtual void | activate () override |
Immediately start this node. More... | |
virtual void | deactivate () override |
Immediately stop this node. More... | |
virtual void | end () override |
End the animation on this node. More... | |
virtual css::uno::Reference< css::animations::XAnimationNode > | getXAnimationNode () const override |
Query the corresponding XAnimationNode. More... | |
virtual NodeState | getState () const override |
Query node state. More... | |
virtual bool | registerDeactivatingListener (const AnimationNodeSharedPtr &rNotifee) override |
Register a deactivating listener. More... | |
virtual void | notifyDeactivating (const AnimationNodeSharedPtr &rNotifier) override |
Called to notify another AnimationNode's deactivation. More... | |
bool | isMainSequenceRootNode () const |
sal_Int16 | getFillMode () |
Get the node's fill mode. More... | |
virtual void | removeEffect () override |
Called by the container to remove the animation effect to make the painted shape correct if it restart because of repeat or rewind ( fill mode is AnimationFill::REMOVE ) to start state. More... | |
Public Member Functions inherited from slideshow::internal::AnimationNode | |
virtual css::uno::Reference< css::animations::XAnimationNode > | getXAnimationNode () const =0 |
Query the corresponding XAnimationNode. More... | |
virtual bool | init ()=0 |
Init this node. More... | |
virtual bool | resolve ()=0 |
Resolve node start time. More... | |
virtual void | activate ()=0 |
Immediately start this node. More... | |
virtual void | deactivate ()=0 |
Immediately stop this node. More... | |
virtual void | end ()=0 |
End the animation on this node. More... | |
virtual NodeState | getState () const =0 |
Query node state. More... | |
virtual bool | registerDeactivatingListener (const AnimationNodeSharedPtr &rNotifee)=0 |
Register a deactivating listener. More... | |
virtual void | notifyDeactivating (const AnimationNodeSharedPtr &rNotifier)=0 |
Called to notify another AnimationNode's deactivation. More... | |
virtual void | removeEffect ()=0 |
Called by the container to remove the animation effect to make the painted shape correct if it restart because of repeat or rewind ( fill mode is AnimationFill::REMOVE ) to start state. More... | |
virtual bool | hasPendingAnimation () const =0 |
Query node whether it has an animation pending. More... | |
Public Member Functions inherited from slideshow::internal::Disposable | |
virtual | ~Disposable () |
virtual void | dispose ()=0 |
Dispose all object references. More... | |
Protected Member Functions | |
void | scheduleDeactivationEvent (EventSharedPtr const &pEvent=EventSharedPtr()) |
SlideShowContext const & | getContext () const |
::std::shared_ptr< BaseNode > const & | getSelf () const |
bool | checkValidNode () const |
Private Member Functions | |
virtual bool | init_st () |
virtual bool | resolve_st () |
virtual void | activate_st () |
virtual void | deactivate_st (NodeState eDestState) |
void | notifyEndListeners () const |
notifies More... | |
sal_Int16 | getRestartMode () |
Get the node's restart mode. More... | |
sal_Int16 | getRestartDefaultMode () const |
Get the default restart mode. More... | |
sal_Int16 | getFillDefaultMode () const |
Get the default fill mode. More... | |
bool | isTransition (NodeState eFromState, NodeState eToState, bool debugAssert=true) const |
bool | inStateOrTransition (int mask) const |
Private Attributes | |
SlideShowContext | maContext |
::std::vector< AnimationNodeSharedPtr > | maDeactivatingListeners |
css::uno::Reference< css::animations::XAnimationNode > | mxAnimationNode |
::std::shared_ptr< BaseContainerNode > | mpParent |
::std::shared_ptr< BaseNode > | mpSelf |
const int * | mpStateTransitionTable |
const double | mnStartDelay |
NodeState | meCurrState |
int | meCurrentStateTransition |
EventSharedPtr | mpCurrentEvent |
const bool | mbIsMainSequenceRootNode |
Friends | |
class | StateTransition |
Additional Inherited Members | |
Public Types inherited from slideshow::internal::AnimationNode | |
enum | NodeState { INVALID = 0 , UNRESOLVED = 1 , RESOLVED = 2 , ACTIVE = 4 , FROZEN = 8 , ENDED = 16 } |
The current state of this AnimationNode. More... | |
This interface extends AnimationNode with some file-private accessor methods.
Definition at line 81 of file basenode.hxx.
slideshow::internal::BaseNode::BaseNode | ( | css::uno::Reference< css::animations::XAnimationNode > const & | xNode, |
BaseContainerNodeSharedPtr | pParent, | ||
NodeContext const & | rContext | ||
) |
|
delete |
|
overridevirtual |
Immediately start this node.
This method starts the animation on this node, without begin timeout. The node will change its state to ACTIVE.
Implements slideshow::internal::AnimationNode.
Definition at line 494 of file basenode.cxx.
References activate_st(), slideshow::internal::AnimationNode::ACTIVE, checkValidNode(), slideshow::internal::BaseNode::StateTransition::commit(), slideshow::internal::BaseNode::StateTransition::enter(), inStateOrTransition(), maContext, meCurrState, mpSelf, slideshow::internal::SlideShowContext::mrEventMultiplexer, and slideshow::internal::EventMultiplexer::notifyAnimationStart().
|
privatevirtual |
Reimplemented in slideshow::internal::AnimationAudioNode, slideshow::internal::AnimationBaseNode, slideshow::internal::AnimationCommandNode, slideshow::internal::ParallelTimeContainer, slideshow::internal::SequentialTimeContainer, and slideshow::internal::BaseContainerNode.
Definition at line 514 of file basenode.cxx.
References scheduleDeactivationEvent().
Referenced by activate().
|
inlineprotected |
Definition at line 138 of file basenode.hxx.
References ENSURE_OR_THROW, slideshow::internal::AnimationNode::INVALID, meCurrState, and mpSelf.
Referenced by activate(), slideshow::internal::BaseContainerNode::appendChildNode(), deactivate(), end(), init(), registerDeactivatingListener(), and resolve().
|
overridevirtual |
Immediately stop this node.
This method stops the animation on this node. The node will change its state to either ENDED or FROZEN, depending on XAnimationNode attributes.
Implements slideshow::internal::AnimationNode.
Definition at line 564 of file basenode.cxx.
References checkValidNode(), slideshow::internal::BaseNode::StateTransition::commit(), deactivate_st(), end(), slideshow::internal::AnimationNode::ENDED, slideshow::internal::BaseNode::StateTransition::enter(), slideshow::internal::BaseNode::StateTransition::FORCE, slideshow::internal::AnimationNode::FROZEN, inStateOrTransition(), isTransition(), meCurrState, mpCurrentEvent, and notifyEndListeners().
Referenced by slideshow::internal::AnimationAudioNode::handleAnimationEvent(), slideshow::internal::BaseContainerNode::notifyDeactivatedChild(), and slideshow::internal::SequentialTimeContainer::notifyDeactivating().
|
privatevirtual |
Reimplemented in slideshow::internal::AnimationAudioNode, slideshow::internal::AnimationBaseNode, and slideshow::internal::BaseContainerNode.
Definition at line 593 of file basenode.cxx.
Referenced by deactivate(), and end().
|
overridevirtual |
Dispose all object references.
An implementor of this method must first call dispose() on any of its external references, and release them after that.
Implements slideshow::internal::Disposable.
Reimplemented in slideshow::internal::AnimationAudioNode, slideshow::internal::AnimationBaseNode, slideshow::internal::AnimationCommandNode, slideshow::internal::AnimationPathMotionNode, slideshow::internal::AnimationPhysicsNode, slideshow::internal::AnimationTransformNode, slideshow::internal::AnimationTransitionFilterNode, slideshow::internal::SequentialTimeContainer, and slideshow::internal::BaseContainerNode.
Definition at line 339 of file basenode.cxx.
References slideshow::internal::SlideShowContext::dispose(), slideshow::internal::AnimationNode::INVALID, maContext, maDeactivatingListeners, meCurrState, mpCurrentEvent, mpParent, mpSelf, and mxAnimationNode.
Referenced by slideshow::internal::AnimationAudioNode::dispose(), slideshow::internal::AnimationBaseNode::dispose(), slideshow::internal::AnimationCommandNode::dispose(), and slideshow::internal::BaseContainerNode::dispose().
|
overridevirtual |
End the animation on this node.
This method force-ends animation on this node. Parents may call this for their children, if their active duration ends. An ended animation will no longer have any effect on the shape attributes. The node will change its state to ENDED.
Implements slideshow::internal::AnimationNode.
Definition at line 597 of file basenode.cxx.
References checkValidNode(), slideshow::internal::BaseNode::StateTransition::commit(), deactivate_st(), slideshow::internal::AnimationNode::ENDED, slideshow::internal::BaseNode::StateTransition::enter(), slideshow::internal::BaseNode::StateTransition::FORCE, slideshow::internal::AnimationNode::FROZEN, inStateOrTransition(), isTransition(), meCurrState, mpCurrentEvent, and notifyEndListeners().
Referenced by deactivate().
|
inlineprotected |
Definition at line 135 of file basenode.hxx.
References maContext.
Referenced by slideshow::internal::AnimationAudioNode::activate_st(), slideshow::internal::AnimationCommandNode::activate_st(), slideshow::internal::AnimationAudioNode::AnimationAudioNode(), slideshow::internal::AnimationBaseNode::AnimationBaseNode(), slideshow::internal::AnimationCommandNode::AnimationCommandNode(), slideshow::internal::AnimationColorNode::createActivity(), slideshow::internal::AnimationPathMotionNode::createActivity(), slideshow::internal::AnimationPhysicsNode::createActivity(), slideshow::internal::AnimationSetNode::createActivity(), slideshow::internal::AnimationTransformNode::createActivity(), slideshow::internal::AnimationTransitionFilterNode::createActivity(), slideshow::internal::PropertyAnimationNode::createActivity(), slideshow::internal::AnimationAudioNode::createPlayer(), slideshow::internal::AnimationAudioNode::deactivate_st(), slideshow::internal::AnimationBaseNode::deactivate_st(), slideshow::internal::AnimationBaseNode::enqueueActivity(), slideshow::internal::AnimationPhysicsNode::enqueueActivity(), slideshow::internal::AnimationBaseNode::fillCommonParameters(), slideshow::internal::BaseContainerNode::notifyDeactivatedChild(), slideshow::internal::AnimationBaseNode::removeEffect(), slideshow::internal::SequentialTimeContainer::resolveChild(), and slideshow::internal::SequentialTimeContainer::skipEffect().
|
virtual |
Reimplemented in slideshow::internal::AnimationTransitionFilterNode, slideshow::internal::AnimationColorNode, slideshow::internal::AnimationPathMotionNode, slideshow::internal::AnimationPhysicsNode, slideshow::internal::AnimationSetNode, slideshow::internal::AnimationTransformNode, slideshow::internal::ParallelTimeContainer, slideshow::internal::PropertyAnimationNode, slideshow::internal::SequentialTimeContainer, and slideshow::internal::BaseContainerNode.
Definition at line 743 of file basenode.cxx.
Referenced by showState().
|
private |
Get the default fill mode.
If this node's default mode is AnimationFill::DEFAULT, this method recursively calls the parent node.
Definition at line 386 of file basenode.cxx.
References mpParent, and mxAnimationNode.
Referenced by getFillMode().
sal_Int16 slideshow::internal::BaseNode::getFillMode | ( | ) |
Get the node's fill mode.
Definition at line 363 of file basenode.cxx.
References getFillDefaultMode(), slideshow::internal::isIndefiniteTiming(), and mxAnimationNode.
Referenced by slideshow::internal::BaseContainerNode::notifyDeactivatedChild().
|
inline |
Definition at line 106 of file basenode.hxx.
References mpParent.
|
private |
Get the default restart mode.
If this node's default mode is AnimationRestart::DEFAULT, this method recursively calls the parent node.
Definition at line 397 of file basenode.cxx.
References mpParent, and mxAnimationNode.
Referenced by getRestartMode().
|
private |
Get the node's restart mode.
Definition at line 356 of file basenode.cxx.
References getRestartDefaultMode(), and mxAnimationNode.
|
inlineprotected |
Definition at line 136 of file basenode.hxx.
References mpSelf.
Referenced by slideshow::internal::AnimationAudioNode::activate_st(), slideshow::internal::AnimationCommandNode::activate_st(), slideshow::internal::ParallelTimeContainer::activate_st(), slideshow::internal::SequentialTimeContainer::activate_st(), slideshow::internal::BaseContainerNode::appendChildNode(), slideshow::internal::AnimationAudioNode::checkPlayingStatus(), slideshow::internal::AnimationSetNode::createActivity(), slideshow::internal::AnimationAudioNode::deactivate_st(), slideshow::internal::AnimationBaseNode::fillCommonParameters(), and slideshow::internal::SequentialTimeContainer::resolveChild().
|
overridevirtual |
Query node state.
Implements slideshow::internal::AnimationNode.
Definition at line 655 of file basenode.cxx.
References meCurrState.
Referenced by slideshow::internal::BaseContainerNode::notifyDeactivatedChild(), slideshow::internal::BaseContainerNode::repeat(), and showState().
|
overridevirtual |
Query the corresponding XAnimationNode.
Implements slideshow::internal::AnimationNode.
Definition at line 408 of file basenode.cxx.
References mxAnimationNode.
Referenced by slideshow::internal::AnimationAudioNode::activate_st(), and slideshow::internal::BaseContainerNode::init_st().
|
overridevirtual |
Init this node.
If this node is not in state INVALID, init() sets up the node state and schedules necessary events. If this node has children, they have their init() called, too. You will call this method whenever a slide is going to be shown.
Implements slideshow::internal::AnimationNode.
Definition at line 413 of file basenode.cxx.
References checkValidNode(), init_st(), meCurrState, mpCurrentEvent, and slideshow::internal::AnimationNode::UNRESOLVED.
|
privatevirtual |
Reimplemented in slideshow::internal::AnimationBaseNode, and slideshow::internal::BaseContainerNode.
Definition at line 426 of file basenode.cxx.
Referenced by init().
|
inlineprivate |
Definition at line 185 of file basenode.hxx.
References meCurrentStateTransition, and meCurrState.
Referenced by activate(), deactivate(), end(), and resolve().
|
inline |
Definition at line 125 of file basenode.hxx.
References mbIsMainSequenceRootNode.
Referenced by notifyEndListeners(), and slideshow::internal::SequentialTimeContainer::resolveChild().
|
inlineprivate |
Definition at line 178 of file basenode.hxx.
References mpStateTransitionTable.
Referenced by deactivate(), end(), slideshow::internal::BaseNode::StateTransition::enter(), and resolve().
|
overridevirtual |
Called to notify another AnimationNode's deactivation.
rNotifier | The instance who calls this method. |
Implements slideshow::internal::AnimationNode.
Reimplemented in slideshow::internal::ParallelTimeContainer, slideshow::internal::SequentialTimeContainer, and slideshow::internal::BaseContainerNode.
Definition at line 627 of file basenode.cxx.
References slideshow::internal::AnimationNode::ENDED, and slideshow::internal::AnimationNode::FROZEN.
|
private |
notifies
Definition at line 634 of file basenode.cxx.
References isMainSequenceRootNode(), maContext, maDeactivatingListeners, mpSelf, slideshow::internal::SlideShowContext::mrEventMultiplexer, slideshow::internal::EventMultiplexer::notifyAnimationEnd(), and slideshow::internal::EventMultiplexer::notifySlideAnimationsEnd().
Referenced by deactivate(), and end().
|
overridevirtual |
Register a deactivating listener.
This method registers another AnimationNode as an deactivating listener, which gets notified via a notifyDeactivating() call. The node calls all registered listener, when it leaves the ACTIVE state.
rNotifee | AnimationNode to notify |
Implements slideshow::internal::AnimationNode.
Definition at line 660 of file basenode.cxx.
References checkValidNode(), ENSURE_OR_RETURN_FALSE, and maDeactivatingListeners.
|
inlineoverridevirtual |
Called by the container to remove the animation effect to make the painted shape correct if it restart because of repeat or rewind ( fill mode is AnimationFill::REMOVE ) to start state.
Implements slideshow::internal::AnimationNode.
Reimplemented in slideshow::internal::AnimationBaseNode.
Definition at line 130 of file basenode.hxx.
|
overridevirtual |
Resolve node start time.
Nodes can have unresolved start times, i.e. indefinite start time for container nodes, or child nodes whose parent has not yet started. Calling this method fixes the node's start time. This does not mean that this node immediately starts its animations, that is only the case for begin=0.0. The node will change its state to RESOLVED.
Implements slideshow::internal::AnimationNode.
Definition at line 431 of file basenode.cxx.
References slideshow::internal::AnimationNode::ACTIVE, slideshow::internal::EventQueue::addEvent(), checkValidNode(), slideshow::internal::BaseNode::StateTransition::commit(), slideshow::internal::BaseNode::StateTransition::enter(), slideshow::internal::generateEvent(), uno::Any::hasValue(), inStateOrTransition(), isTransition(), maContext, makeDelay, meCurrState, mnStartDelay, mpCurrentEvent, mpSelf, slideshow::internal::SlideShowContext::mrEventQueue, mxAnimationNode, resolve_st(), and slideshow::internal::AnimationNode::RESOLVED.
|
privatevirtual |
Reimplemented in slideshow::internal::AnimationBaseNode.
Definition at line 488 of file basenode.cxx.
Referenced by resolve().
|
protected |
Definition at line 519 of file basenode.cxx.
References slideshow::internal::EventQueue::addEvent(), slideshow::internal::generateEvent(), maContext, mpCurrentEvent, mpSelf, slideshow::internal::SlideShowContext::mrEventQueue, and mxAnimationNode.
Referenced by activate_st(), slideshow::internal::AnimationAudioNode::activate_st(), slideshow::internal::AnimationBaseNode::activate_st(), slideshow::internal::AnimationCommandNode::activate_st(), slideshow::internal::ParallelTimeContainer::activate_st(), slideshow::internal::SequentialTimeContainer::activate_st(), and slideshow::internal::AnimationAudioNode::checkPlayingStatus().
void slideshow::internal::BaseNode::setSelf | ( | const BaseNodeSharedPtr & | rSelf | ) |
Provide the node with a shared_ptr to itself.
Since implementation has to create objects which need a shared_ptr to this node, and a pointee cannot retrieve a shared_ptr to itself internally, have to set that from the outside.
Definition at line 674 of file basenode.cxx.
References ENSURE_OR_THROW, and mpSelf.
|
virtual |
Reimplemented in slideshow::internal::AnimationBaseNode, and slideshow::internal::BaseContainerNode.
Definition at line 688 of file basenode.cxx.
References aName, slideshow::internal::debugGetNodeName(), getDescription(), getState(), slideshow::internal::AnimationNode::INVALID, log, mxAnimationNode, and SAL_INFO.
Referenced by slideshow::internal::debugNodesShowTree(), slideshow::internal::AnimationBaseNode::showState(), and slideshow::internal::BaseContainerNode::showState().
|
friend |
Definition at line 191 of file basenode.hxx.
|
private |
Definition at line 194 of file basenode.hxx.
Referenced by activate(), dispose(), getContext(), notifyEndListeners(), resolve(), and scheduleDeactivationEvent().
|
private |
Definition at line 196 of file basenode.hxx.
Referenced by dispose(), notifyEndListeners(), and registerDeactivatingListener().
|
private |
Definition at line 205 of file basenode.hxx.
Referenced by isMainSequenceRootNode().
|
private |
Definition at line 203 of file basenode.hxx.
Referenced by slideshow::internal::BaseNode::StateTransition::clear(), slideshow::internal::BaseNode::StateTransition::enter(), and inStateOrTransition().
|
private |
Definition at line 202 of file basenode.hxx.
Referenced by activate(), checkValidNode(), slideshow::internal::BaseNode::StateTransition::commit(), deactivate(), dispose(), end(), slideshow::internal::BaseNode::StateTransition::enter(), getState(), init(), inStateOrTransition(), and resolve().
|
private |
Definition at line 201 of file basenode.hxx.
Referenced by resolve().
|
private |
Definition at line 204 of file basenode.hxx.
Referenced by deactivate(), dispose(), end(), init(), resolve(), and scheduleDeactivationEvent().
|
private |
Definition at line 198 of file basenode.hxx.
Referenced by dispose(), getFillDefaultMode(), getParentNode(), and getRestartDefaultMode().
|
private |
Definition at line 199 of file basenode.hxx.
Referenced by activate(), checkValidNode(), dispose(), getSelf(), notifyEndListeners(), resolve(), scheduleDeactivationEvent(), and setSelf().
|
private |
Definition at line 200 of file basenode.hxx.
Referenced by isTransition().
|
private |
Definition at line 197 of file basenode.hxx.
Referenced by dispose(), getFillDefaultMode(), getFillMode(), getRestartDefaultMode(), getRestartMode(), getXAnimationNode(), resolve(), scheduleDeactivationEvent(), and showState().