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: CustomAnimationDialog.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 _SD_CUSTOMANIMATIONDIALOG_HXX
32 #define _SD_CUSTOMANIMATIONDIALOG_HXX
34 #include "CustomAnimationEffect.hxx"
35 #include "CustomAnimationPreset.hxx"
36 #include <vcl/tabdlg.hxx>
37 #include <vcl/lstbox.hxx>
46 // --------------------------------------------------------------------
49 const sal_Int32 nHandleSound
= 0;
50 const sal_Int32 nHandleHasAfterEffect
= 1;
51 const sal_Int32 nHandleIterateType
= 2;
52 const sal_Int32 nHandleIterateInterval
= 3;
53 const sal_Int32 nHandleStart
= 4;
54 const sal_Int32 nHandleBegin
= 5;
55 const sal_Int32 nHandleDuration
= 6;
56 const sal_Int32 nHandleRepeat
= 7;
57 const sal_Int32 nHandleRewind
= 8;
58 const sal_Int32 nHandleEnd
= 9;
59 const sal_Int32 nHandleAfterEffectOnNextEffect
= 10;
60 const sal_Int32 nHandleDimColor
= 11;
61 const sal_Int32 nHandleMaxParaDepth
= 12;
62 const sal_Int32 nHandlePresetId
= 13;
63 const sal_Int32 nHandleProperty1Type
= 14;
64 const sal_Int32 nHandleProperty1Value
= 15;
65 const sal_Int32 nHandleProperty2Type
= 16;
66 const sal_Int32 nHandleProperty2Value
= 17;
68 const sal_Int32 nHandleAccelerate
= 18;
69 const sal_Int32 nHandleDecelerate
= 19;
70 const sal_Int32 nHandleAutoReverse
= 20;
71 const sal_Int32 nHandleTrigger
= 21;
73 const sal_Int32 nHandleHasText
= 22;
74 const sal_Int32 nHandleTextGrouping
= 23;
75 const sal_Int32 nHandleAnimateForm
= 24;
76 const sal_Int32 nHandleTextGroupingAuto
= 25;
77 const sal_Int32 nHandleTextReverse
= 26;
79 const sal_Int32 nHandleCurrentPage
= 27;
80 const sal_Int32 nHandleSoundURL
= 28;
81 const sal_Int32 nHandleSoundVolumne
= 29;
82 const sal_Int32 nHandleSoundEndAfterSlide
= 30;
84 const sal_Int32 nHandleCommand
= 31;
86 const sal_Int32 nHandleHasVisibleShape
= 32;
88 const sal_Int32 nPropertyTypeNone
= 0;
89 const sal_Int32 nPropertyTypeDirection
= 1;
90 const sal_Int32 nPropertyTypeSpokes
= 2;
91 const sal_Int32 nPropertyTypeFirstColor
= 3;
92 const sal_Int32 nPropertyTypeSecondColor
= 4;
93 const sal_Int32 nPropertyTypeZoom
= 5;
94 const sal_Int32 nPropertyTypeFillColor
= 6;
95 const sal_Int32 nPropertyTypeColorStyle
= 7;
96 const sal_Int32 nPropertyTypeFont
= 8;
97 const sal_Int32 nPropertyTypeCharHeight
= 9;
98 const sal_Int32 nPropertyTypeCharColor
= 10;
99 const sal_Int32 nPropertyTypeCharHeightStyle
= 11;
100 const sal_Int32 nPropertyTypeCharDecoration
= 12;
101 const sal_Int32 nPropertyTypeLineColor
= 13;
102 const sal_Int32 nPropertyTypeRotate
= 14;
103 const sal_Int32 nPropertyTypeColor
= 15;
104 const sal_Int32 nPropertyTypeAccelerate
= 16;
105 const sal_Int32 nPropertyTypeDecelerate
= 17;
106 const sal_Int32 nPropertyTypeAutoReverse
= 18;
107 const sal_Int32 nPropertyTypeTransparency
= 19;
108 const sal_Int32 nPropertyTypeFontStyle
= 20;
109 const sal_Int32 nPropertyTypeScale
= 21;
111 // --------------------------------------------------------------------
113 class PropertySubControl
116 PropertySubControl( sal_Int32 nType
) : mnType( nType
) {}
117 virtual ~PropertySubControl();
119 virtual ::com::sun::star::uno::Any
getValue() = 0;
120 virtual void setValue( const ::com::sun::star::uno::Any
& rValue
, const rtl::OUString
& rPresetId
) = 0;
122 virtual Control
* getControl() = 0;
124 static PropertySubControl
*
125 create( sal_Int32 nType
,
127 const ::com::sun::star::uno::Any
& rValue
,
128 const rtl::OUString
& rPresetId
,
129 const Link
& rModifyHdl
);
131 sal_Int32
getControlType() const { return mnType
; }
137 // --------------------------------------------------------------------
139 class PropertyControl
: public ListBox
142 PropertyControl( Window
* pParent
, const ResId
& rResId
);
145 void setSubControl( PropertySubControl
* pSubControl
);
146 PropertySubControl
* getSubControl() const { return mpSubControl
; }
148 virtual void Resize();
151 PropertySubControl
* mpSubControl
;
154 // --------------------------------------------------------------------
156 class CustomAnimationDurationTabPage
;
157 class CustomAnimationEffectTabPage
;
158 class CustomAnimationTextAnimTabPage
;
159 class STLPropertySet
;
161 class CustomAnimationDialog
: public TabDialog
164 CustomAnimationDialog( Window
* pParent
, STLPropertySet
* pSet
, USHORT nPage
= 0 );
165 ~CustomAnimationDialog();
167 STLPropertySet
* getDefaultSet() { return mpSet
; }
168 STLPropertySet
* getResultSet();
170 static STLPropertySet
* createDefaultSet();
173 STLPropertySet
* mpSet
;
174 STLPropertySet
* mpResultSet
;
176 CustomAnimationEffectPtr mpEffect
;
177 TabControl
* mpTabControl
;
178 OKButton
* mpOKButton
;
179 CancelButton
* mpCancelButton
;
180 HelpButton
* mpHelpButton
;
182 CustomAnimationDurationTabPage
* mpDurationTabPage
;
183 CustomAnimationEffectTabPage
* mpEffectTabPage
;
184 CustomAnimationTextAnimTabPage
* mpTextAnimTabPage
;
189 #endif // _SD_CUSTOMANIMATIONDIALOG_HXX