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