sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / templdlg.hxx
blob91aeb727085b6cd0e0117c6fa5daa2dce8b464f5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: templdlg.hxx,v $
10 * $Revision: 1.3 $
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 ************************************************************************/
30 #ifndef _SVTOOLS_TEMPLDLG_HXX
31 #define _SVTOOLS_TEMPLDLG_HXX
33 #ifndef INCLUDED_SVTDLLAPI_H
34 #include "bf_svtools/svtdllapi.h"
35 #endif
37 #ifndef _SV_BUTTON_HXX
38 #include <vcl/button.hxx>
39 #endif
40 #ifndef _SV_DIALOG_HXX
41 #include <vcl/dialog.hxx>
42 #endif
43 #ifndef _SV_FIXED_HXX
44 #include <vcl/fixed.hxx>
45 #endif
47 namespace binfilter
50 struct SvtTmplDlg_Impl;
52 // class SvtDocumentTemplateDialog ---------------------------------------
54 class SvtTemplateWindow;
56 class SvtDocumentTemplateDialog : public ModalDialog
58 private:
59 FixedLine aLine;
60 PushButton aManageBtn;
61 PushButton aEditBtn;
62 OKButton aOKBtn;
63 CancelButton aCancelBtn;
64 HelpButton aHelpBtn;
66 SvtTmplDlg_Impl* pImpl;
68 DECL_DLLPRIVATE_LINK( SelectHdl_Impl, SvtTemplateWindow* );
69 DECL_DLLPRIVATE_LINK( DoubleClickHdl_Impl, SvtTemplateWindow* );
70 DECL_DLLPRIVATE_LINK( NewFolderHdl_Impl, SvtTemplateWindow* );
71 DECL_DLLPRIVATE_LINK( SendFocusHdl_Impl, SvtTemplateWindow* );
72 DECL_DLLPRIVATE_LINK( OKHdl_Impl, PushButton* );
73 DECL_DLLPRIVATE_LINK( OrganizerHdl_Impl, PushButton* );
74 DECL_DLLPRIVATE_LINK( UpdateHdl_Impl, Timer* );
76 public:
77 SvtDocumentTemplateDialog( Window* pParent );
79 /** ctor for calling the dialog for <em>selection</em> only, not for <em>opening</em> a document
80 <p>If you use this ctor, the dialog will behave differently in the following areas:
81 <ul><li>The <em>Edit</em> button will be hidden.</li>
82 <li>Upon pressing em>Open</em>, the selected file will not be opened. Instead, it's
83 URL is available (see <method>GetSelectedFileURL</method>).</li>
84 </ul>
87 struct SelectOnly { };
88 SvtDocumentTemplateDialog( Window* _pParent, SelectOnly );
90 ~SvtDocumentTemplateDialog();
92 sal_Bool IsFileSelected( ) const;
93 String GetSelectedFileURL( ) const;
95 void SelectTemplateFolder();
97 private:
98 void InitImpl( );
99 sal_Bool CanEnableEditBtn() const;
104 #endif // _SVTOOLS_TEMPLDLG_HXX