merge the formfield patch from ooo-build
[ooovba.git] / svtools / inc / templdlg.hxx
bloba668743c1b97f3a47c54ae58d2ddf10d51d401d9
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 $
10 * $Revision: 1.16 $
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 #include "svtools/svtdllapi.h"
35 #include <vcl/button.hxx>
36 #include <vcl/dialog.hxx>
37 #include <vcl/fixed.hxx>
38 #include <svtools/fixedhyper.hxx>
40 struct SvtTmplDlg_Impl;
42 // class SvtDocumentTemplateDialog ---------------------------------------
44 class SvtTemplateWindow;
46 class SVT_DLLPUBLIC SvtDocumentTemplateDialog : public ModalDialog
48 private:
49 svt::FixedHyperlink aMoreTemplatesLink;
50 FixedLine aLine;
51 PushButton aManageBtn;
52 PushButton aEditBtn;
53 OKButton aOKBtn;
54 CancelButton aCancelBtn;
55 HelpButton aHelpBtn;
57 SvtTmplDlg_Impl* pImpl;
59 DECL_DLLPRIVATE_LINK( SelectHdl_Impl, SvtTemplateWindow* );
60 DECL_DLLPRIVATE_LINK( DoubleClickHdl_Impl, SvtTemplateWindow* );
61 DECL_DLLPRIVATE_LINK( NewFolderHdl_Impl, SvtTemplateWindow* );
62 DECL_DLLPRIVATE_LINK( SendFocusHdl_Impl, SvtTemplateWindow* );
63 DECL_DLLPRIVATE_LINK( OKHdl_Impl, PushButton* );
64 DECL_DLLPRIVATE_LINK( OrganizerHdl_Impl, PushButton* );
65 DECL_DLLPRIVATE_LINK( UpdateHdl_Impl, Timer* );
66 DECL_DLLPRIVATE_LINK( OpenLinkHdl_Impl, svt::FixedHyperlink* );
68 public:
69 SvtDocumentTemplateDialog( Window* pParent );
71 /** ctor for calling the dialog for <em>selection</em> only, not for <em>opening</em> a document
72 <p>If you use this ctor, the dialog will behave differently in the following areas:
73 <ul><li>The <em>Edit</em> button will be hidden.</li>
74 <li>Upon pressing em>Open</em>, the selected file will not be opened. Instead, it's
75 URL is available (see <method>GetSelectedFileURL</method>).</li>
76 </ul>
79 struct SelectOnly { };
80 SvtDocumentTemplateDialog( Window* _pParent, SelectOnly );
82 ~SvtDocumentTemplateDialog();
84 sal_Bool IsFileSelected( ) const;
85 String GetSelectedFileURL( ) const;
87 void SelectTemplateFolder();
89 private:
90 SVT_DLLPRIVATE void InitImpl( );
91 SVT_DLLPRIVATE sal_Bool CanEnableEditBtn() const;
94 #endif // _SVTOOLS_TEMPLDLG_HXX