bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / animations / CustomAnimationDialog.hxx
blob4a082c36b78090c8f13f67ea37e94fdce59c3803
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_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONDIALOG_HXX
21 #define INCLUDED_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONDIALOG_HXX
23 #include "CustomAnimationEffect.hxx"
24 #include "CustomAnimationPreset.hxx"
25 #include <vcl/tabdlg.hxx>
26 #include <vcl/lstbox.hxx>
28 class TabControl;
29 class OKButton;
30 class CancelButton;
31 class HelpButton;
32 namespace sd {
34 // property handles
35 const sal_Int32 nHandleSound = 0;
36 const sal_Int32 nHandleHasAfterEffect = 1;
37 const sal_Int32 nHandleIterateType = 2;
38 const sal_Int32 nHandleIterateInterval = 3;
39 const sal_Int32 nHandleStart = 4;
40 const sal_Int32 nHandleBegin = 5;
41 const sal_Int32 nHandleDuration = 6;
42 const sal_Int32 nHandleRepeat = 7;
43 const sal_Int32 nHandleRewind = 8;
44 const sal_Int32 nHandleEnd = 9;
45 const sal_Int32 nHandleAfterEffectOnNextEffect = 10;
46 const sal_Int32 nHandleDimColor = 11;
47 const sal_Int32 nHandleMaxParaDepth = 12;
48 const sal_Int32 nHandlePresetId = 13;
49 const sal_Int32 nHandleProperty1Type = 14;
50 const sal_Int32 nHandleProperty1Value = 15;
51 const sal_Int32 nHandleProperty2Type = 16;
52 const sal_Int32 nHandleProperty2Value = 17;
54 const sal_Int32 nHandleAccelerate = 18;
55 const sal_Int32 nHandleDecelerate = 19;
56 const sal_Int32 nHandleAutoReverse = 20;
57 const sal_Int32 nHandleTrigger = 21;
59 const sal_Int32 nHandleHasText = 22;
60 const sal_Int32 nHandleTextGrouping = 23;
61 const sal_Int32 nHandleAnimateForm = 24;
62 const sal_Int32 nHandleTextGroupingAuto = 25;
63 const sal_Int32 nHandleTextReverse = 26;
65 const sal_Int32 nHandleCurrentPage = 27;
66 const sal_Int32 nHandleSoundURL = 28;
67 const sal_Int32 nHandleSoundVolumne = 29;
68 const sal_Int32 nHandleSoundEndAfterSlide = 30;
70 const sal_Int32 nHandleCommand = 31;
72 const sal_Int32 nHandleHasVisibleShape = 32;
74 const sal_Int32 nPropertyTypeNone = 0;
75 const sal_Int32 nPropertyTypeDirection = 1;
76 const sal_Int32 nPropertyTypeSpokes = 2;
77 const sal_Int32 nPropertyTypeFirstColor = 3;
78 const sal_Int32 nPropertyTypeSecondColor = 4;
79 const sal_Int32 nPropertyTypeZoom = 5;
80 const sal_Int32 nPropertyTypeFillColor = 6;
81 const sal_Int32 nPropertyTypeColorStyle = 7;
82 const sal_Int32 nPropertyTypeFont = 8;
83 const sal_Int32 nPropertyTypeCharHeight = 9;
84 const sal_Int32 nPropertyTypeCharColor = 10;
85 const sal_Int32 nPropertyTypeCharHeightStyle = 11;
86 const sal_Int32 nPropertyTypeCharDecoration = 12;
87 const sal_Int32 nPropertyTypeLineColor = 13;
88 const sal_Int32 nPropertyTypeRotate = 14;
89 const sal_Int32 nPropertyTypeColor = 15;
90 const sal_Int32 nPropertyTypeAccelerate = 16;
91 const sal_Int32 nPropertyTypeDecelerate = 17;
92 const sal_Int32 nPropertyTypeAutoReverse = 18;
93 const sal_Int32 nPropertyTypeTransparency = 19;
94 const sal_Int32 nPropertyTypeFontStyle = 20;
95 const sal_Int32 nPropertyTypeScale = 21;
97 class PropertySubControl
99 public:
100 PropertySubControl( sal_Int32 nType ) : mnType( nType ) {}
101 virtual ~PropertySubControl();
103 virtual ::com::sun::star::uno::Any getValue() = 0;
104 virtual void setValue( const ::com::sun::star::uno::Any& rValue, const OUString& rPresetId ) = 0;
106 virtual Control* getControl() = 0;
108 static PropertySubControl*
109 create( sal_Int32 nType,
110 vcl::Window* pParent,
111 const ::com::sun::star::uno::Any& rValue,
112 const OUString& rPresetId,
113 const Link<>& rModifyHdl );
115 sal_Int32 getControlType() const { return mnType; }
117 protected:
118 sal_Int32 mnType;
121 class PropertyControl : public ListBox
123 public:
124 PropertyControl( vcl::Window* pParent );
125 virtual ~PropertyControl();
126 virtual void dispose() SAL_OVERRIDE;
128 void setSubControl( PropertySubControl* pSubControl );
129 PropertySubControl* getSubControl() const { return mpSubControl; }
131 virtual void Resize() SAL_OVERRIDE;
133 private:
134 PropertySubControl* mpSubControl;
137 class CustomAnimationDurationTabPage;
138 class CustomAnimationEffectTabPage;
139 class CustomAnimationTextAnimTabPage;
140 class STLPropertySet;
142 class CustomAnimationDialog : public TabDialog
144 public:
145 CustomAnimationDialog(vcl::Window* pParent, STLPropertySet* pSet, const OString& Page = OString());
146 virtual ~CustomAnimationDialog();
147 virtual void dispose() SAL_OVERRIDE;
149 STLPropertySet* getDefaultSet() { return mpSet; }
150 STLPropertySet* getResultSet();
152 static STLPropertySet* createDefaultSet();
154 private:
155 STLPropertySet* mpSet;
156 STLPropertySet* mpResultSet;
158 CustomAnimationEffectPtr mpEffect;
159 VclPtr<TabControl> mpTabControl;
161 VclPtr<CustomAnimationDurationTabPage> mpDurationTabPage;
162 VclPtr<CustomAnimationEffectTabPage> mpEffectTabPage;
163 VclPtr<CustomAnimationTextAnimTabPage> mpTextAnimTabPage;
168 #endif // INCLUDED_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONDIALOG_HXX
170 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */