1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _VCL_ABSTDLG_HXX 24 #define _VCL_ABSTDLG_HXX 25 26 // include --------------------------------------------------------------- 27 28 #include <tools/solar.h> 29 #include <tools/string.hxx> 30 #include <vcl/dllapi.h> 31 32 class Window; 33 class ResId; 34 class Link; 35 36 class VCL_DLLPUBLIC VclAbstractDialog 37 { 38 public: 39 virtual short Execute() = 0; 40 //virtual void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ) = 0; 41 virtual ~VclAbstractDialog(); 42 }; 43 44 class VCL_DLLPUBLIC VclAbstractDialog2 45 { 46 public: 47 virtual void StartExecuteModal( const Link& rEndDialogHdl ) = 0; 48 virtual long GetResult() = 0; 49 virtual ~VclAbstractDialog2(); 50 }; 51 52 class VCL_DLLPUBLIC VclAbstractTerminatedDialog : public VclAbstractDialog 53 { 54 public: 55 virtual void EndDialog(long nResult =0) = 0; 56 }; 57 58 class VCL_DLLPUBLIC VclAbstractRefreshableDialog : public VclAbstractDialog 59 { 60 public: 61 virtual void Update() = 0; 62 virtual void Sync() = 0; 63 }; 64 65 class VCL_DLLPUBLIC AbstractPasswordToOpenModifyDialog : public VclAbstractDialog 66 { 67 public: 68 virtual String GetPasswordToOpen() const = 0; 69 virtual String GetPasswordToModify() const = 0; 70 virtual bool IsRecommendToOpenReadonly() const = 0; 71 }; 72 73 //------------------------------------------------------------- 74 75 class VCL_DLLPUBLIC VclAbstractDialogFactory 76 { 77 public: 78 virtual ~VclAbstractDialogFactory(); // needed for export of vtable 79 static VclAbstractDialogFactory* Create(); 80 // nDialogId was previously a ResId without ResMgr; the ResourceId is now 81 // an implementation detail of the factory 82 virtual VclAbstractDialog* CreateVclDialog( Window* pParent, sal_uInt32 nResId ) = 0; 83 84 // creates instance of PasswordToOpenModifyDialog from cui 85 virtual AbstractPasswordToOpenModifyDialog * CreatePasswordToOpenModifyDialog( Window * pParent, sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify ) = 0; 86 }; 87 88 #endif 89 90