File: creddlgg.h

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (53 lines) | stat: -rw-r--r-- 1,636 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
///////////////////////////////////////////////////////////////////////////////
// Name:        wx/generic/creddlgg.h
// Purpose:     wxGenericCredentialEntryDialog interface
// Author:      Tobias Taschner
// Created:     2018-10-23
// Copyright:   (c) 2018 wxWidgets development team
// Licence:     wxWindows licence
///////////////////////////////////////////////////////////////////////////////

#ifndef _WX_CREDDLGG_H_BASE
#define _WX_CREDDLGG_H_BASE

#include "wx/defs.h"

#if wxUSE_CREDENTIALDLG

#include "wx/dialog.h"
#include "wx/webrequest.h"

class WXDLLIMPEXP_CORE wxGenericCredentialEntryDialog : public wxDialog
{
public:
    wxGenericCredentialEntryDialog();

    wxGenericCredentialEntryDialog(wxWindow* parent, const wxString& message,
        const wxString& title,
        const wxWebCredentials& cred = wxWebCredentials());

    bool Create(wxWindow* parent, const wxString& message,
        const wxString& title,
        const wxWebCredentials& cred = wxWebCredentials());

    void SetUser(const wxString& user) { m_userTextCtrl->SetValue(user); }
    void SetPassword(const wxString& password)
        { m_passwordTextCtrl->SetValue(password); }

    wxWebCredentials GetCredentials() const;

private:
    wxTextCtrl* m_userTextCtrl;
    wxTextCtrl* m_passwordTextCtrl;

    void Init(const wxString& message, const wxWebCredentials& cred);

    wxDECLARE_NO_COPY_CLASS(wxGenericCredentialEntryDialog);
};

// Add this typedef as long as the generic version is the only one available
typedef wxGenericCredentialEntryDialog wxCredentialEntryDialog;

#endif // wxUSE_CREDENTIALDLG

#endif // _WX_CREDDLGG_H_BASE