Bump version to 6.0-36
[LibreOffice.git] / slideshow / source / inc / animationfactory.hxx
blob1b9891339e5d56cddd8dc2039f623a61d57ac52f
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_ANIMATIONFACTORY_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_INC_ANIMATIONFACTORY_HXX
24 #include "numberanimation.hxx"
25 #include "enumanimation.hxx"
26 #include "coloranimation.hxx"
27 #include "stringanimation.hxx"
28 #include "boolanimation.hxx"
29 #include "pairanimation.hxx"
31 #include "shape.hxx"
32 #include "shapeattributelayer.hxx"
33 #include "shapemanager.hxx"
35 /* Definition of AnimationFactory class */
37 namespace slideshow
39 namespace internal
42 /** Factory for Animation objects
44 Given a SMIL XAnimate node, this factory generates the
45 appropriate Animation object from that, which will modify
46 the attribute as specified.
48 namespace AnimationFactory
50 /** Classifies the attribute name.
52 This enum maps names to appropriate factory methods.
54 enum AttributeClass
56 /// Unknown, prolly invalid name
57 CLASS_UNKNOWN_PROPERTY,
58 /// Use createNumberPropertyAnimation
59 CLASS_NUMBER_PROPERTY,
60 /// Use createEnumPropertyAnimation
61 CLASS_ENUM_PROPERTY,
62 /// Use createColorPropertyAnimation
63 CLASS_COLOR_PROPERTY,
64 /// Use createStringPropertyAnimation
65 CLASS_STRING_PROPERTY,
66 /// Use createBoolPropertyAnimation
67 CLASS_BOOL_PROPERTY
70 AttributeClass classifyAttributeName( const OUString& rAttrName );
72 /// Collection of flags common to all factory methods
73 enum FactoryFlags
75 /** Don't call enter/leaveAnimation for the Shape.
77 This is useful for set effects
79 FLAG_NO_SPRITE = 1
82 NumberAnimationSharedPtr createNumberPropertyAnimation( const OUString& rAttrName,
83 const AnimatableShapeSharedPtr& rShape,
84 const ShapeManagerSharedPtr& rShapeManager,
85 const ::basegfx::B2DVector& rSlideSize,
86 int nFlags=0 );
88 EnumAnimationSharedPtr createEnumPropertyAnimation( const OUString& rAttrName,
89 const AnimatableShapeSharedPtr& rShape,
90 const ShapeManagerSharedPtr& rShapeManager,
91 const ::basegfx::B2DVector& rSlideSize,
92 int nFlags );
94 ColorAnimationSharedPtr createColorPropertyAnimation( const OUString& rAttrName,
95 const AnimatableShapeSharedPtr& rShape,
96 const ShapeManagerSharedPtr& rShapeManager,
97 const ::basegfx::B2DVector& rSlideSize,
98 int nFlags=0 );
100 /** Create scale or move animation
102 @param nTransformType
103 Must be one of
104 animations::AnimationTransformType::TRANSLATE or
105 animations::AnimationTransformType::SCALE.
107 PairAnimationSharedPtr createPairPropertyAnimation( const AnimatableShapeSharedPtr& rShape,
108 const ShapeManagerSharedPtr& rShapeManager,
109 const ::basegfx::B2DVector& rSlideSize,
110 sal_Int16 nTransformType,
111 int nFlags );
113 StringAnimationSharedPtr createStringPropertyAnimation( const OUString& rAttrName,
114 const AnimatableShapeSharedPtr& rShape,
115 const ShapeManagerSharedPtr& rShapeManager,
116 const ::basegfx::B2DVector& rSlideSize,
117 int nFlags );
119 BoolAnimationSharedPtr createBoolPropertyAnimation( const OUString& rAttrName,
120 const AnimatableShapeSharedPtr& rShape,
121 const ShapeManagerSharedPtr& rShapeManager,
122 const ::basegfx::B2DVector& rSlideSize,
123 int nFlags );
125 NumberAnimationSharedPtr createPathMotionAnimation( const OUString& rSVGDPath,
126 sal_Int16 nAdditive,
127 const AnimatableShapeSharedPtr& rShape,
128 const ShapeManagerSharedPtr& rShapeManager,
129 const ::basegfx::B2DVector& rSlideSize,
130 int nFlags);
135 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_ANIMATIONFACTORY_HXX
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */