xref: /AOO41X/main/vcl/inc/vcl/abstdlg.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _VCL_ABSTDLG_HXX
28 #define _VCL_ABSTDLG_HXX
29 
30 // include ---------------------------------------------------------------
31 
32 #include <tools/solar.h>
33 #include <tools/string.hxx>
34 #include <vcl/dllapi.h>
35 
36 class Window;
37 class ResId;
38 class Link;
39 
40 class VCL_DLLPUBLIC VclAbstractDialog
41 {
42 public:
43 	virtual	short			Execute() = 0;
44 	//virtual void			Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ) = 0;
45 	virtual					~VclAbstractDialog();
46 };
47 
48 class VCL_DLLPUBLIC VclAbstractDialog2
49 {
50 public:
51     virtual void            StartExecuteModal( const Link& rEndDialogHdl ) = 0;
52     virtual long            GetResult() = 0;
53     virtual                 ~VclAbstractDialog2();
54 };
55 
56 class VCL_DLLPUBLIC VclAbstractTerminatedDialog : public VclAbstractDialog
57 {
58 public:
59 	virtual void			EndDialog(long nResult =0) = 0;
60 };
61 
62 class VCL_DLLPUBLIC VclAbstractRefreshableDialog : public VclAbstractDialog
63 {
64 public:
65     virtual void            Update() = 0;
66     virtual void            Sync() = 0;
67 };
68 
69 class VCL_DLLPUBLIC AbstractPasswordToOpenModifyDialog : public VclAbstractDialog
70 {
71 public:
72     virtual String  GetPasswordToOpen() const   = 0;
73     virtual String  GetPasswordToModify() const = 0;
74     virtual bool    IsRecommendToOpenReadonly() const = 0;
75 };
76 
77 //-------------------------------------------------------------
78 
79 class VCL_DLLPUBLIC VclAbstractDialogFactory
80 {
81 public:
82 										virtual ~VclAbstractDialogFactory();	// needed for export of vtable
83 	static VclAbstractDialogFactory*	Create();
84     // nDialogId was previously a ResId without ResMgr; the ResourceId is now
85     // an implementation detail of the factory
86 	virtual VclAbstractDialog* 			CreateVclDialog( Window* pParent, sal_uInt32 nResId ) = 0;
87 
88     // creates instance of PasswordToOpenModifyDialog from cui
89     virtual AbstractPasswordToOpenModifyDialog *    CreatePasswordToOpenModifyDialog( Window * pParent, sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify ) = 0;
90 };
91 
92 #endif
93 
94