LibreOffice Module cui (master) 1
macroass.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <sal/config.h>
22
23#include <sfx2/basedlgs.hxx>
24#include <sfx2/tabdlg.hxx>
25#include <svl/macitem.hxx>
26#include <vcl/weld.hxx>
27#include <com/sun/star/frame/XFrame.hpp>
28#include <memory>
29
30class SfxMacroTabPage_;
32class Timer;
33
34class SfxMacroTabPage final : public SfxTabPage
35{
37 DECL_LINK(SelectEvent_Impl, weld::TreeView&, void);
38 DECL_LINK(SelectGroup_Impl, weld::TreeView&, void);
39 DECL_LINK(SelectMacro_Impl, weld::TreeView&, void);
40
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 );
45
46 std::unique_ptr<SfxMacroTabPage_Impl> mpImpl;
47
48 void InitAndSetHandler();
49 void FillEvents();
50 void EnableButtons();
51
52public:
54 weld::Container* pPage, weld::DialogController* pController,
55 const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
56 const SfxItemSet& rSet
57 );
58
59 virtual ~SfxMacroTabPage() override;
60
61 void AddEvent( const OUString & rEventName, SvMacroItemId nEventId );
62
63 void ScriptChanged();
64 virtual void PageCreated (const SfxAllItemSet& aSet) override;
65 virtual void ActivatePage( const SfxItemSet& ) override;
66 void LaunchFillGroup();
67
68 // --------- inherit from the base -------------
69 virtual bool FillItemSet( SfxItemSet* rSet ) override;
70 virtual void Reset( const SfxItemSet* rSet ) override;
71
72 bool IsReadOnly() const override;
73
74 // --------- inherit from the base -------------
75 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
76};
77
79{
80public:
82 const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
83 const SfxItemSet& rSet);
85 {
86 return static_cast<SfxMacroTabPage*>(m_xSfxPage.get());
87 }
88};
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxMacroTabPage * GetTabPage()
Definition: macroass.hxx:84
SfxMacroAssignDlg(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxDocumentFrame, const SfxItemSet &rSet)
Definition: macroass.cxx:389
DECL_LINK(TimeOut_Impl, Timer *, void)
void EnableButtons()
Definition: macroass.cxx:82
void FillEvents()
Definition: macroass.cxx:354
void AddEvent(const OUString &rEventName, SvMacroItemId nEventId)
Definition: macroass.cxx:131
DECL_LINK(AssignDeleteHdl_Impl, weld::TreeView &, bool)
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: macroass.cxx:154
DECL_LINK(AssignDeleteClickHdl_Impl, weld::Button &, void)
void AssignDeleteHdl(const weld::Widget *)
Definition: macroass.cxx:277
virtual void ActivatePage(const SfxItemSet &) override
Definition: macroass.cxx:180
SvxMacroTableDtor aTbl
Definition: macroass.hxx:36
virtual void Reset(const SfxItemSet *rSet) override
Definition: macroass.cxx:201
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: macroass.cxx:384
virtual ~SfxMacroTabPage() override
Definition: macroass.cxx:126
bool IsReadOnly() const override
Definition: macroass.cxx:230
void InitAndSetHandler()
Definition: macroass.cxx:326
DECL_LINK(SelectEvent_Impl, weld::TreeView &, void)
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: macroass.cxx:185
void LaunchFillGroup()
Definition: macroass.cxx:174
SfxMacroTabPage(weld::Container *pPage, weld::DialogController *pController, const css::uno::Reference< css::frame::XFrame > &rxDocumentFrame, const SfxItemSet &rSet)
Definition: macroass.cxx:102
DECL_LINK(SelectMacro_Impl, weld::TreeView &, void)
void ScriptChanged()
Definition: macroass.cxx:145
DECL_LINK(SelectGroup_Impl, weld::TreeView &, void)
std::unique_ptr< SfxMacroTabPage_Impl > mpImpl
Definition: macroass.hxx:46
std::unique_ptr< SfxTabPage > m_xSfxPage
SvMacroItemId
static SfxItemSet & rSet