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