1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
20 #ifndef INCLUDED_BASCTL_SOURCE_BASICIDE_MACRODLG_HXX
21 #define INCLUDED_BASCTL_SOURCE_BASICIDE_MACRODLG_HXX
23 #include <bastype2.hxx>
24 #include <sfx2/basedlgs.hxx>
26 #include <vcl/button.hxx>
38 class MacroChooser
: public SfxModalDialog
48 VclPtr
<Edit
> m_pMacroNameEdit
;
49 VclPtr
<FixedText
> m_pMacroFromTxT
;
50 VclPtr
<FixedText
> m_pMacrosSaveInTxt
;
51 VclPtr
<TreeListBox
> m_pBasicBox
;
52 VclPtr
<FixedText
> m_pMacrosInTxt
;
53 OUString m_aMacrosInTxtBaseStr
;
54 VclPtr
<SvTreeListBox
> m_pMacroBox
;
56 VclPtr
<PushButton
> m_pRunButton
;
57 VclPtr
<CloseButton
> m_pCloseButton
;
58 VclPtr
<PushButton
> m_pAssignButton
;
59 VclPtr
<PushButton
> m_pEditButton
;
60 VclPtr
<PushButton
> m_pDelButton
;
61 VclPtr
<PushButton
> m_pOrganizeButton
;
62 VclPtr
<PushButton
> m_pNewLibButton
;
63 VclPtr
<PushButton
> m_pNewModButton
;
66 bool bForceStoreBasic
;
70 DECL_LINK( MacroSelectHdl
, SvTreeListBox
* );
71 DECL_LINK(MacroDoubleClickHdl
, void *);
72 DECL_LINK( BasicSelectHdl
, SvTreeListBox
* );
73 DECL_LINK( EditModifyHdl
, Edit
* );
74 DECL_LINK( ButtonHdl
, Button
* );
77 void SaveSetCurEntry( SvTreeListBox
& rBox
, SvTreeListEntry
* pEntry
);
80 void EnableButton( Button
& rButton
, bool bEnable
);
82 static OUString
GetInfo( SbxVariable
* pVar
);
84 void StoreMacroDescription();
85 void RestoreMacroDescription();
88 MacroChooser( vcl::Window
* pParent
, bool bCreateEntries
= true );
89 virtual ~MacroChooser();
90 virtual void dispose() SAL_OVERRIDE
;
94 SbMethod
* CreateMacro();
96 virtual short Execute() SAL_OVERRIDE
;
99 Mode
GetMode () const { return nMode
; }
102 } // namespace basctl
104 #endif // INCLUDED_BASCTL_SOURCE_BASICIDE_MACRODLG_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */