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