diff options
author | Siqi LIU <me@siqi.fr> | 2013-08-04 13:10:55 +0200 |
---|---|---|
committer | Siqi LIU <me@siqi.fr> | 2013-08-04 14:18:10 +0200 |
commit | dffc87dd13daf9a2f2f629cd50558995aadc4d19 (patch) | |
tree | 959406db44ffaed1f86bb935504968573cc1ba16 /slideshow/source/engine/slideshowimpl.cxx | |
parent | a5468d2a372fd1aba80b4a708c4751fdccf0157a (diff) |
pointer display on the screen
Change-Id: I43c91bdf6c364da282d354e5a07f871a9247f2d6
Diffstat (limited to 'slideshow/source/engine/slideshowimpl.cxx')
-rw-r--r-- | slideshow/source/engine/slideshowimpl.cxx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index f9e8ed8b58e0..db207a892adb 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -95,6 +95,7 @@ #include "waitsymbol.hxx" #include "effectrewinder.hxx" #include "framerate.hxx" +#include "pointersymbol.hxx" #include <boost/noncopyable.hpp> #include <boost/bind.hpp> @@ -459,6 +460,8 @@ private: boost::shared_ptr<RehearseTimingsActivity> mpRehearseTimingsActivity; boost::shared_ptr<WaitSymbol> mpWaitSymbol; + boost::shared_ptr<PointerSymbol> mpPointerSymbol; + /// the current slide transition sound object: SoundPlayerSharedPtr mpCurrentSlideTransitionSound; @@ -579,6 +582,7 @@ SlideShowImpl::SlideShowImpl( mpListener(), mpRehearseTimingsActivity(), mpWaitSymbol(), + mpPointerSymbol(), mpCurrentSlideTransitionSound(), mxComponentContext( xContext ), mxOptionalTransitionFactory(), @@ -653,6 +657,7 @@ void SlideShowImpl::disposing() } mpWaitSymbol.reset(); + mpPointerSymbol.reset(); if( mpRehearseTimingsActivity ) { @@ -1777,6 +1782,37 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) return true; } + if ( rProperty.Name == "PointerSymbolBitmap" ) + { + uno::Reference<rendering::XBitmap> xBitmap; + if (! (rProperty.Value >>= xBitmap)) + return false; + + mpPointerSymbol = PointerSymbol::create( xBitmap, + maScreenUpdater, + maEventMultiplexer, + maViewContainer ); + + return true; + } + + if ( rProperty.Name == "PointerVisible" ) + { + bool visible; + rProperty.Value >>= visible; + mpPointerSymbol->setVisible(visible); + } + + if ( rProperty.Name == "PointerPosition") + { + ::com::sun::star::geometry::RealPoint2D pos; + if (! (rProperty.Value >>= pos)) + return false; + + std::cerr<<"Received pos at :(" << pos.X << ","<<pos.Y << ")" << std::endl; + mpPointerSymbol->viewsChanged(pos); + } + if (rProperty.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("NoSlideTransitions") )) { |