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: templdlg.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 ************************************************************************/
30 #ifndef _SVTOOLS_TEMPLDLG_HXX
31 #define _SVTOOLS_TEMPLDLG_HXX
33 #ifndef INCLUDED_SVTDLLAPI_H
34 #include "bf_svtools/svtdllapi.h"
37 #ifndef _SV_BUTTON_HXX
38 #include <vcl/button.hxx>
40 #ifndef _SV_DIALOG_HXX
41 #include <vcl/dialog.hxx>
44 #include <vcl/fixed.hxx>
50 struct SvtTmplDlg_Impl
;
52 // class SvtDocumentTemplateDialog ---------------------------------------
54 class SvtTemplateWindow
;
56 class SvtDocumentTemplateDialog
: public ModalDialog
60 PushButton aManageBtn
;
63 CancelButton aCancelBtn
;
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
* );
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>
87 struct SelectOnly
{ };
88 SvtDocumentTemplateDialog( Window
* _pParent
, SelectOnly
);
90 ~SvtDocumentTemplateDialog();
92 sal_Bool
IsFileSelected( ) const;
93 String
GetSelectedFileURL( ) const;
95 void SelectTemplateFolder();
99 sal_Bool
CanEnableEditBtn() const;
104 #endif // _SVTOOLS_TEMPLDLG_HXX