update dev300-m58
[ooovba.git] / slideshow / source / inc / animatableshape.hxx
blobef75e253a74d9aae74d9e19b2f7aa736a0b8e76c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: animatableshape.hxx,v $
10 * $Revision: 1.6 $
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_ANIMATABLESHAPE_HXX
32 #define INCLUDED_SLIDESHOW_ANIMATABLESHAPE_HXX
34 #include <boost/shared_ptr.hpp>
36 #include "shape.hxx"
39 namespace slideshow
41 namespace internal
43 /** Represents an animatable shape.
45 This interface adds animation handling methods to a
46 shape. It allows transparent switching between
47 sprite-based viewing and static painting, depending on
48 whether animations are currently running.
50 class AnimatableShape : public Shape
52 public:
53 // Animation methods
54 //------------------------------------------------------------------
56 /** Notify the Shape that an animation starts now
58 This method enters animation mode on all registered
59 views.
61 @attention This method is supposed to be called only
62 from the LayerManager, since it might involve shifting
63 shapes between different layers (and removing this
64 shape from the background layer in the first place)
66 virtual void enterAnimationMode() = 0;
68 /** Notify the Shape that it is no longer animated
70 This methods requests the Shape to end animation mode
71 on all registered views, if called more or equal the
72 times enterAnimationMode() was called. That is, the
73 Shape only leaves animation mode, if all requested
74 enterAnimationMode() call sites have issued their
75 matching leaveAnimationMode().
77 @attention This method is supposed to be called only
78 from the LayerManager, since it might involve shifting
79 shapes between different layers (and adding this
80 shape to the background layer again)
82 virtual void leaveAnimationMode() = 0;
86 typedef ::boost::shared_ptr< AnimatableShape > AnimatableShapeSharedPtr;
91 #endif /* INCLUDED_SLIDESHOW_ANIMATABLESHAPE_HXX */