diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-07-26 06:29:16 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-07-26 06:29:16 +0000 |
commit | 60b80bcf07076839ac9c0b74b1577cd861f86523 (patch) | |
tree | 824ddbc71508dc2a95c342b2d901e66d4876a0e8 /slideshow/source/engine/animationnodes/animationaudionode.hxx | |
parent | b944c4edff2d03d049cf49ee26d06c2ec361396a (diff) |
INTEGRATION: CWS presfixes10 (1.5.8); FILE MERGED
2005/11/07 15:26:45 dbo 1.5.8.1: #i45197# revised code
Issue number:
Submitted by:
Reviewed by:
Diffstat (limited to 'slideshow/source/engine/animationnodes/animationaudionode.hxx')
-rw-r--r-- | slideshow/source/engine/animationnodes/animationaudionode.hxx | 111 |
1 files changed, 48 insertions, 63 deletions
diff --git a/slideshow/source/engine/animationnodes/animationaudionode.hxx b/slideshow/source/engine/animationnodes/animationaudionode.hxx index 2a2615bcdf1b..2031a2b9dbde 100644 --- a/slideshow/source/engine/animationnodes/animationaudionode.hxx +++ b/slideshow/source/engine/animationnodes/animationaudionode.hxx @@ -4,9 +4,9 @@ * * $RCSfile: animationaudionode.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: rt $ $Date: 2005-09-07 20:39:11 $ + * last change: $Author: rt $ $Date: 2006-07-26 07:29:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -32,69 +32,54 @@ * MA 02111-1307 USA * ************************************************************************/ +#ifndef INCLUDED_SLIDESHOW_ANIMATIONAUDIONODE_HXX +#define INCLUDED_SLIDESHOW_ANIMATIONAUDIONODE_HXX -#ifndef _SLIDESHOW_ANIMATIONAUDIONODE_HXX -#define _SLIDESHOW_ANIMATIONAUDIONODE_HXX +#include "basecontainernode.hxx" +#include "soundplayer.hxx" +#include "com/sun/star/animations/XAnimationNode.hpp" +#include "com/sun/star/animations/XAudio.hpp" -#include <basecontainernode.hxx> -#include <soundplayer.hxx> +namespace presentation { +namespace internal { -#ifndef _COM_SUN_STAR_ANIMATIONS_XANIMATIONNODE_HPP_ -#include <com/sun/star/animations/XAnimationNode.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XAUDIO_HPP_ -#include <com/sun/star/animations/XAudio.hpp> -#endif +/** Audio node. - -using namespace ::com::sun::star; - -namespace presentation + This animation node contains an audio effect. Duration and + start/stop behaviour is affected by the referenced audio + file. +*/ +class AnimationAudioNode : public BaseNode, public AnimationEventHandler { - namespace internal - { - /** Audio node. - - This animation node contains an audio effect. Duration and - start/stop behaviour is affected by the referenced audio - file. - */ - class AnimationAudioNode : public BaseNode, public AnimationEventHandler - { - public: - AnimationAudioNode( const ::com::sun::star::uno::Reference< - ::com::sun::star::animations::XAnimationNode >& xNode, - const BaseContainerNodeSharedPtr& rParent, - const NodeContext& rContext ); - - virtual void dispose(); - virtual bool activate(); - virtual void deactivate(); - - /** Overridden, because the sound duration normally - determines effect duration. - */ - virtual void scheduleDeactivationEvent() const; - - /// overridden, because NO-OP for all leaf nodes (which typically don't register nowhere) - virtual void notifyDeactivating( const AnimationNodeSharedPtr& rNotifier ); - - virtual bool hasPendingAnimation() const; - - /// overriden, because we need to deal with STOPAUDIO commands - virtual bool handleAnimationEvent( const AnimationNodeSharedPtr& rNode ); - - private: - ::com::sun::star::uno::Reference< - ::com::sun::star::animations::XAudio > mxAudioNode; - ::rtl::OUString maSoundURL; - mutable SoundPlayerSharedPtr mpPlayer; - - void createPlayer() const; - void resetPlayer() const; - }; - - } -} - -#endif /* _SLIDESHOW_ANIMATIONAUDIONODE_HXX */ +public: + AnimationAudioNode( + ::com::sun::star::uno::Reference< + ::com::sun::star::animations::XAnimationNode> const& xNode, + ::boost::shared_ptr<BaseContainerNode> const& pParent, + NodeContext const& rContext ); + +protected: + virtual void dispose(); + +private: + virtual void activate_st(); + virtual void deactivate_st( NodeState eDestState, bool ); + virtual bool hasPendingAnimation() const; + + /// overriden, because we need to deal with STOPAUDIO commands + virtual bool handleAnimationEvent( const AnimationNodeSharedPtr& rNode ); + +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::animations::XAudio > mxAudioNode; + ::rtl::OUString maSoundURL; + mutable SoundPlayerSharedPtr mpPlayer; + + void createPlayer() const; + void resetPlayer() const; +}; + +} // namespace internal +} // namespace presentation + +#endif /* INCLUDED_SLIDESHOW_ANIMATIONAUDIONODE_HXX */ |