1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef INCLUDED_SFX2_MACROPG_HXX
20 #define INCLUDED_SFX2_MACROPG_HXX
22 #include <sal/config.h>
23 #include <sfx2/dllapi.h>
25 #include <sfx2/basedlgs.hxx>
26 #include <sfx2/tabdlg.hxx>
27 #include <svl/macitem.hxx>
28 #include <vcl/lstbox.hxx>
29 #include <com/sun/star/frame/XFrame.hpp>
31 class _SfxMacroTabPage
;
39 class SfxConfigFunctionListBox_Impl
;
41 class _HeaderTabListBox
;
42 class _SfxMacroTabPage_Impl
;
44 class SFX2_DLLPUBLIC _SfxMacroTabPage
: public SfxTabPage
46 SvxMacroTableDtor aTbl
;
48 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage
, SelectEvent_Impl
, SvTabListBox
* );
49 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage
, SelectGroup_Impl
, ListBox
* );
50 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage
, SelectMacro_Impl
, ListBox
* );
52 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage
, DoubleClickHdl_Impl
, Control
* );
53 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage
, AssignDeleteHdl_Impl
, PushButton
* );
55 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage
, ChangeScriptHdl_Impl
, RadioButton
* );
56 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage
, GetFocus_Impl
, Edit
* );
57 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage
, TimeOut_Impl
, Timer
* );
60 _SfxMacroTabPage_Impl
* mpImpl
;
62 _SfxMacroTabPage( Window
* pParent
, const ResId
& rId
, const SfxItemSet
& rItemSet
);
64 void InitAndSetHandler();
67 void EnableButtons( const rtl::OUString
& rLanguage
);
71 virtual ~_SfxMacroTabPage();
73 void AddEvent( const rtl::OUString
& rEventName
, sal_uInt16 nEventId
);
75 const SvxMacroTableDtor
& GetMacroTbl() const;
76 void SetMacroTbl( const SvxMacroTableDtor
& rTbl
);
78 virtual void ScriptChanged( const rtl::OUString
& rLanguage
);
80 // --------- Erben aus der Basis -------------
81 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
82 virtual void Reset( const SfxItemSet
& rSet
);
84 void SetReadOnly( sal_Bool bSet
);
85 sal_Bool
IsReadOnly() const;
86 void SelectEvent( const rtl::OUString
& rEventName
, sal_uInt16 nEventId
);
89 inline const SvxMacroTableDtor
& _SfxMacroTabPage::GetMacroTbl() const
94 inline void _SfxMacroTabPage::SetMacroTbl( const SvxMacroTableDtor
& rTbl
)
99 class SFX2_DLLPUBLIC SfxMacroTabPage
: public _SfxMacroTabPage
105 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& rxDocumentFrame
,
106 const SfxItemSet
& rSet
109 // --------- Erben aus der Basis -------------
110 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rAttrSet
);
113 class SFX2_DLLPUBLIC SfxMacroAssignDlg
: public SfxNoLayoutSingleTabDialog
118 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& rxDocumentFrame
,
122 const SfxObjectShell
* _pShell
,
124 virtual ~SfxMacroAssignDlg();
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */