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 <com/sun/star/frame/XFrame.hpp>
28 #include <vcl/button.hxx>
40 class MacroChooser
: public SfxModalDialog
50 VclPtr
<Edit
> m_pMacroNameEdit
;
51 VclPtr
<FixedText
> m_pMacroFromTxT
;
52 VclPtr
<FixedText
> m_pMacrosSaveInTxt
;
53 VclPtr
<TreeListBox
> m_pBasicBox
;
54 VclPtr
<FixedText
> m_pMacrosInTxt
;
55 OUString m_aMacrosInTxtBaseStr
;
56 VclPtr
<SvTreeListBox
> m_pMacroBox
;
58 VclPtr
<PushButton
> m_pRunButton
;
59 VclPtr
<CloseButton
> m_pCloseButton
;
60 VclPtr
<PushButton
> m_pAssignButton
;
61 VclPtr
<PushButton
> m_pEditButton
;
62 VclPtr
<PushButton
> m_pDelButton
;
63 VclPtr
<PushButton
> m_pOrganizeButton
;
64 VclPtr
<PushButton
> m_pNewLibButton
;
65 VclPtr
<PushButton
> m_pNewModButton
;
67 // For forwarding to Assign dialog
68 ::css::uno::Reference
< ::css::frame::XFrame
> m_xDocumentFrame
;
71 bool bForceStoreBasic
;
75 DECL_LINK( MacroSelectHdl
, SvTreeListBox
*, void );
76 DECL_LINK( MacroDoubleClickHdl
, SvTreeListBox
*, bool );
77 DECL_LINK( BasicSelectHdl
, SvTreeListBox
*, void );
78 DECL_LINK( EditModifyHdl
, Edit
&, void );
79 DECL_LINK( ButtonHdl
, Button
*, void );
82 void SaveSetCurEntry( SvTreeListBox
& rBox
, SvTreeListEntry
* pEntry
);
85 void EnableButton( Button
& rButton
, bool bEnable
);
87 static OUString
GetInfo( SbxVariable
* pVar
);
89 void StoreMacroDescription();
90 void RestoreMacroDescription();
93 MacroChooser( vcl::Window
* pParent
, const ::css::uno::Reference
< ::css::frame::XFrame
>& xDocFrame
, bool bCreateEntries
);
94 virtual ~MacroChooser() override
;
95 virtual void dispose() override
;
99 SbMethod
* CreateMacro();
101 virtual short Execute() override
;
104 Mode
GetMode () const { return nMode
; }
107 } // namespace basctl
109 #endif // INCLUDED_BASCTL_SOURCE_BASICIDE_MACRODLG_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */