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_SUBSETTABLESHAPEMANAGER_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_INC_SUBSETTABLESHAPEMANAGER_HXX
23 #include "shapemanager.hxx"
24 #include "intrinsicanimationeventhandler.hxx"
27 /* Definition of SubsettableShapeManager interface */
29 namespace slideshow::internal
32 class AttributableShape
;
33 typedef ::std::shared_ptr
< AttributableShape
> AttributableShapeSharedPtr
;
35 /** SubsettableShapeManager interface
37 Implementers of this interface manage creation and
38 revocation of shape subsets. Shape subsets are shapes that
39 represent (and animate) only parts of an original's shape
42 class SubsettableShapeManager
: public ShapeManager
45 /** Query a subset of the given original shape
47 This method queries a new (but not necessarily unique)
48 shape, which displays only the given subset of the
49 original one. Calling this method multiple times with
50 the same original shape and DocTreeNode content always
51 returns the same shape.
53 Requesting a subset from an original shape leads to
54 the original shape ceasing to display the subsetted
55 content. In other words, shape content is always
56 displayed in exactly one shape.
59 The shape the subset is to be created for
62 The subset to display in the generated shape.
64 virtual AttributableShapeSharedPtr
getSubsetShape(
65 const AttributableShapeSharedPtr
& rOrigShape
,
66 const DocTreeNode
& rTreeNode
) = 0;
68 /** Revoke a previously queried subset shape.
70 With this method, a previously requested subset shape
71 is revoked again. If the last client revokes a given
72 subset, it will cease to be displayed, and the
73 original shape will again show the subset data.
76 The shape the subset was created from
79 The subset created from rOrigShape
81 virtual void revokeSubset(
82 const AttributableShapeSharedPtr
& rOrigShape
,
83 const AttributableShapeSharedPtr
& rSubsetShape
) = 0;
85 // Evil hackish way of getting intrinsic animation slide-wise
87 /** Register an event handler that will be called when
88 user paint parameters change.
91 Handler to call when a shape listener changes
93 virtual void addIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr
& rHandler
) = 0;
94 virtual void removeIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr
& rHandler
) = 0;
96 /** Notify that shape-intrinsic animations are now enabled.
98 virtual void notifyIntrinsicAnimationsEnabled() = 0;
100 /** Notify that shape-intrinsic animations are now disabled.
102 virtual void notifyIntrinsicAnimationsDisabled() = 0;
105 typedef ::std::shared_ptr
< SubsettableShapeManager
> SubsettableShapeManagerSharedPtr
;
109 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_SUBSETTABLESHAPEMANAGER_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */