1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: subsettableshapemanager.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_SLIDESHOW_SUBSETTABLESHAPEMANAGER_HXX
32 #define INCLUDED_SLIDESHOW_SUBSETTABLESHAPEMANAGER_HXX
34 #include "shapemanager.hxx"
35 #include "intrinsicanimationeventhandler.hxx"
36 #include <boost/shared_ptr.hpp>
38 /* Definition of SubsettableShapeManager interface */
45 class AttributableShape
;
47 /** SubsettableShapeManager interface
49 Implementers of this interface manage creation and
50 revocation of shape subsets. Shape subsets are shapes that
51 represent (and animate) only parts of an original's shape
54 class SubsettableShapeManager
: public ShapeManager
57 /** Query a subset of the given original shape
59 This method queries a new (but not necessarily unique)
60 shape, which displays only the given subset of the
61 original one. Calling this method multiple times with
62 the same original shape and DocTreeNode content always
63 returns the same shape.
65 Requesting a subset from an original shape leads to
66 the original shape ceasing to display the subsetted
67 content. In other words, shape content is always
68 displayed in exactly one shape.
71 The shape the subset is to be created for
74 The subset to display in the generated shape.
76 virtual boost::shared_ptr
<AttributableShape
> getSubsetShape(
77 const boost::shared_ptr
<AttributableShape
>& rOrigShape
,
78 const DocTreeNode
& rTreeNode
) = 0;
80 /** Revoke a previously queried subset shape.
82 With this method, a previously requested subset shape
83 is revoked again. If the last client revokes a given
84 subset, it will cease to be displayed, and the
85 original shape will again show the subset data.
88 The shape the subset was created from
91 The subset created from rOrigShape
93 virtual void revokeSubset(
94 const boost::shared_ptr
<AttributableShape
>& rOrigShape
,
95 const boost::shared_ptr
<AttributableShape
>& rSubsetShape
) = 0;
97 // Evil hackish way of getting intrinsic animation slide-wise
99 /** Register an event handler that will be called when
100 user paint parameters change.
103 Handler to call when a shape listener changes
105 virtual void addIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr
& rHandler
) = 0;
106 virtual void removeIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr
& rHandler
) = 0;
108 /** Notify that shape-intrinsic animations are now enabled.
110 @return true, if this event was processed by
111 anybody. If false is returned, no handler processed
112 this event (and probably, nothing will happen at all)
114 virtual bool notifyIntrinsicAnimationsEnabled() = 0;
116 /** Notify that shape-intrinsic animations are now disabled.
118 @return true, if this event was processed by
119 anybody. If false is returned, no handler processed
120 this event (and probably, nothing will happen at all)
122 virtual bool notifyIntrinsicAnimationsDisabled() = 0;
125 typedef ::boost::shared_ptr
< SubsettableShapeManager
> SubsettableShapeManagerSharedPtr
;
129 #endif /* INCLUDED_SLIDESHOW_SUBSETTABLESHAPEMANAGER_HXX */