Mana
Loading...
Searching...
No Matches
logindialog.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2004-2009 The Mana World Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include "gui/widgets/window.h"
25
26#include <guichan/actionlistener.hpp>
27#include <guichan/keylistener.hpp>
28#include <guichan/listmodel.hpp>
29
30class LoginData;
31
37class LoginDialog : public Window, public gcn::ActionListener,
38 public gcn::KeyListener
39{
40 public:
42
43 ~LoginDialog() override;
44
48 void action(const gcn::ActionEvent &event) override;
49
53 void keyPressed(gcn::KeyEvent &keyEvent) override;
54
55 private:
60 bool canSubmit() const;
61
62 gcn::TextField *mUserField;
63 gcn::TextField *mPassField;
64 gcn::CheckBox *mKeepCheck;
65 gcn::Button *mServerButton;
66 gcn::Button *mLoginButton;
67 gcn::Button *mRegisterButton;
68
70};
The login dialog.
Definition logindialog.h:39
gcn::Button * mLoginButton
Definition logindialog.h:66
gcn::TextField * mPassField
Definition logindialog.h:63
LoginData * mLoginData
Definition logindialog.h:69
bool canSubmit() const
Returns whether submit can be enabled.
void action(const gcn::ActionEvent &event) override
Called when receiving actions from the widgets.
~LoginDialog() override
void keyPressed(gcn::KeyEvent &keyEvent) override
Called when a key is pressed in one of the text fields.
gcn::Button * mRegisterButton
Definition logindialog.h:67
gcn::CheckBox * mKeepCheck
Definition logindialog.h:64
gcn::TextField * mUserField
Definition logindialog.h:62
gcn::Button * mServerButton
Definition logindialog.h:65
A window.
Definition window.h:59
LoginData loginData
Definition client.cpp:95