1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SD_CUSTOMANIMATIONCREATEDIALOG_HXX
25 #define _SD_CUSTOMANIMATIONCREATEDIALOG_HXX
26 
27 #include "CustomAnimationPreset.hxx"
28 #include <vcl/tabdlg.hxx>
29 
30 enum PathKind { NONE, CURVE, POLYGON, FREEFORM };
31 
32 class TabControl;
33 class OKButton;
34 class CancelButton;
35 class HelpButton;
36 
37 namespace sd {
38 
39 // --------------------------------------------------------------------
40 
41 class CustomAnimationCreateTabPage;
42 class CustomAnimationPane;
43 
44 class CustomAnimationCreateDialog : public TabDialog
45 {
46 	friend class CustomAnimationCreateTabPage;
47 public:
48 	CustomAnimationCreateDialog( ::Window* pParent, CustomAnimationPane* pPane, const std::vector< ::com::sun::star::uno::Any >& rTargets, bool bHasText, const ::rtl::OUString& rsPresetId, double fDuration );
49 	~CustomAnimationCreateDialog();
50 
51 	PathKind getCreatePathKind() const;
52 	CustomAnimationPresetPtr getSelectedPreset() const;
53 	double getSelectedDuration() const;
54 
55 private:
56 	CustomAnimationCreateTabPage* getCurrentPage() const;
57 	void preview( const CustomAnimationPresetPtr& pPreset ) const;
58     void setPosition();
59     void storePosition();
60 
61 	DECL_LINK( implActivatePagekHdl, Control* );
62 	DECL_LINK( implDeactivatePagekHdl, Control* );
63 
64 private:
65 	CustomAnimationPane* mpPane;
66 	const std::vector< ::com::sun::star::uno::Any >& mrTargets;
67 
68 	double mfDuration;
69 	bool mbIsPreview;
70 
71 	TabControl* mpTabControl;
72 	OKButton* mpOKButton;
73 	CancelButton* mpCancelButton;
74 	HelpButton* mpHelpButton;
75 
76 	CustomAnimationCreateTabPage* mpTabPages[5];
77 };
78 
79 }
80 
81 #endif // _SD_CUSTOMANIMATIONCREATEDIALOG_HXX
82