update dev300-m58
[ooovba.git] / uui / source / logindlg.hxx
blob30bdf92e0188134fb5adc7a1614996aea5b43af9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: logindlg.hxx,v $
10 * $Revision: 1.4 $
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 ************************************************************************/
31 #ifndef UUI_LOGINDLG_HXX
32 #define UUI_LOGINDLG_HXX
34 #include <svtools/stdctrl.hxx>
35 #ifndef _SV_BUTTON_HXX
36 #include <vcl/button.hxx>
37 #endif
38 #include <vcl/dialog.hxx>
39 #include <vcl/edit.hxx>
40 #include <vcl/fixed.hxx>
42 //============================================================================
43 #define LF_NO_PATH 0x0001 // hide "path"
44 #define LF_NO_USERNAME 0x0002 // hide "name"
45 #define LF_NO_PASSWORD 0x0004 // hide "password"
46 #define LF_NO_SAVEPASSWORD 0x0008 // hide "save password"
47 #define LF_NO_ERRORTEXT 0x0010 // hide message
48 #define LF_PATH_READONLY 0x0020 // "path" readonly
49 #define LF_USERNAME_READONLY 0x0040 // "name" readonly
50 #define LF_NO_ACCOUNT 0x0080 // hide "account"
52 //............................................................................
53 //............................................................................
55 //============================================================================
56 class LoginDialog : public ModalDialog
58 FixedInfo aErrorInfo;
59 FixedLine aErrorGB;
60 FixedInfo aRequestInfo;
61 FixedText aPathFT;
62 Edit aPathED;
63 FixedInfo aPathInfo;
64 PushButton aPathBtn;
65 FixedText aNameFT;
66 Edit aNameED;
67 FixedInfo aNameInfo;
68 FixedText aPasswordFT;
69 Edit aPasswordED;
70 FixedText aAccountFT;
71 Edit aAccountED;
72 CheckBox aSavePasswdBtn;
73 FixedLine aLoginGB;
74 OKButton aOKBtn;
75 CancelButton aCancelBtn;
76 HelpButton aHelpBtn;
78 void HideControls_Impl( USHORT nFlags );
80 DECL_LINK( OKHdl_Impl, OKButton * );
81 DECL_LINK( PathHdl_Impl, PushButton * );
83 public:
84 LoginDialog( Window* pParent, USHORT nFlags,
85 const String& rServer, const String* pRealm,
86 ResMgr * pResMgr );
88 String GetPath() const { return aPathED.GetText(); }
89 void SetPath( const String& rNewPath )
90 { aPathED.SetText( rNewPath );
91 aPathInfo.SetText( rNewPath );}
92 String GetName() const { return aNameED.GetText(); }
93 void SetName( const String& rNewName );
94 String GetPassword() const { return aPasswordED.GetText(); }
95 void SetPassword( const String& rNew )
96 { aPasswordED.SetText( rNew ); }
97 String GetAccount() const { return aAccountED.GetText(); }
98 void SetAccount( const String& rNew )
99 { aAccountED.SetText( rNew ); }
100 BOOL IsSavePassword() const
101 { return aSavePasswdBtn.IsChecked(); }
102 void SetSavePassword( BOOL bSave )
103 { aSavePasswdBtn.Check( bSave ); }
104 void SetSavePasswordText( const String& rTxt )
105 { aSavePasswdBtn.SetText( rTxt ); }
106 void SetErrorText( const String& rTxt )
107 { aErrorInfo.SetText( rTxt ); }
108 void SetLoginRequestText( const String& rTxt )
109 { aRequestInfo.SetText( rTxt ); }
110 void ClearPassword();
111 void ClearAccount();
114 //............................................................................
115 //............................................................................
117 #endif // UUI_LOGINDLG_HXX