Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : :
20 : : #ifndef _SD_CUSTOMANIMATIONDIALOG_HXX
21 : : #define _SD_CUSTOMANIMATIONDIALOG_HXX
22 : :
23 : : #include "CustomAnimationEffect.hxx"
24 : : #include "CustomAnimationPreset.hxx"
25 : : #include <vcl/tabdlg.hxx>
26 : : #include <vcl/lstbox.hxx>
27 : :
28 : : class TabControl;
29 : : class OKButton;
30 : : class CancelButton;
31 : : class HelpButton;
32 : : namespace sd {
33 : :
34 : :
35 : : // --------------------------------------------------------------------
36 : :
37 : : // property handles
38 : : const sal_Int32 nHandleSound = 0;
39 : : const sal_Int32 nHandleHasAfterEffect = 1;
40 : : const sal_Int32 nHandleIterateType = 2;
41 : : const sal_Int32 nHandleIterateInterval = 3;
42 : : const sal_Int32 nHandleStart = 4;
43 : : const sal_Int32 nHandleBegin = 5;
44 : : const sal_Int32 nHandleDuration = 6;
45 : : const sal_Int32 nHandleRepeat = 7;
46 : : const sal_Int32 nHandleRewind = 8;
47 : : const sal_Int32 nHandleEnd = 9;
48 : : const sal_Int32 nHandleAfterEffectOnNextEffect = 10;
49 : : const sal_Int32 nHandleDimColor = 11;
50 : : const sal_Int32 nHandleMaxParaDepth = 12;
51 : : const sal_Int32 nHandlePresetId = 13;
52 : : const sal_Int32 nHandleProperty1Type = 14;
53 : : const sal_Int32 nHandleProperty1Value = 15;
54 : : const sal_Int32 nHandleProperty2Type = 16;
55 : : const sal_Int32 nHandleProperty2Value = 17;
56 : :
57 : : const sal_Int32 nHandleAccelerate = 18;
58 : : const sal_Int32 nHandleDecelerate = 19;
59 : : const sal_Int32 nHandleAutoReverse = 20;
60 : : const sal_Int32 nHandleTrigger = 21;
61 : :
62 : : const sal_Int32 nHandleHasText = 22;
63 : : const sal_Int32 nHandleTextGrouping = 23;
64 : : const sal_Int32 nHandleAnimateForm = 24;
65 : : const sal_Int32 nHandleTextGroupingAuto = 25;
66 : : const sal_Int32 nHandleTextReverse = 26;
67 : :
68 : : const sal_Int32 nHandleCurrentPage = 27;
69 : : const sal_Int32 nHandleSoundURL = 28;
70 : : const sal_Int32 nHandleSoundVolumne = 29;
71 : : const sal_Int32 nHandleSoundEndAfterSlide = 30;
72 : :
73 : : const sal_Int32 nHandleCommand = 31;
74 : :
75 : : const sal_Int32 nHandleHasVisibleShape = 32;
76 : :
77 : : const sal_Int32 nPropertyTypeNone = 0;
78 : : const sal_Int32 nPropertyTypeDirection = 1;
79 : : const sal_Int32 nPropertyTypeSpokes = 2;
80 : : const sal_Int32 nPropertyTypeFirstColor = 3;
81 : : const sal_Int32 nPropertyTypeSecondColor = 4;
82 : : const sal_Int32 nPropertyTypeZoom = 5;
83 : : const sal_Int32 nPropertyTypeFillColor = 6;
84 : : const sal_Int32 nPropertyTypeColorStyle = 7;
85 : : const sal_Int32 nPropertyTypeFont = 8;
86 : : const sal_Int32 nPropertyTypeCharHeight = 9;
87 : : const sal_Int32 nPropertyTypeCharColor = 10;
88 : : const sal_Int32 nPropertyTypeCharHeightStyle = 11;
89 : : const sal_Int32 nPropertyTypeCharDecoration = 12;
90 : : const sal_Int32 nPropertyTypeLineColor = 13;
91 : : const sal_Int32 nPropertyTypeRotate = 14;
92 : : const sal_Int32 nPropertyTypeColor = 15;
93 : : const sal_Int32 nPropertyTypeAccelerate = 16;
94 : : const sal_Int32 nPropertyTypeDecelerate = 17;
95 : : const sal_Int32 nPropertyTypeAutoReverse = 18;
96 : : const sal_Int32 nPropertyTypeTransparency = 19;
97 : : const sal_Int32 nPropertyTypeFontStyle = 20;
98 : : const sal_Int32 nPropertyTypeScale = 21;
99 : :
100 : : // --------------------------------------------------------------------
101 : :
102 : : class PropertySubControl
103 : : {
104 : : public:
105 : 0 : PropertySubControl( sal_Int32 nType ) : mnType( nType ) {}
106 : : virtual ~PropertySubControl();
107 : :
108 : : virtual ::com::sun::star::uno::Any getValue() = 0;
109 : : virtual void setValue( const ::com::sun::star::uno::Any& rValue, const rtl::OUString& rPresetId ) = 0;
110 : :
111 : : virtual Control* getControl() = 0;
112 : :
113 : : static PropertySubControl*
114 : : create( sal_Int32 nType,
115 : : ::Window* pParent,
116 : : const ::com::sun::star::uno::Any& rValue,
117 : : const rtl::OUString& rPresetId,
118 : : const Link& rModifyHdl );
119 : :
120 : 0 : sal_Int32 getControlType() const { return mnType; }
121 : :
122 : : protected:
123 : : sal_Int32 mnType;
124 : : };
125 : :
126 : : // --------------------------------------------------------------------
127 : :
128 : : class PropertyControl : public ListBox
129 : : {
130 : : public:
131 : : PropertyControl( Window* pParent, const ResId& rResId );
132 : : ~PropertyControl();
133 : :
134 : : void setSubControl( PropertySubControl* pSubControl );
135 : 0 : PropertySubControl* getSubControl() const { return mpSubControl; }
136 : :
137 : : virtual void Resize();
138 : :
139 : : private:
140 : : PropertySubControl* mpSubControl;
141 : : };
142 : :
143 : : // --------------------------------------------------------------------
144 : :
145 : : class CustomAnimationDurationTabPage;
146 : : class CustomAnimationEffectTabPage;
147 : : class CustomAnimationTextAnimTabPage;
148 : : class STLPropertySet;
149 : :
150 : : class CustomAnimationDialog : public TabDialog
151 : : {
152 : : public:
153 : : CustomAnimationDialog( Window* pParent, STLPropertySet* pSet, sal_uInt16 nPage = 0 );
154 : : ~CustomAnimationDialog();
155 : :
156 : : STLPropertySet* getDefaultSet() { return mpSet; }
157 : : STLPropertySet* getResultSet();
158 : :
159 : : static STLPropertySet* createDefaultSet();
160 : :
161 : : private:
162 : : STLPropertySet* mpSet;
163 : : STLPropertySet* mpResultSet;
164 : :
165 : : CustomAnimationEffectPtr mpEffect;
166 : : TabControl* mpTabControl;
167 : : OKButton* mpOKButton;
168 : : CancelButton* mpCancelButton;
169 : : HelpButton* mpHelpButton;
170 : :
171 : : CustomAnimationDurationTabPage* mpDurationTabPage;
172 : : CustomAnimationEffectTabPage* mpEffectTabPage;
173 : : CustomAnimationTextAnimTabPage* mpTextAnimTabPage;
174 : : };
175 : :
176 : : }
177 : :
178 : : #endif // _SD_CUSTOMANIMATIONDIALOG_HXX
179 : :
180 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|