summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/animationnodes
diff options
context:
space:
mode:
authorAndre Fischer <af@openoffice.org>2009-04-27 11:42:05 +0000
committerAndre Fischer <af@openoffice.org>2009-04-27 11:42:05 +0000
commit69a4a545a556bd189736b3e510d4b4b07ae8cb6e (patch)
tree33696e0153c26ca3c8cf32b988cc6422688cccee /slideshow/source/engine/animationnodes
parentaa02f1da390cb9b1225de978f8e2965c34e3a45f (diff)
#i48179# Debug: added descriptive strings to events.
Diffstat (limited to 'slideshow/source/engine/animationnodes')
-rw-r--r--slideshow/source/engine/animationnodes/animationaudionode.cxx9
-rw-r--r--slideshow/source/engine/animationnodes/animationbasenode.cxx3
-rw-r--r--slideshow/source/engine/animationnodes/animationcommandnode.cxx3
-rw-r--r--slideshow/source/engine/animationnodes/animationsetnode.cxx3
-rw-r--r--slideshow/source/engine/animationnodes/basenode.cxx9
-rw-r--r--slideshow/source/engine/animationnodes/generateevent.cxx36
-rw-r--r--slideshow/source/engine/animationnodes/paralleltimecontainer.cxx3
-rw-r--r--slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx12
8 files changed, 57 insertions, 21 deletions
diff --git a/slideshow/source/engine/animationnodes/animationaudionode.cxx b/slideshow/source/engine/animationnodes/animationaudionode.cxx
index 634dc0342515..24c3a95382bf 100644
--- a/slideshow/source/engine/animationnodes/animationaudionode.cxx
+++ b/slideshow/source/engine/animationnodes/animationaudionode.cxx
@@ -94,14 +94,16 @@ void AnimationAudioNode::activate_st()
// no node duration. Take inherent media time, then
scheduleDeactivationEvent(
makeDelay( boost::bind( &AnimationNode::deactivate, getSelf() ),
- mpPlayer->getDuration() ) );
+ mpPlayer->getDuration(),
+ "AnimationAudioNode::deactivate with delay") );
}
}
else
{
// deactivate ASAP:
scheduleDeactivationEvent(
- makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ) ) );
+ makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ),
+ "AnimationAudioNode::deactivate without delay") );
}
}
@@ -127,7 +129,8 @@ void AnimationAudioNode::deactivate_st( NodeState /*eDestState*/ )
getContext().mrEventQueue.addEvent(
makeEvent( boost::bind( &EventMultiplexer::notifyAudioStopped,
boost::ref(getContext().mrEventMultiplexer),
- getSelf() ) ) );
+ getSelf() ),
+ "AnimationAudioNode::notifyAudioStopped") );
}
bool AnimationAudioNode::hasPendingAnimation() const
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index 82868063fefa..19a6df2a8244 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -456,7 +456,8 @@ AnimationBaseNode::fillCommonParameters() const
EventSharedPtr pEndEvent;
if (pSelf) {
pEndEvent = makeEvent(
- boost::bind( &AnimationNode::deactivate, pSelf ) );
+ boost::bind( &AnimationNode::deactivate, pSelf ),
+ "AnimationBaseNode::deactivate");
}
// Calculate the minimum frame count that depends on the duration and
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
index f9104f37a45a..2adbe2b9b75a 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
@@ -124,7 +124,8 @@ void AnimationCommandNode::activate_st()
// deactivate ASAP:
scheduleDeactivationEvent(
- makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ) ) );
+ makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ),
+ "AnimationCommandNode::deactivate" ) );
}
bool AnimationCommandNode::hasPendingAnimation() const
diff --git a/slideshow/source/engine/animationnodes/animationsetnode.cxx b/slideshow/source/engine/animationnodes/animationsetnode.cxx
index f7669b7214d3..ba1f015cd4fe 100644
--- a/slideshow/source/engine/animationnodes/animationsetnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationsetnode.cxx
@@ -80,7 +80,8 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
pSelf, "cannot cast getSelf() to my type!" );
aParms.mpEndEvent = makeEvent(
boost::bind( &AnimationSetNode::implScheduleDeactivationEvent,
- pSelf ) );
+ pSelf ),
+ "AnimationSetNode::implScheduleDeactivationEvent");
}
switch (AnimationFactory::classifyAttributeName( attrName )) {
diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx
index 9f74a75fd571..6ad15e43462f 100644
--- a/slideshow/source/engine/animationnodes/basenode.cxx
+++ b/slideshow/source/engine/animationnodes/basenode.cxx
@@ -50,6 +50,7 @@
#include "tools.hxx"
#include "nodetools.hxx"
#include "generateevent.hxx"
+#include "debug.hxx"
#include <boost/bind.hpp>
#include <vector>
@@ -312,6 +313,10 @@ public:
mpNode->meCurrState = meToState;
clear();
}
+
+ // Uncomment the following line to write the node tree to file on
+ // every state change of one of its nodes.
+ // Debug_ShowNodeTree(mpNode->mpSelf);
}
void clear() {
@@ -488,7 +493,9 @@ bool BaseNode::resolve()
// schedule delayed activation event. Take iterate node
// timeout into account
mpCurrentEvent = makeDelay(
- boost::bind( &AnimationNode::activate, mpSelf ), mnStartDelay );
+ boost::bind( &AnimationNode::activate, mpSelf ),
+ mnStartDelay,
+ "AnimationNode::activate with delay");
maContext.mrEventQueue.addEvent( mpCurrentEvent );
}
diff --git a/slideshow/source/engine/animationnodes/generateevent.cxx b/slideshow/source/engine/animationnodes/generateevent.cxx
index 0983019dafef..015db5586834 100644
--- a/slideshow/source/engine/animationnodes/generateevent.cxx
+++ b/slideshow/source/engine/animationnodes/generateevent.cxx
@@ -111,7 +111,9 @@ EventSharedPtr generateEvent(
case animations::EventTrigger::BEGIN_EVENT:
// try to extract XAnimationNode event source
if (aEvent.Source >>= xNode) {
- pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay );
+ pEvent = makeDelay( rFunctor,
+ nDelay2 + nAdditionalDelay,
+ "generateEvent, BEGIN_EVENT");
rContext.mrUserEventQueue.registerAnimationStartEvent(
pEvent, xNode );
}
@@ -123,7 +125,9 @@ EventSharedPtr generateEvent(
case animations::EventTrigger::END_EVENT:
// try to extract XAnimationNode event source
if (aEvent.Source >>= xNode) {
- pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay );
+ pEvent = makeDelay( rFunctor,
+ nDelay2 + nAdditionalDelay,
+ "generateEvent, END_EVENT");
rContext.mrUserEventQueue.registerAnimationEndEvent(
pEvent, xNode );
}
@@ -137,7 +141,9 @@ EventSharedPtr generateEvent(
if ((aEvent.Source >>= xShape) &&
(pShape = rContext.mpSubsettableShapeManager->lookupShape(xShape)).get())
{
- pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay );
+ pEvent = makeDelay( rFunctor,
+ nDelay2 + nAdditionalDelay,
+ "generateEvent, ON_CLICK");
rContext.mrUserEventQueue.registerShapeClickEvent(
pEvent, pShape );
}
@@ -151,7 +157,9 @@ EventSharedPtr generateEvent(
if ((aEvent.Source >>= xShape) &&
(pShape = rContext.mpSubsettableShapeManager->lookupShape(xShape)).get())
{
- pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay );
+ pEvent = makeDelay( rFunctor,
+ nDelay2 + nAdditionalDelay,
+ "generateEvent, ON_DBL_CLICK");
rContext.mrUserEventQueue.registerShapeDoubleClickEvent(
pEvent, pShape );
}
@@ -165,7 +173,9 @@ EventSharedPtr generateEvent(
if ((aEvent.Source >>= xShape) &&
(pShape = rContext.mpSubsettableShapeManager->lookupShape(xShape)).get())
{
- pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay );
+ pEvent = makeDelay( rFunctor,
+ nDelay2 + nAdditionalDelay,
+ "generateEvent, ON_MOUSE_ENTER");
rContext.mrUserEventQueue.registerMouseEnterEvent(
pEvent, pShape );
}
@@ -179,7 +189,9 @@ EventSharedPtr generateEvent(
if ((aEvent.Source >>= xShape) &&
(pShape = rContext.mpSubsettableShapeManager->lookupShape(xShape)).get())
{
- pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay );
+ pEvent = makeDelay( rFunctor,
+ nDelay2 + nAdditionalDelay,
+ "generateEvent, ON_MOUSE_LEAVE");
rContext.mrUserEventQueue.registerMouseLeaveEvent(
pEvent, pShape );
}
@@ -193,13 +205,17 @@ EventSharedPtr generateEvent(
"mapped to ON_NEXT!" );
// FALLTHROUGH intended
case animations::EventTrigger::ON_NEXT:
- pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay );
+ pEvent = makeDelay( rFunctor,
+ nDelay2 + nAdditionalDelay,
+ "generateEvent, ON_NEXT");
rContext.mrUserEventQueue.registerNextEffectEvent( pEvent );
break;
case animations::EventTrigger::ON_STOP_AUDIO:
// try to extract XAnimationNode event source
if (aEvent.Source >>= xNode) {
- pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay );
+ pEvent = makeDelay( rFunctor,
+ nDelay2 + nAdditionalDelay,
+ "generateEvent, ON_STOP_AUDIO");
rContext.mrUserEventQueue.registerAudioStoppedEvent(
pEvent, xNode );
}
@@ -218,7 +234,9 @@ EventSharedPtr generateEvent(
"not yet implemented!" );
}
else if (rEventDescription >>= nDelay1) {
- pEvent = makeDelay( rFunctor, nDelay1 + nAdditionalDelay );
+ pEvent = makeDelay( rFunctor,
+ nDelay1 + nAdditionalDelay,
+ "generateEvent with delay");
// schedule delay event
rContext.mrEventQueue.addEvent( pEvent );
}
diff --git a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx
index 0bd4c524586e..0581c78e9c47 100644
--- a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx
+++ b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx
@@ -53,7 +53,8 @@ void ParallelTimeContainer::activate_st()
if (isDurationIndefinite() && maChildren.empty()) {
// deactivate ASAP:
scheduleDeactivationEvent(
- makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ) ) );
+ makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ),
+ "ParallelTimeContainer::deactivate") );
}
else { // use default
scheduleDeactivationEvent();
diff --git a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx
index e841c8e667de..bf0cba0cfe64 100644
--- a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx
+++ b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx
@@ -63,7 +63,8 @@ void SequentialTimeContainer::activate_st()
{
// deactivate ASAP:
scheduleDeactivationEvent(
- makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ) ) );
+ makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ),
+ "SequentialTimeContainer::deactivate") );
}
else // use default
scheduleDeactivationEvent();
@@ -89,7 +90,8 @@ void SequentialTimeContainer::skipEffect(
// empty all events ignoring timings => until next effect
getContext().mrEventQueue.forceEmpty();
getContext().mrEventQueue.addEvent(
- makeEvent( boost::bind(&AnimationNode::deactivate, pChildNode) ) );
+ makeEvent( boost::bind(&AnimationNode::deactivate, pChildNode),
+ "SequentialTimeContainer::deactivate, skipEffect with delay") );
}
else
OSL_ENSURE( false, "unknown notifier!" );
@@ -116,12 +118,14 @@ bool SequentialTimeContainer::resolveChild(
mpCurrentSkipEvent = makeEvent(
boost::bind( &SequentialTimeContainer::skipEffect,
boost::dynamic_pointer_cast<SequentialTimeContainer>( getSelf() ),
- pChildNode ) );
+ pChildNode ),
+ "SequentialTimeContainer::skipEffect, resolveChild");
// event that will reresolve the resolved/activated child:
mpCurrentRewindEvent = makeEvent(
boost::bind( &SequentialTimeContainer::rewindEffect,
boost::dynamic_pointer_cast<SequentialTimeContainer>( getSelf() ),
- pChildNode ) );
+ pChildNode ),
+ "SequentialTimeContainer::rewindEffect, resolveChild");
// deactivate child node when skip event occurs:
getContext().mrUserEventQueue.registerSkipEffectEvent(