1*b16fc349SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*b16fc349SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*b16fc349SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*b16fc349SAndrew Rist * distributed with this work for additional information 6*b16fc349SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*b16fc349SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*b16fc349SAndrew Rist * "License"); you may not use this file except in compliance 9*b16fc349SAndrew Rist * with the License. You may obtain a copy of the License at 10*b16fc349SAndrew Rist * 11*b16fc349SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*b16fc349SAndrew Rist * 13*b16fc349SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*b16fc349SAndrew Rist * software distributed under the License is distributed on an 15*b16fc349SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b16fc349SAndrew Rist * KIND, either express or implied. See the License for the 17*b16fc349SAndrew Rist * specific language governing permissions and limitations 18*b16fc349SAndrew Rist * under the License. 19*b16fc349SAndrew Rist * 20*b16fc349SAndrew Rist *************************************************************/ 21*b16fc349SAndrew Rist 22*b16fc349SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef UUI_LOGINDLG_HXX 25cdf0e10cSrcweir #define UUI_LOGINDLG_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 28cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX 29cdf0e10cSrcweir #include <vcl/button.hxx> 30cdf0e10cSrcweir #endif 31cdf0e10cSrcweir #include <vcl/dialog.hxx> 32cdf0e10cSrcweir #include <vcl/edit.hxx> 33cdf0e10cSrcweir #include <vcl/fixed.hxx> 34cdf0e10cSrcweir 35cdf0e10cSrcweir //============================================================================ 36cdf0e10cSrcweir #define LF_NO_PATH 0x0001 // hide "path" 37cdf0e10cSrcweir #define LF_NO_USERNAME 0x0002 // hide "name" 38cdf0e10cSrcweir #define LF_NO_PASSWORD 0x0004 // hide "password" 39cdf0e10cSrcweir #define LF_NO_SAVEPASSWORD 0x0008 // hide "save password" 40cdf0e10cSrcweir #define LF_NO_ERRORTEXT 0x0010 // hide message 41cdf0e10cSrcweir #define LF_PATH_READONLY 0x0020 // "path" readonly 42cdf0e10cSrcweir #define LF_USERNAME_READONLY 0x0040 // "name" readonly 43cdf0e10cSrcweir #define LF_NO_ACCOUNT 0x0080 // hide "account" 44cdf0e10cSrcweir #define LF_NO_USESYSCREDS 0x0100 // hide "use system cedentials" 45cdf0e10cSrcweir 46cdf0e10cSrcweir //............................................................................ 47cdf0e10cSrcweir //............................................................................ 48cdf0e10cSrcweir 49cdf0e10cSrcweir //============================================================================ 50cdf0e10cSrcweir class LoginDialog : public ModalDialog 51cdf0e10cSrcweir { 52cdf0e10cSrcweir FixedText aErrorFT; 53cdf0e10cSrcweir FixedInfo aErrorInfo; 54cdf0e10cSrcweir FixedLine aLogin1FL; 55cdf0e10cSrcweir FixedInfo aRequestInfo; 56cdf0e10cSrcweir FixedLine aLogin2FL; 57cdf0e10cSrcweir FixedText aPathFT; 58cdf0e10cSrcweir Edit aPathED; 59cdf0e10cSrcweir PushButton aPathBtn; 60cdf0e10cSrcweir FixedText aNameFT; 61cdf0e10cSrcweir Edit aNameED; 62cdf0e10cSrcweir FixedText aPasswordFT; 63cdf0e10cSrcweir Edit aPasswordED; 64cdf0e10cSrcweir FixedText aAccountFT; 65cdf0e10cSrcweir Edit aAccountED; 66cdf0e10cSrcweir CheckBox aSavePasswdBtn; 67cdf0e10cSrcweir CheckBox aUseSysCredsCB; 68cdf0e10cSrcweir FixedLine aButtonsFL; 69cdf0e10cSrcweir OKButton aOKBtn; 70cdf0e10cSrcweir CancelButton aCancelBtn; 71cdf0e10cSrcweir HelpButton aHelpBtn; 72cdf0e10cSrcweir 73cdf0e10cSrcweir void HideControls_Impl( sal_uInt16 nFlags ); 74cdf0e10cSrcweir void EnableUseSysCredsControls_Impl( sal_Bool bUseSysCredsEnabled ); 75cdf0e10cSrcweir 76cdf0e10cSrcweir DECL_LINK( OKHdl_Impl, OKButton * ); 77cdf0e10cSrcweir DECL_LINK( PathHdl_Impl, PushButton * ); 78cdf0e10cSrcweir DECL_LINK( UseSysCredsHdl_Impl, CheckBox * ); 79cdf0e10cSrcweir 80cdf0e10cSrcweir public: 81cdf0e10cSrcweir LoginDialog( Window* pParent, sal_uInt16 nFlags, 82cdf0e10cSrcweir const String& rServer, const String* pRealm, 83cdf0e10cSrcweir ResMgr * pResMgr ); 84cdf0e10cSrcweir virtual ~LoginDialog(); 85cdf0e10cSrcweir GetPath() const86cdf0e10cSrcweir String GetPath() const { return aPathED.GetText(); } SetPath(const String & rNewPath)87cdf0e10cSrcweir void SetPath( const String& rNewPath ) { aPathED.SetText( rNewPath ); } GetName() const88cdf0e10cSrcweir String GetName() const { return aNameED.GetText(); } SetName(const String & rNewName)89cdf0e10cSrcweir void SetName( const String& rNewName ) { aNameED.SetText( rNewName ); } GetPassword() const90cdf0e10cSrcweir String GetPassword() const { return aPasswordED.GetText(); } SetPassword(const String & rNew)91cdf0e10cSrcweir void SetPassword( const String& rNew ) { aPasswordED.SetText( rNew ); } GetAccount() const92cdf0e10cSrcweir String GetAccount() const { return aAccountED.GetText(); } SetAccount(const String & rNew)93cdf0e10cSrcweir void SetAccount( const String& rNew ) { aAccountED.SetText( rNew ); } IsSavePassword() const94cdf0e10cSrcweir sal_Bool IsSavePassword() const { return aSavePasswdBtn.IsChecked(); } SetSavePassword(sal_Bool bSave)95cdf0e10cSrcweir void SetSavePassword( sal_Bool bSave ) { aSavePasswdBtn.Check( bSave ); } SetSavePasswordText(const String & rTxt)96cdf0e10cSrcweir void SetSavePasswordText( const String& rTxt ) { aSavePasswdBtn.SetText( rTxt ); } IsUseSystemCredentials() const97cdf0e10cSrcweir sal_Bool IsUseSystemCredentials() const { return aUseSysCredsCB.IsChecked(); } 98cdf0e10cSrcweir void SetUseSystemCredentials( sal_Bool bUse ); SetErrorText(const String & rTxt)99cdf0e10cSrcweir void SetErrorText( const String& rTxt ) { aErrorInfo.SetText( rTxt ); } SetLoginRequestText(const String & rTxt)100cdf0e10cSrcweir void SetLoginRequestText( const String& rTxt ) { aRequestInfo.SetText( rTxt ); } 101cdf0e10cSrcweir void ClearPassword(); 102cdf0e10cSrcweir void ClearAccount(); 103cdf0e10cSrcweir }; 104cdf0e10cSrcweir 105cdf0e10cSrcweir // ----------------------------------------------------------------------- 106cdf0e10cSrcweir 107cdf0e10cSrcweir 108cdf0e10cSrcweir //............................................................................ 109cdf0e10cSrcweir //............................................................................ 110cdf0e10cSrcweir 111cdf0e10cSrcweir #endif // UUI_LOGINDLG_HXX 112cdf0e10cSrcweir 113