bump product version to 5.0.4.1
[LibreOffice.git] / slideshow / source / inc / subsettableshapemanager.hxx
blob42f58bb5a9c11e41dc33c606f2a9e096ad762237
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_SUBSETTABLESHAPEMANAGER_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_INC_SUBSETTABLESHAPEMANAGER_HXX
23 #include "shapemanager.hxx"
24 #include "intrinsicanimationeventhandler.hxx"
25 #include <boost/shared_ptr.hpp>
27 /* Definition of SubsettableShapeManager interface */
29 namespace slideshow
31 namespace internal
33 class DocTreeNode;
34 class AttributableShape;
36 /** SubsettableShapeManager interface
38 Implementers of this interface manage creation and
39 revocation of shape subsets. Shape subsets are shapes that
40 represent (and animate) only parts of an original's shape
41 content.
43 class SubsettableShapeManager : public ShapeManager
45 public:
46 /** Query a subset of the given original shape
48 This method queries a new (but not necessarily unique)
49 shape, which displays only the given subset of the
50 original one. Calling this method multiple times with
51 the same original shape and DocTreeNode content always
52 returns the same shape.
54 Requesting a subset from an original shape leads to
55 the original shape ceasing to display the subsetted
56 content. In other words, shape content is always
57 displayed in exactly one shape.
59 @param rOrigShape
60 The shape the subset is to be created for
62 @param rSubsetShape
63 The subset to display in the generated shape.
65 virtual boost::shared_ptr<AttributableShape> getSubsetShape(
66 const boost::shared_ptr<AttributableShape>& rOrigShape,
67 const DocTreeNode& rTreeNode ) = 0;
69 /** Revoke a previously queried subset shape.
71 With this method, a previously requested subset shape
72 is revoked again. If the last client revokes a given
73 subset, it will cease to be displayed, and the
74 original shape will again show the subset data.
76 @param rOrigShape
77 The shape the subset was created from
79 @param rSubsetShape
80 The subset created from rOrigShape
82 virtual void revokeSubset(
83 const boost::shared_ptr<AttributableShape>& rOrigShape,
84 const boost::shared_ptr<AttributableShape>& rSubsetShape ) = 0;
86 // Evil hackish way of getting intrinsic animation slide-wise
88 /** Register an event handler that will be called when
89 user paint parameters change.
91 @param rHandler
92 Handler to call when a shape listener changes
94 virtual void addIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr& rHandler ) = 0;
95 virtual void removeIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr& rHandler ) = 0;
97 /** Notify that shape-intrinsic animations are now enabled.
99 @return true, if this event was processed by
100 anybody. If false is returned, no handler processed
101 this event (and probably, nothing will happen at all)
103 virtual bool notifyIntrinsicAnimationsEnabled() = 0;
105 /** Notify that shape-intrinsic animations are now disabled.
107 @return true, if this event was processed by
108 anybody. If false is returned, no handler processed
109 this event (and probably, nothing will happen at all)
111 virtual bool notifyIntrinsicAnimationsDisabled() = 0;
114 typedef ::boost::shared_ptr< SubsettableShapeManager > SubsettableShapeManagerSharedPtr;
118 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_SUBSETTABLESHAPEMANAGER_HXX
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */