update credits
[LibreOffice.git] / include / sfx2 / macropg.hxx
blob1a6c87198f41df05313a0bbfc0cd20014e3b8075
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 _MACROPG_HXX
20 #define _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;
32 class SvTabListBox;
33 class Edit;
34 class String;
35 class SfxObjectShell;
37 class SfxConfigFunctionListBox_Impl;
39 class _HeaderTabListBox;
40 class _SfxMacroTabPage_Impl;
42 class SFX2_DLLPUBLIC _SfxMacroTabPage : public SfxTabPage
44 SvxMacroTableDtor aTbl;
46 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox * );
47 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox * );
48 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox * );
50 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* );
51 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * );
53 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * );
54 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit* );
55 DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* );
57 protected:
58 _SfxMacroTabPage_Impl* mpImpl;
60 _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
62 void InitAndSetHandler();
63 void FillEvents();
64 void FillMacroList();
65 void EnableButtons( const String& rLanguage );
67 public:
69 virtual ~_SfxMacroTabPage();
71 void AddEvent( const String & rEventName, sal_uInt16 nEventId );
73 const SvxMacroTableDtor& GetMacroTbl() const;
74 void SetMacroTbl( const SvxMacroTableDtor& rTbl );
75 void ClearMacroTbl();
77 virtual void ScriptChanged( const String& rLanguage );
79 // zum setzen / abfragen der Links
80 void SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn );
81 FNGetMacrosOfRangeHdl GetGetMacrosOfRangeLink() const;
83 // --------- Erben aus der Basis -------------
84 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
85 virtual void Reset( const SfxItemSet& rSet );
87 void SetReadOnly( sal_Bool bSet );
88 sal_Bool IsReadOnly() const;
89 void SelectEvent( const String& rEventName, sal_uInt16 nEventId );
92 inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const
94 return aTbl;
97 inline void _SfxMacroTabPage::SetMacroTbl( const SvxMacroTableDtor& rTbl )
99 aTbl = rTbl;
102 inline void _SfxMacroTabPage::ClearMacroTbl()
104 aTbl.DelDtor();
107 class SFX2_DLLPUBLIC SfxMacroTabPage : public _SfxMacroTabPage
109 public:
110 SfxMacroTabPage(
111 Window* pParent,
112 const ResId& rId,
113 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
114 const SfxItemSet& rSet
117 // --------- Erben aus der Basis -------------
118 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
121 class SFX2_DLLPUBLIC SfxMacroAssignDlg : public SfxNoLayoutSingleTabDialog
123 public:
124 SfxMacroAssignDlg(
125 Window* pParent,
126 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
127 SfxItemSet& rSet );
128 SfxMacroAssignDlg(
129 Window* pParent,
130 const SfxObjectShell* _pShell,
131 SfxItemSet& rSet );
132 virtual ~SfxMacroAssignDlg();
135 #endif
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */