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 #ifndef INCLUDED_CUI_SOURCE_INC_MACROASS_HXX
20 #define INCLUDED_CUI_SOURCE_INC_MACROASS_HXX
21 
22 #include <sal/config.h>
23 
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>
29 #include <memory>
30 
31 class SfxMacroTabPage_;
33 
34 class 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 
52 public:
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 {
80 public:
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 #endif
91 
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxMacroTableDtor aTbl
Definition: macroass.hxx:36
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:84
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:46
void EnableButtons()
Definition: macroass.cxx:81
void FillEvents()
Definition: macroass.cxx:343