xref: /trunk/main/sd/source/ui/inc/tpaction.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 
29 #ifndef _SD_TPACTION_HXX
30 #define _SD_TPACTION_HXX
31 
32 #include <com/sun/star/presentation/ClickAction.hpp>
33 #include <com/sun/star/presentation/AnimationEffect.hpp>
34 #include <svtools/filedlg.hxx>
35 #include <vcl/group.hxx>
36 #include <vcl/fixed.hxx>
37 #include <svx/dlgctrl.hxx>
38 #include <sfx2/tabdlg.hxx>
39 #include <sfx2/basedlgs.hxx>
40 #include <sfx2/tabdlg.hxx>
41 #include "sdtreelb.hxx"
42 #include "anmdef.hxx"
43 
44 #include <vector>
45 
46 namespace sd {
47     class View;
48 }
49 class SdDrawDocument;
50 
51 /*************************************************************************
52 |*
53 |* Effekte-SingleTab-Dialog
54 |*
55 \************************************************************************/
56 class SdActionDlg : public SfxSingleTabDialog
57 {
58 private:
59 	const SfxItemSet&	rOutAttrs;
60 
61 public:
62 
63 			SdActionDlg( Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView );
64 			~SdActionDlg() {};
65 };
66 
67 /*************************************************************************
68 |*
69 |* Interaktions-Tab-Page
70 |*
71 \************************************************************************/
72 
73 class SdTPAction : public SfxTabPage
74 {
75 private:
76 	FixedText			    aFtAction;				// always visible
77 	ListBox  			    aLbAction;
78 
79 	FixedText   		    aFtTree;				// jump destination controls
80 	SdPageObjsTLB  		    aLbTree;
81 	SdPageObjsTLB  		    aLbTreeDocument;
82     ListBox					aLbOLEAction;
83 
84 	FixedLine               aFlSeparator;
85 	Edit					aEdtSound;
86 	Edit                    aEdtBookmark;
87 	Edit                    aEdtDocument;
88 	Edit                    aEdtProgram;
89 	Edit                    aEdtMacro;
90 	PushButton              aBtnSearch;
91 	PushButton              aBtnSeek;
92 
93 	const SfxItemSet&	    rOutAttrs;
94 	const ::sd::View*		mpView;
95 	SdDrawDocument*		    mpDoc;
96 	XColorTable*		    pColTab;
97 
98 	sal_Bool				    bTreeUpdated;
99 	List*   			    pCurrentActions;
100 	String				    aLastFile;
101     ::std::vector< long >   aVerbVector;
102 
103 	//------------------------------------
104 
105 	DECL_LINK( ClickSearchHdl, void * );
106 	DECL_LINK( ClickActionHdl, void * );
107 	DECL_LINK( SelectTreeHdl, void * );
108 	DECL_LINK( CheckFileHdl, void * );
109 
110 	void					UpdateTree();
111 	virtual void 			OpenFileDialog();
112 	::com::sun::star::presentation::ClickAction 	GetActualClickAction();
113 	void 					SetActualClickAction( ::com::sun::star::presentation::ClickAction eCA );
114 	void 					SetActualAnimationEffect( ::com::sun::star::presentation::AnimationEffect eAE );
115 	void 					SetEditText( String const & rStr );
116 	String					GetEditText( sal_Bool bURL = sal_False );
117 	sal_uInt16          		GetClickActionSdResId( ::com::sun::star::presentation::ClickAction eCA );
118 	sal_uInt16          		GetAnimationEffectSdResId( ::com::sun::star::presentation::AnimationEffect eAE );
119 
120 public:
121 			SdTPAction( Window* pParent, const SfxItemSet& rInAttrs );
122 			~SdTPAction();
123 
124 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
125 
126 	virtual sal_Bool FillItemSet( SfxItemSet& );
127 	virtual void Reset( const SfxItemSet & );
128 
129 	virtual void ActivatePage( const SfxItemSet& rSet );
130 	virtual int  DeactivatePage( SfxItemSet* pSet );
131 
132 	void    Construct();
133 
134 	void	SetView( const ::sd::View* pSdView );
135 
136 	using TabPage::ActivatePage;
137 	using TabPage::DeactivatePage;
138 };
139 
140 #endif		// _SD_TPACTION_HXX
141 
142