bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / inc / tpaction.hxx
blob09ebf54a72e0931bda682c28f231e939e7ac0a3d
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_INC_TPACTION_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_TPACTION_HXX
23 #include <com/sun/star/presentation/ClickAction.hpp>
24 #include <com/sun/star/presentation/AnimationEffect.hpp>
25 #include <vcl/fixed.hxx>
26 #include <vcl/layout.hxx>
27 #include <svx/dlgctrl.hxx>
28 #include <sfx2/tabdlg.hxx>
29 #include <sfx2/basedlgs.hxx>
30 #include "sdtreelb.hxx"
32 #include <vector>
34 namespace sd {
35 class View;
37 class SdDrawDocument;
39 /**
40 * Effect-SingleTab-Dialog
42 class SdActionDlg : public SfxSingleTabDialog
44 private:
45 const SfxItemSet& rOutAttrs;
46 public:
47 SdActionDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView);
50 /**
51 * Interaction-Tab-Page
53 class SdTPAction : public SfxTabPage
55 private:
56 VclPtr<ListBox> m_pLbAction;
58 VclPtr<FixedText> m_pFtTree; // jump destination controls
59 VclPtr<SdPageObjsTLB> m_pLbTree;
60 VclPtr<SdPageObjsTLB> m_pLbTreeDocument;
61 VclPtr<ListBox> m_pLbOLEAction;
63 VclPtr<VclFrame> m_pFrame;
64 VclPtr<Edit> m_pEdtSound;
65 VclPtr<Edit> m_pEdtBookmark;
66 VclPtr<Edit> m_pEdtDocument;
67 VclPtr<Edit> m_pEdtProgram;
68 VclPtr<Edit> m_pEdtMacro;
69 VclPtr<PushButton> m_pBtnSearch;
70 VclPtr<PushButton> m_pBtnSeek;
72 const SfxItemSet& rOutAttrs;
73 const ::sd::View* mpView;
74 SdDrawDocument* mpDoc;
75 XColorListRef pColList;
77 bool bTreeUpdated;
78 std::vector<com::sun::star::presentation::ClickAction> maCurrentActions;
79 OUString aLastFile;
80 ::std::vector< long > aVerbVector;
82 DECL_LINK( ClickSearchHdl, void * );
83 DECL_LINK( ClickActionHdl, void * );
84 DECL_LINK( SelectTreeHdl, void * );
85 DECL_LINK( CheckFileHdl, void * );
87 void UpdateTree();
88 void OpenFileDialog();
89 ::com::sun::star::presentation::ClickAction GetActualClickAction();
90 void SetActualClickAction( ::com::sun::star::presentation::ClickAction eCA );
91 void SetActualAnimationEffect( ::com::sun::star::presentation::AnimationEffect eAE );
92 void SetEditText( OUString const & rStr );
93 OUString GetEditText( bool bURL = false );
94 static sal_uInt16 GetClickActionSdResId( ::com::sun::star::presentation::ClickAction eCA );
95 sal_uInt16 GetAnimationEffectSdResId( ::com::sun::star::presentation::AnimationEffect eAE );
97 public:
98 SdTPAction( vcl::Window* pParent, const SfxItemSet& rInAttrs );
99 virtual ~SdTPAction();
100 virtual void dispose() SAL_OVERRIDE;
102 static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet& );
104 virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
105 virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
107 virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
108 virtual sfxpg DeactivatePage( SfxItemSet* pSet ) SAL_OVERRIDE;
110 void Construct();
112 void SetView( const ::sd::View* pSdView );
114 using TabPage::ActivatePage;
115 using TabPage::DeactivatePage;
118 #endif // INCLUDED_SD_SOURCE_UI_INC_TPACTION_HXX
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */