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_CUI_SOURCE_INC_MACROASS_HXX
20 #define INCLUDED_CUI_SOURCE_INC_MACROASS_HXX
22 #include <sal/config.h>
24 #include <sfx2/basedlgs.hxx>
25 #include <sfx2/tabdlg.hxx>
26 #include <svl/macitem.hxx>
27 #include <vcl/weld.hxx>
28 #include <com/sun/star/frame/XFrame.hpp>
31 class SfxMacroTabPage_
;
32 class SfxMacroTabPage_Impl
;
34 class SfxMacroTabPage final
: public SfxTabPage
36 SvxMacroTableDtor aTbl
;
37 DECL_LINK(SelectEvent_Impl
, weld::TreeView
&, void);
38 DECL_LINK(SelectGroup_Impl
, weld::TreeView
&, void);
39 DECL_LINK(SelectMacro_Impl
, weld::TreeView
&, void);
41 DECL_LINK(AssignDeleteHdl_Impl
, weld::TreeView
&, bool);
42 DECL_LINK(AssignDeleteClickHdl_Impl
, weld::Button
&, void);
43 void AssignDeleteHdl(const weld::Widget
*);
44 DECL_LINK( TimeOut_Impl
, Timer
*, void );
46 std::unique_ptr
<SfxMacroTabPage_Impl
> mpImpl
;
48 void InitAndSetHandler();
54 weld::Container
* pPage
, weld::DialogController
* pController
,
55 const css::uno::Reference
< css::frame::XFrame
>& rxDocumentFrame
,
56 const SfxItemSet
& rSet
59 virtual ~SfxMacroTabPage() override
;
61 void AddEvent( const OUString
& rEventName
, SvMacroItemId nEventId
);
64 virtual void PageCreated (const SfxAllItemSet
& aSet
) override
;
65 virtual void ActivatePage( const SfxItemSet
& ) override
;
66 void LaunchFillGroup();
68 // --------- inherit from the base -------------
69 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
70 virtual void Reset( const SfxItemSet
* rSet
) override
;
72 bool IsReadOnly() const override
;
74 // --------- inherit from the base -------------
75 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rAttrSet
);
78 class SfxMacroAssignDlg
: public SfxSingleTabDialogController
81 SfxMacroAssignDlg(weld::Widget
* pParent
,
82 const css::uno::Reference
< css::frame::XFrame
>& rxDocumentFrame
,
83 const SfxItemSet
& rSet
);
84 SfxMacroTabPage
* GetTabPage()
86 return static_cast<SfxMacroTabPage
*>(m_xSfxPage
.get());
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */