LibreOffice Module slideshow (master) 1
shapemanager.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SLIDESHOW_SOURCE_INC_SHAPEMANAGER_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_INC_SHAPEMANAGER_HXX
22
23#include "disposable.hxx"
24#include <com/sun/star/uno/Reference.hxx>
25#include <memory>
26#include <unordered_map>
27#include "tools.hxx"
28
29namespace com::sun::star::drawing { class XShape; }
30
31/* Definition of ShapeManager interface */
32
33namespace slideshow::internal
34 {
35 class HyperlinkArea;
36 class AnimatableShape;
37 class Shape;
38 typedef std::unordered_map<
39 css::uno::Reference< css::drawing::XShape >,
41 hash< css::uno::Reference< css::drawing::XShape > >
43 typedef ::std::shared_ptr< AnimatableShape > AnimatableShapeSharedPtr;
44 typedef ::std::shared_ptr< Shape > ShapeSharedPtr;
45 typedef std::shared_ptr< HyperlinkArea > HyperlinkAreaSharedPtr;
46
52 class ShapeManager : public Disposable
53 {
54 public:
64 virtual void enterAnimationMode( const AnimatableShapeSharedPtr& rShape ) = 0;
65
75 virtual void leaveAnimationMode( const AnimatableShapeSharedPtr& rShape ) = 0;
76
86 virtual void notifyShapeUpdate( const ShapeSharedPtr& rShape ) = 0;
87
98 css::uno::Reference< css::drawing::XShape > const & xShape ) const = 0;
99
105 virtual const XShapeToShapeMap& getXShapeToShapeMap() const = 0;
106
114 virtual void addHyperlinkArea( const HyperlinkAreaSharedPtr& rArea ) = 0;
115 };
116
117 typedef ::std::shared_ptr< ShapeManager > ShapeManagerSharedPtr;
118
119}
120
121#endif // INCLUDED_SLIDESHOW_SOURCE_INC_SHAPEMANAGER_HXX
122
123/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Disposable interface.
Definition: disposable.hxx:48
ShapeManager interface.
virtual void enterAnimationMode(const AnimatableShapeSharedPtr &rShape)=0
Notify the ShapeManager that the given Shape starts an animation now.
virtual void leaveAnimationMode(const AnimatableShapeSharedPtr &rShape)=0
Notify the ShapeManager that the given Shape is no longer animated.
virtual ShapeSharedPtr lookupShape(css::uno::Reference< css::drawing::XShape > const &xShape) const =0
Lookup a Shape from an XShape model object.
virtual const XShapeToShapeMap & getXShapeToShapeMap() const =0
Get a map that maps all Shapes with their XShape reference as the key.
virtual void notifyShapeUpdate(const ShapeSharedPtr &rShape)=0
Notify that a shape needs an update.
virtual void addHyperlinkArea(const HyperlinkAreaSharedPtr &rArea)=0
Register given shape as a hyperlink target.
::std::shared_ptr< AnimatableShape > AnimatableShapeSharedPtr
std::shared_ptr< HyperlinkArea > HyperlinkAreaSharedPtr
std::unordered_map< css::uno::Reference< css::drawing::XShape >, ShapeSharedPtr, hash< css::uno::Reference< css::drawing::XShape > > > XShapeToShapeMap
A hash map which maps the XShape to the corresponding Shape object.
std::shared_ptr< ShapeManager > ShapeManagerSharedPtr
Definition: box2dtools.hxx:23
::std::shared_ptr< Shape > ShapeSharedPtr
Shape