1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_SHAPEMANAGER_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_INC_SHAPEMANAGER_HXX
23 #include "disposable.hxx"
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <boost/shared_ptr.hpp>
27 namespace com
{ namespace sun
{ namespace star
{ namespace drawing
{
31 /* Definition of ShapeManager interface */
38 class AnimatableShape
;
41 /** ShapeManager interface
43 Implementers of this interface manage appearance and
44 animation of slideshow shapes.
46 class ShapeManager
: public Disposable
49 /** Notify the ShapeManager that the given Shape starts an
52 This method enters animation mode for the Shape. If
53 the shape is already in animation mode, the call is
54 counted, and the shape only leaves animation mode
55 after a corresponding number of leaveAnimationMode()
58 virtual void enterAnimationMode( const boost::shared_ptr
<AnimatableShape
>& rShape
) = 0;
60 /** Notify the ShapeManager that the given Shape is no
63 When called a corresponding number of times as
64 enterAnimationMode() for a given shape, this methods
65 ends animation mode for the given Shape. It is illegal
66 to call this method more often than
69 virtual void leaveAnimationMode( const boost::shared_ptr
<AnimatableShape
>& rShape
) = 0;
71 /** Notify that a shape needs an update
73 This method notifies the ShapeManager that a shape
74 update is necessary. Use this if e.g. a running
75 animation changed the shape appearance.
78 Shape which needs an update
80 virtual void notifyShapeUpdate( const boost::shared_ptr
<Shape
>& rShape
) = 0;
82 /** Lookup a Shape from an XShape model object
84 This method looks up the internal shape map for one
85 representing the given XShape.
88 The XShape object, for which the representing Shape
91 virtual boost::shared_ptr
<Shape
> lookupShape(
92 ::com::sun::star::uno::Reference
<
93 ::com::sun::star::drawing::XShape
> const & xShape
) const = 0;
95 /** Register given shape as a hyperlink target
98 Hyperlink sensitive area. Will participate in
99 hyperlink region lookup. Must be in absolute user
102 virtual void addHyperlinkArea( const boost::shared_ptr
<HyperlinkArea
>& rArea
) = 0;
104 /** Unregister given shape as a hyperlink target
107 Hyperlink sensitive area. Will cease to participate in
108 hyperlink region lookup.
110 virtual void removeHyperlinkArea( const boost::shared_ptr
<HyperlinkArea
>& rArea
) = 0;
113 typedef ::boost::shared_ptr
< ShapeManager
> ShapeManagerSharedPtr
;
117 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_SHAPEMANAGER_HXX
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */