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 
30 class SfxMacroTabPage_;
32 
33 class SfxMacroTabPage final : public SfxTabPage
34 {
36  DECL_LINK(SelectEvent_Impl, weld::TreeView&, void);
37  DECL_LINK(SelectGroup_Impl, weld::TreeView&, void);
38  DECL_LINK(SelectMacro_Impl, weld::TreeView&, void);
39 
40  DECL_LINK(AssignDeleteHdl_Impl, weld::TreeView&, bool);
41  DECL_LINK(AssignDeleteClickHdl_Impl, weld::Button&, void);
42  void AssignDeleteHdl(const weld::Widget*);
43  DECL_LINK( TimeOut_Impl, Timer*, void );
44 
45  std::unique_ptr<SfxMacroTabPage_Impl> mpImpl;
46 
47  void InitAndSetHandler();
48  void FillEvents();
49  void EnableButtons();
50 
51 public:
53  weld::Container* pPage, weld::DialogController* pController,
54  const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
55  const SfxItemSet& rSet
56  );
57 
58  virtual ~SfxMacroTabPage() override;
59 
60  void AddEvent( const OUString & rEventName, SvMacroItemId nEventId );
61 
62  void ScriptChanged();
63  virtual void PageCreated (const SfxAllItemSet& aSet) override;
64  virtual void ActivatePage( const SfxItemSet& ) override;
65  void LaunchFillGroup();
66 
67  // --------- inherit from the base -------------
68  virtual bool FillItemSet( SfxItemSet* rSet ) override;
69  virtual void Reset( const SfxItemSet* rSet ) override;
70 
71  bool IsReadOnly() const override;
72 
73  // --------- inherit from the base -------------
74  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
75 };
76 
78 {
79 public:
81  const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
82  const SfxItemSet& rSet);
84  {
85  return static_cast<SfxMacroTabPage*>(m_xSfxPage.get());
86  }
87 };
88 
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxMacroTableDtor aTbl
Definition: macroass.hxx:35
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: macroass.cxx:373
SfxMacroAssignDlg(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxDocumentFrame, const SfxItemSet &rSet)
Definition: macroass.cxx:378
SvMacroItemId
virtual ~SfxMacroTabPage() override
Definition: macroass.cxx:126
SfxMacroTabPage(weld::Container *pPage, weld::DialogController *pController, const css::uno::Reference< css::frame::XFrame > &rxDocumentFrame, const SfxItemSet &rSet)
Definition: macroass.cxx:101
std::unique_ptr< SfxTabPage > m_xSfxPage
SfxMacroTabPage * GetTabPage()
Definition: macroass.hxx:83
virtual void ActivatePage(const SfxItemSet &) override
Definition: macroass.cxx:175
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: macroass.cxx:154
virtual void Reset(const SfxItemSet *rSet) override
Definition: macroass.cxx:195
void ScriptChanged()
Definition: macroass.cxx:145
void LaunchFillGroup()
Definition: macroass.cxx:169
void InitAndSetHandler()
Definition: macroass.cxx:317
void AddEvent(const OUString &rEventName, SvMacroItemId nEventId)
Definition: macroass.cxx:131
bool IsReadOnly() const override
Definition: macroass.cxx:221
void AssignDeleteHdl(const weld::Widget *)
Definition: macroass.cxx:268
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: macroass.cxx:180
DECL_LINK(SelectEvent_Impl, weld::TreeView &, void)
std::unique_ptr< SfxMacroTabPage_Impl > mpImpl
Definition: macroass.hxx:45
void EnableButtons()
Definition: macroass.cxx:81
void FillEvents()
Definition: macroass.cxx:343