1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: shapemanager.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_SLIDESHOW_SHAPEMANAGER_HXX
32 #define INCLUDED_SLIDESHOW_SHAPEMANAGER_HXX
34 #include "disposable.hxx"
35 #include <com/sun/star/uno/Reference.hxx>
36 #include <boost/shared_ptr.hpp>
38 namespace com
{ namespace sun
{ namespace star
{ namespace drawing
{
42 /* Definition of ShapeManager interface */
49 class AnimatableShape
;
52 /** ShapeManager interface
54 Implementers of this interface manage appearance and
55 animation of slideshow shapes.
57 class ShapeManager
: public Disposable
60 /** Notify the ShapeManager that the given Shape starts an
63 This method enters animation mode for the Shape. If
64 the shape is already in animation mode, the call is
65 counted, and the shape only leaves animation mode
66 after a corresponding number of leaveAnimationMode()
69 virtual void enterAnimationMode( const boost::shared_ptr
<AnimatableShape
>& rShape
) = 0;
71 /** Notify the ShapeManager that the given Shape is no
74 When called a corresponding number of times as
75 enterAnimationMode() for a given shape, this methods
76 ends animation mode for the given Shape. It is illegal
77 to call this method more often than
80 virtual void leaveAnimationMode( const boost::shared_ptr
<AnimatableShape
>& rShape
) = 0;
82 /** Notify that a shape needs an update
84 This method notifies the ShapeManager that a shape
85 update is necessary. Use this if e.g. a running
86 animation changed the shape appearance.
89 Shape which needs an update
91 virtual void notifyShapeUpdate( const boost::shared_ptr
<Shape
>& rShape
) = 0;
93 /** Lookup a Shape from an XShape model object
95 This method looks up the internal shape map for one
96 representing the given XShape.
99 The XShape object, for which the representing Shape
102 virtual boost::shared_ptr
<Shape
> lookupShape(
103 ::com::sun::star::uno::Reference
<
104 ::com::sun::star::drawing::XShape
> const & xShape
) const = 0;
106 /** Register given shape as a hyperlink target
109 Hyperlink sensitive area. Will participate in
110 hyperlink region lookup. Must be in absolute user
113 virtual void addHyperlinkArea( const boost::shared_ptr
<HyperlinkArea
>& rArea
) = 0;
115 /** Unregister given shape as a hyperlink target
118 Hyperlink sensitive area. Will cease to participate in
119 hyperlink region lookup.
121 virtual void removeHyperlinkArea( const boost::shared_ptr
<HyperlinkArea
>& rArea
) = 0;
124 typedef ::boost::shared_ptr
< ShapeManager
> ShapeManagerSharedPtr
;
128 #endif /* INCLUDED_SLIDESHOW_SHAPEMANAGER_HXX */