1*c4eee24dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*c4eee24dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*c4eee24dSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*c4eee24dSAndrew Rist * distributed with this work for additional information
6*c4eee24dSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*c4eee24dSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*c4eee24dSAndrew Rist * "License"); you may not use this file except in compliance
9*c4eee24dSAndrew Rist * with the License. You may obtain a copy of the License at
10*c4eee24dSAndrew Rist *
11*c4eee24dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*c4eee24dSAndrew Rist *
13*c4eee24dSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*c4eee24dSAndrew Rist * software distributed under the License is distributed on an
15*c4eee24dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c4eee24dSAndrew Rist * KIND, either express or implied. See the License for the
17*c4eee24dSAndrew Rist * specific language governing permissions and limitations
18*c4eee24dSAndrew Rist * under the License.
19*c4eee24dSAndrew Rist *
20*c4eee24dSAndrew Rist *************************************************************/
21*c4eee24dSAndrew Rist
22*c4eee24dSAndrew Rist
23cdf0e10cSrcweir #ifndef _MACROASS_HXX
24cdf0e10cSrcweir #define _MACROASS_HXX
25cdf0e10cSrcweir
26cdf0e10cSrcweir #include "sal/config.h"
27cdf0e10cSrcweir
28cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
29cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
30cdf0e10cSrcweir #include <svl/macitem.hxx>
31cdf0e10cSrcweir #include <vcl/lstbox.hxx>
32cdf0e10cSrcweir #include <com/sun/star/frame/XFrame.hpp>
33cdf0e10cSrcweir
34cdf0e10cSrcweir class _SfxMacroTabPage;
35cdf0e10cSrcweir class SvStringsDtor;
36cdf0e10cSrcweir class SvTabListBox;
37cdf0e10cSrcweir class Edit;
38cdf0e10cSrcweir class String;
39cdf0e10cSrcweir
40cdf0e10cSrcweir class SfxConfigGroupListBox_Impl;
41cdf0e10cSrcweir class SfxConfigFunctionListBox_Impl;
42cdf0e10cSrcweir class _HeaderTabListBox;
43cdf0e10cSrcweir class _SfxMacroTabPage_Impl;
44cdf0e10cSrcweir
45cdf0e10cSrcweir class _SfxMacroTabPage : public SfxTabPage
46cdf0e10cSrcweir {
47cdf0e10cSrcweir SvxMacroTableDtor aTbl;
48cdf0e10cSrcweir DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox * );
49cdf0e10cSrcweir DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox * );
50cdf0e10cSrcweir DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox * );
51cdf0e10cSrcweir
52cdf0e10cSrcweir DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* );
53cdf0e10cSrcweir DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * );
54cdf0e10cSrcweir
55cdf0e10cSrcweir DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* );
56cdf0e10cSrcweir
57cdf0e10cSrcweir protected:
58cdf0e10cSrcweir _SfxMacroTabPage_Impl* mpImpl;
59cdf0e10cSrcweir
60cdf0e10cSrcweir _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
61cdf0e10cSrcweir
62cdf0e10cSrcweir void InitAndSetHandler();
63cdf0e10cSrcweir void FillEvents();
64cdf0e10cSrcweir void FillMacroList();
65cdf0e10cSrcweir void EnableButtons();
66cdf0e10cSrcweir
67cdf0e10cSrcweir public:
68cdf0e10cSrcweir
69cdf0e10cSrcweir virtual ~_SfxMacroTabPage();
70cdf0e10cSrcweir
71cdf0e10cSrcweir void AddEvent( const String & rEventName, sal_uInt16 nEventId );
72cdf0e10cSrcweir
73cdf0e10cSrcweir const SvxMacroTableDtor& GetMacroTbl() const;
74cdf0e10cSrcweir void SetMacroTbl( const SvxMacroTableDtor& rTbl );
75cdf0e10cSrcweir void ClearMacroTbl();
76cdf0e10cSrcweir
77cdf0e10cSrcweir virtual void ScriptChanged();
78cdf0e10cSrcweir virtual void PageCreated (SfxAllItemSet aSet);
79cdf0e10cSrcweir
80cdf0e10cSrcweir // --------- Erben aus der Basis -------------
81cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet );
82cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet );
83cdf0e10cSrcweir
84cdf0e10cSrcweir sal_Bool IsReadOnly() const;
85cdf0e10cSrcweir };
86cdf0e10cSrcweir
GetMacroTbl() const87cdf0e10cSrcweir inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const
88cdf0e10cSrcweir {
89cdf0e10cSrcweir return aTbl;
90cdf0e10cSrcweir }
91cdf0e10cSrcweir
SetMacroTbl(const SvxMacroTableDtor & rTbl)92cdf0e10cSrcweir inline void _SfxMacroTabPage::SetMacroTbl( const SvxMacroTableDtor& rTbl )
93cdf0e10cSrcweir {
94cdf0e10cSrcweir aTbl = rTbl;
95cdf0e10cSrcweir }
96cdf0e10cSrcweir
ClearMacroTbl()97cdf0e10cSrcweir inline void _SfxMacroTabPage::ClearMacroTbl()
98cdf0e10cSrcweir {
99cdf0e10cSrcweir aTbl.DelDtor();
100cdf0e10cSrcweir }
101cdf0e10cSrcweir
102cdf0e10cSrcweir class SfxMacroTabPage : public _SfxMacroTabPage
103cdf0e10cSrcweir {
104cdf0e10cSrcweir public:
105cdf0e10cSrcweir SfxMacroTabPage(
106cdf0e10cSrcweir Window* pParent,
107cdf0e10cSrcweir const ResId& rId,
108cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
109cdf0e10cSrcweir const SfxItemSet& rSet
110cdf0e10cSrcweir );
111cdf0e10cSrcweir
112cdf0e10cSrcweir // --------- Erben aus der Basis -------------
113cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
114cdf0e10cSrcweir };
115cdf0e10cSrcweir
116cdf0e10cSrcweir class SfxMacroAssignDlg : public SfxSingleTabDialog
117cdf0e10cSrcweir {
118cdf0e10cSrcweir public:
119cdf0e10cSrcweir SfxMacroAssignDlg(
120cdf0e10cSrcweir Window* pParent,
121cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
122cdf0e10cSrcweir const SfxItemSet& rSet );
123cdf0e10cSrcweir virtual ~SfxMacroAssignDlg();
124cdf0e10cSrcweir };
125cdf0e10cSrcweir
126cdf0e10cSrcweir #endif
127