Bump version to 6.0-36
[LibreOffice.git] / slideshow / source / inc / shapemanager.hxx
blobc2c72e231f7665acbafbb4f84c1c67e2d7cfc0c1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 <memory>
27 namespace com { namespace sun { namespace star { namespace drawing {
28 class XShape;
29 } } } }
31 /* Definition of ShapeManager interface */
33 namespace slideshow
35 namespace internal
37 class HyperlinkArea;
38 class AnimatableShape;
39 class Shape;
41 /** ShapeManager interface
43 Implementers of this interface manage appearance and
44 animation of slideshow shapes.
46 class ShapeManager : public Disposable
48 public:
49 /** Notify the ShapeManager that the given Shape starts an
50 animation now.
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()
56 calls.
58 virtual void enterAnimationMode( const std::shared_ptr<AnimatableShape>& rShape ) = 0;
60 /** Notify the ShapeManager that the given Shape is no
61 longer animated.
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
67 enterAnimationMode().
69 virtual void leaveAnimationMode( const std::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.
77 @param rShape
78 Shape which needs an update
80 virtual void notifyShapeUpdate( const std::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.
87 @param xShape
88 The XShape object, for which the representing Shape
89 should be looked up.
91 virtual std::shared_ptr<Shape> lookupShape(
92 css::uno::Reference< css::drawing::XShape > const & xShape ) const = 0;
94 /** Register given shape as a hyperlink target
96 @param rArea
97 Hyperlink sensitive area. Will participate in
98 hyperlink region lookup. Must be in absolute user
99 space coordinates.
101 virtual void addHyperlinkArea( const std::shared_ptr<HyperlinkArea>& rArea ) = 0;
104 typedef ::std::shared_ptr< ShapeManager > ShapeManagerSharedPtr;
108 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_SHAPEMANAGER_HXX
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */