xref: /aoo4110/main/sd/source/ui/inc/tpaction.hxx (revision b1cdbd2c)
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 
25 #ifndef _SD_TPACTION_HXX
26 #define _SD_TPACTION_HXX
27 
28 #include <com/sun/star/presentation/ClickAction.hpp>
29 #include <com/sun/star/presentation/AnimationEffect.hpp>
30 #include <svtools/filedlg.hxx>
31 #include <vcl/group.hxx>
32 #include <vcl/fixed.hxx>
33 #include <svx/dlgctrl.hxx>
34 #include <sfx2/tabdlg.hxx>
35 #include <sfx2/basedlgs.hxx>
36 #include <sfx2/tabdlg.hxx>
37 #include "sdtreelb.hxx"
38 #include "anmdef.hxx"
39 
40 #include <vector>
41 
42 namespace sd {
43     class View;
44 }
45 class SdDrawDocument;
46 
47 /*************************************************************************
48 |*
49 |* Effekte-SingleTab-Dialog
50 |*
51 \************************************************************************/
52 class SdActionDlg : public SfxSingleTabDialog
53 {
54 private:
55 	const SfxItemSet&	rOutAttrs;
56 
57 public:
58 
59 			SdActionDlg( Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView );
~SdActionDlg()60 			~SdActionDlg() {};
61 };
62 
63 /*************************************************************************
64 |*
65 |* Interaktions-Tab-Page
66 |*
67 \************************************************************************/
68 
69 class SdTPAction : public SfxTabPage
70 {
71 private:
72 	FixedText			    aFtAction;				// always visible
73 	ListBox  			    aLbAction;
74 
75 	FixedText   		    aFtTree;				// jump destination controls
76 	SdPageObjsTLB  		    aLbTree;
77 	SdPageObjsTLB  		    aLbTreeDocument;
78     ListBox					aLbOLEAction;
79 
80 	FixedLine               aFlSeparator;
81 	Edit					aEdtSound;
82 	Edit                    aEdtBookmark;
83 	Edit                    aEdtDocument;
84 	Edit                    aEdtProgram;
85 	Edit                    aEdtMacro;
86 	PushButton              aBtnSearch;
87 	PushButton              aBtnSeek;
88 
89 	const SfxItemSet&	    rOutAttrs;
90 	const ::sd::View*		mpView;
91 	SdDrawDocument*		    mpDoc;
92 	XColorListSharedPtr     maColTab;
93 
94 	sal_Bool				    bTreeUpdated;
95 	List*   			    pCurrentActions;
96 	String				    aLastFile;
97     ::std::vector< long >   aVerbVector;
98 
99 	//------------------------------------
100 
101 	DECL_LINK( ClickSearchHdl, void * );
102 	DECL_LINK( ClickActionHdl, void * );
103 	DECL_LINK( SelectTreeHdl, void * );
104 	DECL_LINK( CheckFileHdl, void * );
105 
106 	void					UpdateTree();
107 	virtual void 			OpenFileDialog();
108 	::com::sun::star::presentation::ClickAction 	GetActualClickAction();
109 	void 					SetActualClickAction( ::com::sun::star::presentation::ClickAction eCA );
110 	void 					SetActualAnimationEffect( ::com::sun::star::presentation::AnimationEffect eAE );
111 	void 					SetEditText( String const & rStr );
112 	String					GetEditText( sal_Bool bURL = sal_False );
113 	sal_uInt16          		GetClickActionSdResId( ::com::sun::star::presentation::ClickAction eCA );
114 	sal_uInt16          		GetAnimationEffectSdResId( ::com::sun::star::presentation::AnimationEffect eAE );
115 
116 public:
117 			SdTPAction( Window* pParent, const SfxItemSet& rInAttrs );
118 			~SdTPAction();
119 
120 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
121 
122 	virtual sal_Bool FillItemSet( SfxItemSet& );
123 	virtual void Reset( const SfxItemSet & );
124 
125 	virtual void ActivatePage( const SfxItemSet& rSet );
126 	virtual int  DeactivatePage( SfxItemSet* pSet );
127 
128 	void    Construct();
129 
130 	void	SetView( const ::sd::View* pSdView );
131 
132 	using TabPage::ActivatePage;
133 	using TabPage::DeactivatePage;
134 };
135 
136 #endif		// _SD_TPACTION_HXX
137 
138