ManaPlus
src
gui
widgets
pincode.h
Go to the documentation of this file.
1
/*
2
* The ManaPlus Client
3
* Copyright (C) 2011-2019 The ManaPlus Developers
4
* Copyright (C) 2019-2021 Andrei Karas
5
*
6
* This file is part of The ManaPlus 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
#ifndef GUI_WIDGETS_PINCODE_H
23
#define GUI_WIDGETS_PINCODE_H
24
25
#include "
gui/widgets/container.h
"
26
27
#include "
listeners/actionlistener.h
"
28
#include "
listeners/widgetlistener.h
"
29
30
#include "
localconsts.h
"
31
32
class
Button
;
33
class
Skin
;
34
class
TextField
;
35
36
class
Pincode
final
:
public
Container
,
37
public
ActionListener
,
38
public
WidgetListener
39
{
40
public
:
41
Pincode
(
const
Widget2
*
const
widget,
42
TextField
*
const
textField);
43
44
A_DELETE_COPY
(
Pincode
)
45
46
~Pincode
()
override
final
;
47
48
void
adjustSize
();
49
50
void
action
(
const
ActionEvent
&event)
override
final
;
51
52
void
shuffle
(uint32_t seed)
const
;
53
54
static
Skin
*
mSkin
;
55
56
static
int
mInstances
;
57
58
static
void
finalCleanup
();
59
60
protected
:
61
void
addButtons
();
62
63
private
:
64
Button
*
mButtons
[11];
65
std::string
mText
;
66
TextField
*
mTextField
;
67
int
mPadding
;
68
int
mSpacing
;
69
int
mButtonWidth
;
70
int
mButtonHeight
;
71
};
72
73
#endif
// GUI_WIDGETS_PINCODE_H
actionlistener.h
ActionEvent
Definition:
actionevent.h:98
ActionListener
Definition:
actionlistener.h:79
Button
Definition:
button.h:102
Container
Definition:
container.h:39
Pincode
Definition:
pincode.h:39
Pincode::mSpacing
int mSpacing
Definition:
pincode.h:68
Pincode::shuffle
void shuffle(uint32_t seed) const
Definition:
pincode.cpp:180
Pincode::action
void action(const ActionEvent &event)
Definition:
pincode.cpp:155
Pincode::mButtonWidth
int mButtonWidth
Definition:
pincode.h:69
Pincode::finalCleanup
static void finalCleanup()
Definition:
pincode.cpp:150
Pincode::Pincode
Pincode(const Widget2 *const widget, TextField *const textField)
Definition:
pincode.cpp:38
Pincode::addButtons
void addButtons()
Definition:
pincode.cpp:93
Pincode::mButtonHeight
int mButtonHeight
Definition:
pincode.h:70
Pincode::~Pincode
~Pincode()
Definition:
pincode.cpp:77
Pincode::mPadding
int mPadding
Definition:
pincode.h:67
Pincode::mSkin
static Skin * mSkin
Definition:
pincode.h:54
Pincode::mText
std::string mText
Definition:
pincode.h:65
Pincode::adjustSize
void adjustSize()
Definition:
pincode.cpp:143
Pincode::mButtons
Button * mButtons[11]
Definition:
pincode.h:64
Pincode::mInstances
static int mInstances
Definition:
pincode.h:56
Pincode::mTextField
TextField * mTextField
Definition:
pincode.h:66
Skin
Definition:
skin.h:37
TextField
Definition:
textfield.h:93
Widget2
Definition:
widget2.h:37
WidgetListener
Definition:
widgetlistener.h:81
container.h
localconsts.h
final
#define final
Definition:
localconsts.h:46
A_DELETE_COPY
#define A_DELETE_COPY(func)
Definition:
localconsts.h:53
widgetlistener.h
Generated on Wed Mar 17 2021 19:19:06 for ManaPlus by
1.9.1