1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: macrodlg.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include <svheader.hxx>
36 #include <bastype2.hxx>
37 #include <bastype3.hxx>
38 #include <sfx2/basedlgs.hxx>
39 #include <vcl/fixed.hxx>
41 #ifndef _SV_BUTTON_HXX //autogen
42 #include <vcl/button.hxx>
45 #define MACRO_CLOSE 10
46 #define MACRO_OK_RUN 11
49 #define MACRO_ORGANIZE 15
50 #define MACRO_ASSIGN 16
52 #define MACROCHOOSER_ALL 1
53 #define MACROCHOOSER_CHOOSEONLY 2
54 #define MACROCHOOSER_RECORDING 3
58 class MacroChooser
: public SfxModalDialog
61 FixedText aMacroNameTxt
;
63 FixedText aMacroFromTxT
;
64 FixedText aMacrosSaveInTxt
;
65 BasicTreeListBox aBasicBox
;
66 FixedText aMacrosInTxt
;
67 String aMacrosInTxtBaseStr
;
68 SvTreeListBox aMacroBox
;
70 PushButton aRunButton
;
71 CancelButton aCloseButton
;
72 PushButton aAssignButton
;
73 PushButton aEditButton
;
74 PushButton aNewDelButton
;
75 PushButton aOrganizeButton
;
76 HelpButton aHelpButton
;
77 PushButton aNewLibButton
;
78 PushButton aNewModButton
;
81 BOOL bForceStoreBasic
;
85 DECL_LINK( MacroSelectHdl
, SvTreeListBox
* );
86 DECL_LINK( MacroDoubleClickHdl
, SvTreeListBox
* );
87 DECL_LINK( BasicSelectHdl
, SvTreeListBox
* );
88 DECL_LINK( EditModifyHdl
, Edit
* );
89 DECL_LINK( ButtonHdl
, Button
* );
92 void SaveSetCurEntry( SvTreeListBox
& rBox
, SvLBoxEntry
* pEntry
);
95 void EnableButton( Button
& rButton
, BOOL bEnable
);
97 String
GetInfo( SbxVariable
* pVar
);
99 void StoreMacroDescription();
100 void RestoreMacroDescription();
103 MacroChooser( Window
* pParent
, BOOL bCreateEntries
= TRUE
);
106 SbMethod
* GetMacro();
108 SbMethod
* CreateMacro();
110 virtual short Execute();
112 void SetMode( USHORT nMode
);
113 USHORT
GetMode() const { return nMode
; }
116 #endif // _MACRODLG_HXX