1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef INCLUDED_SLIDESHOW_SHAPEMANAGER_HXX 29 #define INCLUDED_SLIDESHOW_SHAPEMANAGER_HXX 30 31 #include "disposable.hxx" 32 #include <com/sun/star/uno/Reference.hxx> 33 #include <boost/shared_ptr.hpp> 34 35 namespace com { namespace sun { namespace star { namespace drawing { 36 class XShape; 37 } } } } 38 39 /* Definition of ShapeManager interface */ 40 41 namespace slideshow 42 { 43 namespace internal 44 { 45 class HyperlinkArea; 46 class AnimatableShape; 47 class Shape; 48 49 /** ShapeManager interface 50 51 Implementers of this interface manage appearance and 52 animation of slideshow shapes. 53 */ 54 class ShapeManager : public Disposable 55 { 56 public: 57 /** Notify the ShapeManager that the given Shape starts an 58 animation now. 59 60 This method enters animation mode for the Shape. If 61 the shape is already in animation mode, the call is 62 counted, and the shape only leaves animation mode 63 after a corresponding number of leaveAnimationMode() 64 calls. 65 */ 66 virtual void enterAnimationMode( const boost::shared_ptr<AnimatableShape>& rShape ) = 0; 67 68 /** Notify the ShapeManager that the given Shape is no 69 longer animated. 70 71 When called a corresponding number of times as 72 enterAnimationMode() for a given shape, this methods 73 ends animation mode for the given Shape. It is illegal 74 to call this method more often than 75 enterAnimationMode(). 76 */ 77 virtual void leaveAnimationMode( const boost::shared_ptr<AnimatableShape>& rShape ) = 0; 78 79 /** Notify that a shape needs an update 80 81 This method notifies the ShapeManager that a shape 82 update is necessary. Use this if e.g. a running 83 animation changed the shape appearance. 84 85 @param rShape 86 Shape which needs an update 87 */ 88 virtual void notifyShapeUpdate( const boost::shared_ptr<Shape>& rShape ) = 0; 89 90 /** Lookup a Shape from an XShape model object 91 92 This method looks up the internal shape map for one 93 representing the given XShape. 94 95 @param xShape 96 The XShape object, for which the representing Shape 97 should be looked up. 98 */ 99 virtual boost::shared_ptr<Shape> lookupShape( 100 ::com::sun::star::uno::Reference< 101 ::com::sun::star::drawing::XShape > const & xShape ) const = 0; 102 103 /** Register given shape as a hyperlink target 104 105 @param rArea 106 Hyperlink sensitive area. Will participate in 107 hyperlink region lookup. Must be in absolute user 108 space coordinates. 109 */ 110 virtual void addHyperlinkArea( const boost::shared_ptr<HyperlinkArea>& rArea ) = 0; 111 112 /** Unregister given shape as a hyperlink target 113 114 @param rArea 115 Hyperlink sensitive area. Will cease to participate in 116 hyperlink region lookup. 117 */ 118 virtual void removeHyperlinkArea( const boost::shared_ptr<HyperlinkArea>& rArea ) = 0; 119 }; 120 121 typedef ::boost::shared_ptr< ShapeManager > ShapeManagerSharedPtr; 122 } 123 } 124 125 #endif /* INCLUDED_SLIDESHOW_SHAPEMANAGER_HXX */ 126