1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef INCLUDED_SLIDESHOW_EVENTMULTIPLEXER_HXX 28*cdf0e10cSrcweir #define INCLUDED_SLIDESHOW_EVENTMULTIPLEXER_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include "eventhandler.hxx" 31*cdf0e10cSrcweir #include "hyperlinkhandler.hxx" 32*cdf0e10cSrcweir #include "mouseeventhandler.hxx" 33*cdf0e10cSrcweir #include "animationeventhandler.hxx" 34*cdf0e10cSrcweir #include "pauseeventhandler.hxx" 35*cdf0e10cSrcweir #include "shapelistenereventhandler.hxx" 36*cdf0e10cSrcweir #include "shapecursoreventhandler.hxx" 37*cdf0e10cSrcweir #include "userpainteventhandler.hxx" 38*cdf0e10cSrcweir #include "vieweventhandler.hxx" 39*cdf0e10cSrcweir #include "viewrepainthandler.hxx" 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir #include <boost/scoped_ptr.hpp> 42*cdf0e10cSrcweir #include <boost/noncopyable.hpp> 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir namespace slideshow { 46*cdf0e10cSrcweir namespace internal { 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir class EventQueue; 49*cdf0e10cSrcweir class UnoViewContainer; 50*cdf0e10cSrcweir class AnimationNode; 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir struct EventMultiplexerImpl; 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir /** This class multiplexes user-activated and 55*cdf0e10cSrcweir slide-show global events. 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir This class listens at the XSlideShowView and fires events 58*cdf0e10cSrcweir registered for certain user actions. Furthermore, global 59*cdf0e10cSrcweir slide show state changes (such as start or end of a slide) 60*cdf0e10cSrcweir are handled as well. Note that registered events which 61*cdf0e10cSrcweir have a non-zero timeout (i.e. events that return non-zero 62*cdf0e10cSrcweir from getActivationTime()) will not be fired immediately 63*cdf0e10cSrcweir after the user action occured, but only after the given 64*cdf0e10cSrcweir timeout. Which is actually a feature. 65*cdf0e10cSrcweir */ 66*cdf0e10cSrcweir class EventMultiplexer : private ::boost::noncopyable 67*cdf0e10cSrcweir { 68*cdf0e10cSrcweir public: 69*cdf0e10cSrcweir /** Create an event multiplexer 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir @param rEventQueue 72*cdf0e10cSrcweir Reference to the main event queue. Since we hold this 73*cdf0e10cSrcweir object by plain reference, it must live longer than we 74*cdf0e10cSrcweir do. On the other hand, that queue must not fire events 75*cdf0e10cSrcweir after this object is destroyed, since we might 76*cdf0e10cSrcweir schedule events there which itself contain plain 77*cdf0e10cSrcweir references to this object. Basically, EventQueue and 78*cdf0e10cSrcweir EventMultiplexer should have the same lifetime, and since 79*cdf0e10cSrcweir this is not possible, both must be destructed in a 80*cdf0e10cSrcweir phased mode: first clear both of any remaining events, 81*cdf0e10cSrcweir then destruct them. 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir @param rViewContainer 84*cdf0e10cSrcweir Globally managed list of all registered views. Used to 85*cdf0e10cSrcweir determine event sources, and for registering view listeners 86*cdf0e10cSrcweir at. 87*cdf0e10cSrcweir */ 88*cdf0e10cSrcweir EventMultiplexer( EventQueue& rEventQueue, 89*cdf0e10cSrcweir UnoViewContainer const& rViewContainer ); 90*cdf0e10cSrcweir ~EventMultiplexer(); 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir // Management methods 94*cdf0e10cSrcweir // ========================================================= 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir /** Clear all registered handlers. 97*cdf0e10cSrcweir */ 98*cdf0e10cSrcweir void clear(); 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir // Automatic mode methods 102*cdf0e10cSrcweir // ========================================================= 103*cdf0e10cSrcweir 104*cdf0e10cSrcweir /** Change automatic mode. 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir @param bIsAuto 107*cdf0e10cSrcweir When true, events will be fired automatically, not 108*cdf0e10cSrcweir only triggered by UI events. When false, auto events 109*cdf0e10cSrcweir will quit. 110*cdf0e10cSrcweir */ 111*cdf0e10cSrcweir void setAutomaticMode( bool bIsAuto ); 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir /** Get automatic mode setting. 114*cdf0e10cSrcweir */ 115*cdf0e10cSrcweir bool getAutomaticMode() const; 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir /** Set the timeout for automatic mode. 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir @param nTimeout 120*cdf0e10cSrcweir Timeout, between end of effect until start of next 121*cdf0e10cSrcweir effect. 122*cdf0e10cSrcweir */ 123*cdf0e10cSrcweir void setAutomaticTimeout( double nTimeout ); 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir /** Get automatic mode timeout value. 126*cdf0e10cSrcweir */ 127*cdf0e10cSrcweir double getAutomaticTimeout() const; 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir // Handler registration methods 130*cdf0e10cSrcweir // ========================================================= 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir /** Register an event handler that will be called when views are 133*cdf0e10cSrcweir changed. 134*cdf0e10cSrcweir 135*cdf0e10cSrcweir For each view added, viewAdded() will be called on the 136*cdf0e10cSrcweir handler. For each view removed, viewRemoved() will be 137*cdf0e10cSrcweir called. Each modified view will cause a viewChanged() call on 138*cdf0e10cSrcweir each handler. 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir You don't need to deregister the handler, it will be 141*cdf0e10cSrcweir automatically removed, once the pointee becomes stale. 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir @param rHandler 144*cdf0e10cSrcweir Handler to call. 145*cdf0e10cSrcweir */ 146*cdf0e10cSrcweir void addViewHandler( const ViewEventHandlerWeakPtr& rHandler ); 147*cdf0e10cSrcweir void removeViewHandler( const ViewEventHandlerWeakPtr& rHandler ); 148*cdf0e10cSrcweir 149*cdf0e10cSrcweir /** Register an event handler that will be called when a view gets 150*cdf0e10cSrcweir clobbered. 151*cdf0e10cSrcweir 152*cdf0e10cSrcweir Note that <em>all</em> registered handlers will be called when 153*cdf0e10cSrcweir the event. This is in contrast to the mouse events below. 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir @param rHandler 156*cdf0e10cSrcweir Handler to call when a view needs a repaint 157*cdf0e10cSrcweir */ 158*cdf0e10cSrcweir void addViewRepaintHandler( const ViewRepaintHandlerSharedPtr& rHandler ); 159*cdf0e10cSrcweir void removeViewRepaintHandler( const ViewRepaintHandlerSharedPtr& rHandler ); 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir /** Register an event handler that will be called when 162*cdf0e10cSrcweir XShapeListeners are changed. 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir @param rHandler 165*cdf0e10cSrcweir Handler to call when a shape listener changes 166*cdf0e10cSrcweir */ 167*cdf0e10cSrcweir void addShapeListenerHandler( const ShapeListenerEventHandlerSharedPtr& rHandler ); 168*cdf0e10cSrcweir void removeShapeListenerHandler( const ShapeListenerEventHandlerSharedPtr& rHandler ); 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir /** Register an event handler that will be called when 171*cdf0e10cSrcweir XShapeListeners are changed. 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir @param rHandler 174*cdf0e10cSrcweir Handler to call when a shape listener changes 175*cdf0e10cSrcweir */ 176*cdf0e10cSrcweir void addShapeCursorHandler( const ShapeCursorEventHandlerSharedPtr& rHandler ); 177*cdf0e10cSrcweir void removeShapeCursorHandler( const ShapeCursorEventHandlerSharedPtr& rHandler ); 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir /** Register an event handler that will be called when 180*cdf0e10cSrcweir user paint parameters change. 181*cdf0e10cSrcweir 182*cdf0e10cSrcweir @param rHandler 183*cdf0e10cSrcweir Handler to call when a shape listener changes 184*cdf0e10cSrcweir */ 185*cdf0e10cSrcweir void addUserPaintHandler( const UserPaintEventHandlerSharedPtr& rHandler ); 186*cdf0e10cSrcweir void removeUserPaintHandler( const UserPaintEventHandlerSharedPtr& rHandler ); 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir /** Register an event handler that will be called when the 189*cdf0e10cSrcweir user requests the next effect. 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir For every nextEffect event, only one of the handlers 192*cdf0e10cSrcweir registered here is called. The handlers are considered 193*cdf0e10cSrcweir with decreasing priority, i.e. the handler with the 194*cdf0e10cSrcweir currently highest priority will be called. 195*cdf0e10cSrcweir 196*cdf0e10cSrcweir @param rHandler 197*cdf0e10cSrcweir Handler to call when the next effect should start 198*cdf0e10cSrcweir 199*cdf0e10cSrcweir @param nPriority 200*cdf0e10cSrcweir Priority with which the handlers are called. The 201*cdf0e10cSrcweir higher the priority, the earlier this handler will be 202*cdf0e10cSrcweir tried. 203*cdf0e10cSrcweir */ 204*cdf0e10cSrcweir void addNextEffectHandler( const EventHandlerSharedPtr& rHandler, 205*cdf0e10cSrcweir double nPriority ); 206*cdf0e10cSrcweir void removeNextEffectHandler( const EventHandlerSharedPtr& rHandler ); 207*cdf0e10cSrcweir 208*cdf0e10cSrcweir /** Register an event handler that will be called when the 209*cdf0e10cSrcweir slide is just shown. 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir Note that <em>all</em> registered handlers will be called 212*cdf0e10cSrcweir when the slide start occurs. This is in contrast to 213*cdf0e10cSrcweir the mouse events below. 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir @param rHandler 216*cdf0e10cSrcweir Handler to call when the next slide starts 217*cdf0e10cSrcweir */ 218*cdf0e10cSrcweir void addSlideStartHandler( const EventHandlerSharedPtr& rHandler ); 219*cdf0e10cSrcweir void removeSlideStartHandler( const EventHandlerSharedPtr& rHandler ); 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir /** Register an event handler that will be called when the 222*cdf0e10cSrcweir slide is about to vanish. 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir Note that <em>all</em> registered handlers will be 225*cdf0e10cSrcweir called when the slide end occurs. This is in contrast 226*cdf0e10cSrcweir to the mouse events below. 227*cdf0e10cSrcweir 228*cdf0e10cSrcweir @param rHandler 229*cdf0e10cSrcweir Handler to call when the current slide ends 230*cdf0e10cSrcweir */ 231*cdf0e10cSrcweir void addSlideEndHandler( const EventHandlerSharedPtr& rHandler ); 232*cdf0e10cSrcweir void removeSlideEndHandler( const EventHandlerSharedPtr& rHandler ); 233*cdf0e10cSrcweir 234*cdf0e10cSrcweir /** Register an event handler that will be called when an 235*cdf0e10cSrcweir XAnimationNode starts its active duration. 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir Note that <em>all</em> registered handlers will be called 238*cdf0e10cSrcweir when the animation start occurs. This is in contrast to 239*cdf0e10cSrcweir the mouse events below. 240*cdf0e10cSrcweir 241*cdf0e10cSrcweir @param rHandler 242*cdf0e10cSrcweir Handler to call when the animation start 243*cdf0e10cSrcweir */ 244*cdf0e10cSrcweir void addAnimationStartHandler( 245*cdf0e10cSrcweir const AnimationEventHandlerSharedPtr& rHandler ); 246*cdf0e10cSrcweir void removeAnimationStartHandler( 247*cdf0e10cSrcweir const AnimationEventHandlerSharedPtr& rHandler ); 248*cdf0e10cSrcweir 249*cdf0e10cSrcweir /** Register an event handler that will be called when an 250*cdf0e10cSrcweir XAnimationNode ends its active duration. 251*cdf0e10cSrcweir 252*cdf0e10cSrcweir Note that <em>all</em> registered handlers will be called 253*cdf0e10cSrcweir when the animation end occurs. This is in contrast to 254*cdf0e10cSrcweir the mouse events below. 255*cdf0e10cSrcweir 256*cdf0e10cSrcweir @param rHandler 257*cdf0e10cSrcweir Handler to call when the animation ends 258*cdf0e10cSrcweir */ 259*cdf0e10cSrcweir void addAnimationEndHandler( 260*cdf0e10cSrcweir const AnimationEventHandlerSharedPtr& rHandler ); 261*cdf0e10cSrcweir void removeAnimationEndHandler( 262*cdf0e10cSrcweir const AnimationEventHandlerSharedPtr& rHandler ); 263*cdf0e10cSrcweir 264*cdf0e10cSrcweir /** Register an event handler that will be called when the 265*cdf0e10cSrcweir main animation sequence of a slide ends its active 266*cdf0e10cSrcweir duration. 267*cdf0e10cSrcweir 268*cdf0e10cSrcweir Note that <em>all</em> registered handlers will be 269*cdf0e10cSrcweir called when the animation end occurs. This is in 270*cdf0e10cSrcweir contrast to the mouse events below. 271*cdf0e10cSrcweir 272*cdf0e10cSrcweir @param rHandler 273*cdf0e10cSrcweir Handler to call when the animation ends 274*cdf0e10cSrcweir */ 275*cdf0e10cSrcweir void addSlideAnimationsEndHandler( 276*cdf0e10cSrcweir const EventHandlerSharedPtr& rHandler ); 277*cdf0e10cSrcweir void removeSlideAnimationsEndHandler( 278*cdf0e10cSrcweir const EventHandlerSharedPtr& rHandler ); 279*cdf0e10cSrcweir 280*cdf0e10cSrcweir /** Register an event handler that will be called when an 281*cdf0e10cSrcweir XAudio node's sound stops playing. 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir Note that <em>all</em> registered handlers will be 284*cdf0e10cSrcweir called when the audio stops. This is in contrast to 285*cdf0e10cSrcweir the mouse events below. 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir @param rHandler 288*cdf0e10cSrcweir Handler to call when the audio stops 289*cdf0e10cSrcweir */ 290*cdf0e10cSrcweir void addAudioStoppedHandler( 291*cdf0e10cSrcweir const AnimationEventHandlerSharedPtr& rHandler ); 292*cdf0e10cSrcweir void removeAudioStoppedHandler( 293*cdf0e10cSrcweir const AnimationEventHandlerSharedPtr& rHandler ); 294*cdf0e10cSrcweir 295*cdf0e10cSrcweir /** Register an event handler that will be called when an 296*cdf0e10cSrcweir XCommand node's with the command STOPAUDIO is activated. 297*cdf0e10cSrcweir 298*cdf0e10cSrcweir Note that <em>all</em> registered handlers will be 299*cdf0e10cSrcweir called when the audio stops. This is in contrast to 300*cdf0e10cSrcweir the mouse events below. 301*cdf0e10cSrcweir 302*cdf0e10cSrcweir @param rHandler 303*cdf0e10cSrcweir Handler to call when command is activated 304*cdf0e10cSrcweir */ 305*cdf0e10cSrcweir void addCommandStopAudioHandler( 306*cdf0e10cSrcweir const AnimationEventHandlerSharedPtr& rHandler ); 307*cdf0e10cSrcweir void removeCommandStopAudioHandler( 308*cdf0e10cSrcweir const AnimationEventHandlerSharedPtr& rHandler ); 309*cdf0e10cSrcweir 310*cdf0e10cSrcweir /** Register a handler that is called when the show enters 311*cdf0e10cSrcweir or exits pause mode. 312*cdf0e10cSrcweir */ 313*cdf0e10cSrcweir void addPauseHandler( const PauseEventHandlerSharedPtr& rHandler ); 314*cdf0e10cSrcweir void removePauseHandler( const PauseEventHandlerSharedPtr& rHandler ); 315*cdf0e10cSrcweir 316*cdf0e10cSrcweir /** Register a mouse handler that is called on mouse click 317*cdf0e10cSrcweir 318*cdf0e10cSrcweir For every mouse click, only one of the handlers 319*cdf0e10cSrcweir registered here is called. The handlers are considered 320*cdf0e10cSrcweir with decreasing priority, i.e. the handler with the 321*cdf0e10cSrcweir currently highest priority will be called. 322*cdf0e10cSrcweir 323*cdf0e10cSrcweir Since the handlers can reject down and up events 324*cdf0e10cSrcweir individually, handlers should expect to be called with 325*cdf0e10cSrcweir non-matching down and up-press counts. If your handler 326*cdf0e10cSrcweir cannot cope with that, it must have the highest 327*cdf0e10cSrcweir priority of all added handlers. 328*cdf0e10cSrcweir */ 329*cdf0e10cSrcweir void addClickHandler( const MouseEventHandlerSharedPtr& rHandler, 330*cdf0e10cSrcweir double nPriority ); 331*cdf0e10cSrcweir void removeClickHandler( const MouseEventHandlerSharedPtr& rHandler ); 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir /** Register a mouse handler that is called on a double 334*cdf0e10cSrcweir mouse click 335*cdf0e10cSrcweir 336*cdf0e10cSrcweir For every mouse double click, only one of the handlers 337*cdf0e10cSrcweir registered here is called. The handlers are considered 338*cdf0e10cSrcweir with decreasing priority, i.e. the handler with the 339*cdf0e10cSrcweir currently highest priority will be called. 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir Since the handlers can reject down and up events 342*cdf0e10cSrcweir individually, handlers should expect to be called with 343*cdf0e10cSrcweir non-matching down and up-press counts. If your handler 344*cdf0e10cSrcweir cannot cope with that, it must have the highest 345*cdf0e10cSrcweir priority of all added handlers. 346*cdf0e10cSrcweir */ 347*cdf0e10cSrcweir void addDoubleClickHandler( const MouseEventHandlerSharedPtr& rHandler, 348*cdf0e10cSrcweir double nPriority ); 349*cdf0e10cSrcweir void removeDoubleClickHandler( const MouseEventHandlerSharedPtr& rHandler ); 350*cdf0e10cSrcweir 351*cdf0e10cSrcweir /** Register a mouse handler that is called for mouse moves. 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir For every mouse move, only one of the handlers 354*cdf0e10cSrcweir registered here is called. The handlers are considered 355*cdf0e10cSrcweir with decreasing priority, i.e. the handler with the 356*cdf0e10cSrcweir currently highest priority will be called. 357*cdf0e10cSrcweir */ 358*cdf0e10cSrcweir void addMouseMoveHandler( const MouseEventHandlerSharedPtr& rHandler, 359*cdf0e10cSrcweir double nPriority ); 360*cdf0e10cSrcweir void removeMouseMoveHandler( const MouseEventHandlerSharedPtr& rHandler ); 361*cdf0e10cSrcweir 362*cdf0e10cSrcweir 363*cdf0e10cSrcweir /** Registers a hyperlink click handler. 364*cdf0e10cSrcweir 365*cdf0e10cSrcweir For every hyperlink click, only one of the handlers registered 366*cdf0e10cSrcweir here is called. The handlers are considered with decreasing 367*cdf0e10cSrcweir priority, i.e. the handler with the currently highest priority 368*cdf0e10cSrcweir will be called. 369*cdf0e10cSrcweir 370*cdf0e10cSrcweir @param rHandler 371*cdf0e10cSrcweir @param nPriority 372*cdf0e10cSrcweir */ 373*cdf0e10cSrcweir void addHyperlinkHandler( const HyperlinkHandlerSharedPtr& rHandler, 374*cdf0e10cSrcweir double nPriority ); 375*cdf0e10cSrcweir void removeHyperlinkHandler( const HyperlinkHandlerSharedPtr& rHandler ); 376*cdf0e10cSrcweir 377*cdf0e10cSrcweir 378*cdf0e10cSrcweir // External event notifications 379*cdf0e10cSrcweir // ========================================================= 380*cdf0e10cSrcweir 381*cdf0e10cSrcweir /** View added. 382*cdf0e10cSrcweir 383*cdf0e10cSrcweir This method adds another view, which the show is 384*cdf0e10cSrcweir displayed on. On every added view, the EventMultiplexer 385*cdf0e10cSrcweir registers mouse and motion event listeners. 386*cdf0e10cSrcweir */ 387*cdf0e10cSrcweir bool notifyViewAdded( const UnoViewSharedPtr& rView ); 388*cdf0e10cSrcweir 389*cdf0e10cSrcweir /** View removed 390*cdf0e10cSrcweir 391*cdf0e10cSrcweir This method removes a view. Registered mouse and 392*cdf0e10cSrcweir motion event listeners are revoked. 393*cdf0e10cSrcweir */ 394*cdf0e10cSrcweir bool notifyViewRemoved( const UnoViewSharedPtr& rView ); 395*cdf0e10cSrcweir 396*cdf0e10cSrcweir /** View changed 397*cdf0e10cSrcweir 398*cdf0e10cSrcweir This method announces a changed view to all view 399*cdf0e10cSrcweir listeners. View changes include size and transformation. 400*cdf0e10cSrcweir 401*cdf0e10cSrcweir @param rView 402*cdf0e10cSrcweir View that has changed 403*cdf0e10cSrcweir */ 404*cdf0e10cSrcweir bool notifyViewChanged( const UnoViewSharedPtr& rView ); 405*cdf0e10cSrcweir 406*cdf0e10cSrcweir /** View changed 407*cdf0e10cSrcweir 408*cdf0e10cSrcweir This method announces a changed view to all view 409*cdf0e10cSrcweir listeners. View changes include size and transformation. 410*cdf0e10cSrcweir 411*cdf0e10cSrcweir @param xView 412*cdf0e10cSrcweir View that has changed 413*cdf0e10cSrcweir */ 414*cdf0e10cSrcweir bool notifyViewChanged( const ::com::sun::star::uno::Reference< 415*cdf0e10cSrcweir ::com::sun::star::presentation::XSlideShowView>& xView ); 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir /** All Views changed 418*cdf0e10cSrcweir 419*cdf0e10cSrcweir This method announces to all view listeners that 420*cdf0e10cSrcweir <em>every</em> known view has changed. View changes include 421*cdf0e10cSrcweir size and transformation. 422*cdf0e10cSrcweir */ 423*cdf0e10cSrcweir bool notifyViewsChanged(); 424*cdf0e10cSrcweir 425*cdf0e10cSrcweir /** View clobbered 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir This method announces that the given view has been clobbered 428*cdf0e10cSrcweir by something external to the slideshow, and needs an update. 429*cdf0e10cSrcweir 430*cdf0e10cSrcweir @param xView 431*cdf0e10cSrcweir View that has been clobbered 432*cdf0e10cSrcweir */ 433*cdf0e10cSrcweir bool notifyViewClobbered( const ::com::sun::star::uno::Reference< 434*cdf0e10cSrcweir ::com::sun::star::presentation::XSlideShowView>& xView ); 435*cdf0e10cSrcweir 436*cdf0e10cSrcweir /** New shape event listener added 437*cdf0e10cSrcweir 438*cdf0e10cSrcweir This method announces that the given listener was added for 439*cdf0e10cSrcweir the specified shape. 440*cdf0e10cSrcweir 441*cdf0e10cSrcweir @return true, if at least one handler successfully processed 442*cdf0e10cSrcweir the notification. 443*cdf0e10cSrcweir */ 444*cdf0e10cSrcweir bool notifyShapeListenerAdded( const ::com::sun::star::uno::Reference< 445*cdf0e10cSrcweir ::com::sun::star::presentation::XShapeEventListener>& xListener, 446*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 447*cdf0e10cSrcweir ::com::sun::star::drawing::XShape>& xShape ); 448*cdf0e10cSrcweir 449*cdf0e10cSrcweir /** A shape event listener was removed 450*cdf0e10cSrcweir 451*cdf0e10cSrcweir This method announces that the given listener was removed for 452*cdf0e10cSrcweir the specified shape. 453*cdf0e10cSrcweir 454*cdf0e10cSrcweir @return true, if at least one handler successfully processed 455*cdf0e10cSrcweir the notification. 456*cdf0e10cSrcweir */ 457*cdf0e10cSrcweir bool notifyShapeListenerRemoved( const ::com::sun::star::uno::Reference< 458*cdf0e10cSrcweir ::com::sun::star::presentation::XShapeEventListener>& xListener, 459*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 460*cdf0e10cSrcweir ::com::sun::star::drawing::XShape>& xShape ); 461*cdf0e10cSrcweir 462*cdf0e10cSrcweir /** A new shape cursor was set 463*cdf0e10cSrcweir 464*cdf0e10cSrcweir This method announces that the given cursor was set for the 465*cdf0e10cSrcweir specified shape. 466*cdf0e10cSrcweir 467*cdf0e10cSrcweir @return true, if at least one handler successfully processed 468*cdf0e10cSrcweir the notification. 469*cdf0e10cSrcweir */ 470*cdf0e10cSrcweir bool notifyShapeCursorChange( const ::com::sun::star::uno::Reference< 471*cdf0e10cSrcweir ::com::sun::star::drawing::XShape>& xShape, 472*cdf0e10cSrcweir sal_Int16 nPointerShape ); 473*cdf0e10cSrcweir 474*cdf0e10cSrcweir /** Notify a new user paint color 475*cdf0e10cSrcweir 476*cdf0e10cSrcweir Sending this notification also implies that user paint is 477*cdf0e10cSrcweir enabled. User paint denotes the feature to draw colored lines 478*cdf0e10cSrcweir on top of the slide content. 479*cdf0e10cSrcweir 480*cdf0e10cSrcweir @return true, if this event was processed by 481*cdf0e10cSrcweir anybody. If false is returned, no handler processed 482*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 483*cdf0e10cSrcweir */ 484*cdf0e10cSrcweir bool notifyUserPaintColor( RGBColor const& rUserColor ); 485*cdf0e10cSrcweir 486*cdf0e10cSrcweir /** Notify a new user paint width 487*cdf0e10cSrcweir 488*cdf0e10cSrcweir Sending this notification also implies that user paint is 489*cdf0e10cSrcweir enabled. . 490*cdf0e10cSrcweir 491*cdf0e10cSrcweir @return true, if this event was processed by 492*cdf0e10cSrcweir anybody. If false is returned, no handler processed 493*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 494*cdf0e10cSrcweir */ 495*cdf0e10cSrcweir bool notifyUserPaintStrokeWidth( double rUserStrokeWidth ); 496*cdf0e10cSrcweir 497*cdf0e10cSrcweir 498*cdf0e10cSrcweir /** Notify a new user paint erase all ink mode 499*cdf0e10cSrcweir 500*cdf0e10cSrcweir Sending this notification also implies that user paint is 501*cdf0e10cSrcweir enabled. User paint denotes the feature to draw colored lines 502*cdf0e10cSrcweir on top of the slide content. 503*cdf0e10cSrcweir 504*cdf0e10cSrcweir @return true, if this event was processed by 505*cdf0e10cSrcweir anybody. If false is returned, no handler processed 506*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 507*cdf0e10cSrcweir */ 508*cdf0e10cSrcweir bool notifyEraseAllInk( bool const& rEraseAllInk ); 509*cdf0e10cSrcweir bool notifySwitchPenMode(); 510*cdf0e10cSrcweir bool notifySwitchEraserMode(); 511*cdf0e10cSrcweir bool notifyEraseInkWidth( sal_Int32 rEraseInkSize ); 512*cdf0e10cSrcweir 513*cdf0e10cSrcweir /** Notify that user paint is disabled 514*cdf0e10cSrcweir 515*cdf0e10cSrcweir User paint denotes the feature to draw colored lines on top of 516*cdf0e10cSrcweir the slide content. 517*cdf0e10cSrcweir 518*cdf0e10cSrcweir @return true, if this event was processed by 519*cdf0e10cSrcweir anybody. If false is returned, no handler processed 520*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 521*cdf0e10cSrcweir */ 522*cdf0e10cSrcweir bool notifyUserPaintDisabled(); 523*cdf0e10cSrcweir 524*cdf0e10cSrcweir /** Notify that the user requested the next effect. 525*cdf0e10cSrcweir 526*cdf0e10cSrcweir This requests the slideshow to display the next 527*cdf0e10cSrcweir effect, or move to the next slide, if none are left. 528*cdf0e10cSrcweir 529*cdf0e10cSrcweir @return true, if this event was processed by 530*cdf0e10cSrcweir anybody. If false is returned, no handler processed 531*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 532*cdf0e10cSrcweir */ 533*cdf0e10cSrcweir bool notifyNextEffect(); 534*cdf0e10cSrcweir 535*cdf0e10cSrcweir /** Notify that a new slide is about to be displayed 536*cdf0e10cSrcweir */ 537*cdf0e10cSrcweir bool notifySlideTransitionStarted(); 538*cdf0e10cSrcweir 539*cdf0e10cSrcweir /** Notify that a new slide has started 540*cdf0e10cSrcweir 541*cdf0e10cSrcweir This method is to be used from the Presentation object 542*cdf0e10cSrcweir to signal that a new slide is starting now. This will 543*cdf0e10cSrcweir invoke all registered slide start handlers. 544*cdf0e10cSrcweir 545*cdf0e10cSrcweir @return true, if this event was processed by 546*cdf0e10cSrcweir anybody. If false is returned, no handler processed 547*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 548*cdf0e10cSrcweir */ 549*cdf0e10cSrcweir bool notifySlideStartEvent(); 550*cdf0e10cSrcweir 551*cdf0e10cSrcweir /** Notify that a slide has ended 552*cdf0e10cSrcweir 553*cdf0e10cSrcweir This method is to be used from the Presentation object 554*cdf0e10cSrcweir to signal that a slide is ending now. This will invoke 555*cdf0e10cSrcweir all registered slide end handlers. 556*cdf0e10cSrcweir 557*cdf0e10cSrcweir @return true, if this event was processed by 558*cdf0e10cSrcweir anybody. If false is returned, no handler processed 559*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 560*cdf0e10cSrcweir */ 561*cdf0e10cSrcweir bool notifySlideEndEvent(); 562*cdf0e10cSrcweir 563*cdf0e10cSrcweir /** Notify that the given node enters its active duration. 564*cdf0e10cSrcweir 565*cdf0e10cSrcweir This method is to be used from the AnimationNode 566*cdf0e10cSrcweir objects to signal that the active duration 567*cdf0e10cSrcweir begins. This will invoke all registered animation 568*cdf0e10cSrcweir start handlers. 569*cdf0e10cSrcweir 570*cdf0e10cSrcweir @param rNode 571*cdf0e10cSrcweir Node which enters active duration. 572*cdf0e10cSrcweir 573*cdf0e10cSrcweir @return true, if this event was processed by 574*cdf0e10cSrcweir anybody. If false is returned, no handler processed 575*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 576*cdf0e10cSrcweir */ 577*cdf0e10cSrcweir bool notifyAnimationStart( const boost::shared_ptr<AnimationNode>& rNode ); 578*cdf0e10cSrcweir 579*cdf0e10cSrcweir /** Notify that the given node leaves its active duration. 580*cdf0e10cSrcweir 581*cdf0e10cSrcweir This method is to be used from the AnimationNode 582*cdf0e10cSrcweir objects to signal that the active duration 583*cdf0e10cSrcweir ends now. This will invoke all registered animation 584*cdf0e10cSrcweir end handlers. 585*cdf0e10cSrcweir 586*cdf0e10cSrcweir @param rNode 587*cdf0e10cSrcweir Node which leaves active duration. 588*cdf0e10cSrcweir 589*cdf0e10cSrcweir @return true, if this event was processed by 590*cdf0e10cSrcweir anybody. If false is returned, no handler processed 591*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 592*cdf0e10cSrcweir */ 593*cdf0e10cSrcweir bool notifyAnimationEnd( const boost::shared_ptr<AnimationNode>& rNode ); 594*cdf0e10cSrcweir 595*cdf0e10cSrcweir /** Notify that the slide animations sequence leaves its 596*cdf0e10cSrcweir active duration. 597*cdf0e10cSrcweir 598*cdf0e10cSrcweir @return true, if this event was processed by 599*cdf0e10cSrcweir anybody. If false is returned, no handler processed 600*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 601*cdf0e10cSrcweir */ 602*cdf0e10cSrcweir bool notifySlideAnimationsEnd(); 603*cdf0e10cSrcweir 604*cdf0e10cSrcweir /** Notify that for the given node, audio output has stopped. 605*cdf0e10cSrcweir 606*cdf0e10cSrcweir This method is to be used from the AnimationNode 607*cdf0e10cSrcweir objects to signal that audio playback has just 608*cdf0e10cSrcweir stopped. This will invoke all registered audio 609*cdf0e10cSrcweir stopped andlers. 610*cdf0e10cSrcweir 611*cdf0e10cSrcweir @param rNode 612*cdf0e10cSrcweir Node for which audio has stopped. 613*cdf0e10cSrcweir 614*cdf0e10cSrcweir @return true, if this event was processed by 615*cdf0e10cSrcweir anybody. If false is returned, no handler processed 616*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 617*cdf0e10cSrcweir */ 618*cdf0e10cSrcweir bool notifyAudioStopped( const boost::shared_ptr<AnimationNode>& rNode ); 619*cdf0e10cSrcweir 620*cdf0e10cSrcweir /** Notify that the show has entered or exited pause mode 621*cdf0e10cSrcweir 622*cdf0e10cSrcweir This method is to be used from the Presentation object 623*cdf0e10cSrcweir to signal that a slide is entering (bPauseShow=true) 624*cdf0e10cSrcweir or exiting (bPauseShow=false) pause mode. This will 625*cdf0e10cSrcweir invoke all registered slide end handlers. 626*cdf0e10cSrcweir 627*cdf0e10cSrcweir @return true, if this event was processed by 628*cdf0e10cSrcweir anybody. If false is returned, no handler processed 629*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 630*cdf0e10cSrcweir */ 631*cdf0e10cSrcweir bool notifyPauseMode( bool bPauseShow ); 632*cdf0e10cSrcweir 633*cdf0e10cSrcweir /** Notify that all audio has to be stoped. 634*cdf0e10cSrcweir 635*cdf0e10cSrcweir This method is used by XCommand nodes and all sound 636*cdf0e10cSrcweir playing nodes should listen for this command and 637*cdf0e10cSrcweir stop theire sounds when its fired. 638*cdf0e10cSrcweir 639*cdf0e10cSrcweir @return true, if this event was processed by 640*cdf0e10cSrcweir anybody. If false is returned, no handler processed 641*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 642*cdf0e10cSrcweir */ 643*cdf0e10cSrcweir bool notifyCommandStopAudio( const boost::shared_ptr<AnimationNode>& rNode ); 644*cdf0e10cSrcweir 645*cdf0e10cSrcweir /** Botifies that a hyperlink has been clicked. 646*cdf0e10cSrcweir 647*cdf0e10cSrcweir @return true, if this event was processed by 648*cdf0e10cSrcweir anybody. If false is returned, no handler processed 649*cdf0e10cSrcweir this event (and probably, nothing will happen at all) 650*cdf0e10cSrcweir */ 651*cdf0e10cSrcweir bool notifyHyperlinkClicked( ::rtl::OUString const& hyperLink ); 652*cdf0e10cSrcweir 653*cdf0e10cSrcweir private: 654*cdf0e10cSrcweir boost::scoped_ptr<EventMultiplexerImpl> mpImpl; 655*cdf0e10cSrcweir }; 656*cdf0e10cSrcweir 657*cdf0e10cSrcweir } // namespace internal 658*cdf0e10cSrcweir } // namespace Presentation 659*cdf0e10cSrcweir 660*cdf0e10cSrcweir #endif /* INCLUDED_SLIDESHOW_EVENTMULTIPLEXER_HXX */ 661*cdf0e10cSrcweir 662