ManaPlus
src
gui
widgets
widget.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
/* _______ __ __ __ ______ __ __ _______ __ __
23
* / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
24
* / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
25
* / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
26
* / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
27
* /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
28
* \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
29
*
30
* Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson
31
*
32
*
33
* Per Larsson a.k.a finalman
34
* Olof Naessén a.k.a jansem/yakslem
35
*
36
* Visit: http://guichan.sourceforge.net
37
*
38
* License: (BSD)
39
* Redistribution and use in source and binary forms, with or without
40
* modification, are permitted provided that the following conditions
41
* are met:
42
* 1. Redistributions of source code must retain the above copyright
43
* notice, this list of conditions and the following disclaimer.
44
* 2. Redistributions in binary form must reproduce the above copyright
45
* notice, this list of conditions and the following disclaimer in
46
* the documentation and/or other materials provided with the
47
* distribution.
48
* 3. Neither the name of Guichan nor the names of its contributors may
49
* be used to endorse or promote products derived from this software
50
* without specific prior written permission.
51
*
52
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
53
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
54
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
55
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
56
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
57
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
58
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
59
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
60
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
61
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
62
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63
*/
64
65
#ifndef GUI_WIDGETS_WIDGET_H
66
#define GUI_WIDGETS_WIDGET_H
67
68
#include "
enums/simpletypes/visible.h
"
69
70
#include "
gui/rect.h
"
71
72
#include "
gui/widgets/widget2.h
"
73
74
#include <list>
75
76
#include "
localconsts.h
"
77
78
class
ActionListener
;
79
class
WidgetDeathListener
;
80
class
FocusHandler
;
81
class
FocusListener
;
82
class
Font
;
83
class
Graphics
;
84
class
KeyListener
;
85
class
MouseListener
;
86
class
WidgetListener
;
87
98
class
Widget
notfinal
:
public
Widget2
99
{
100
public
:
101
friend
class
BasicContainer
;
102
108
explicit
Widget
(
const
Widget2
*
const
widget);
109
110
A_DELETE_COPY
(
Widget
)
111
112
115
~Widget
()
override
;
116
126
virtual
void
draw
(
Graphics
*
const
graphics)
A_NONNULL
(2) = 0;
127
128
virtual
void
safeDraw
(
Graphics
*
const
graphics)
A_NONNULL
(2) = 0;
129
149
virtual
void
drawFrame
(
Graphics
* graphics
A_UNUSED
)
A_NONNULL
(2)
150
{ }
151
152
virtual
void
safeDrawFrame
(
Graphics
* graphics
A_UNUSED
)
A_NONNULL
(2)
153
{ }
154
168
void
setFrameSize
(
const
unsigned
int
frameSize)
noexcept2
169
{
mFrameSize
= frameSize; }
170
184
unsigned
int
getFrameSize
() const
noexcept2
A_WARN_UNUSED
185
{
return
mFrameSize
; }
186
193
virtual
void
logic
()
194
{ }
195
202
Widget
*
getParent
() const
noexcept2
A_WARN_UNUSED
203
{
return
mParent
; }
204
212
void
setWidth
(
const
int
width);
213
221
int
getWidth
() const
noexcept2
A_WARN_UNUSED
222
{
return
mDimension
.
width
; }
223
231
void
setHeight
(
const
int
height);
232
240
int
getHeight
() const
noexcept2
A_WARN_UNUSED
241
{
return
mDimension
.
height
; }
242
251
void
setSize
(
const
int
width,
const
int
height);
252
260
void
setX
(
const
int
x
);
261
269
int
getX
() const
noexcept2
A_WARN_UNUSED
270
{
return
mDimension
.
x
; }
271
279
void
setY
(
const
int
y
);
280
288
int
getY
() const
noexcept2
A_WARN_UNUSED
289
{
return
mDimension
.
y
; }
290
299
void
setPosition
(
const
int
x
,
const
int
y
);
300
308
void
setDimension
(
const
Rect
& dimension);
309
317
const
Rect
&
getDimension
() const
noexcept2
A_WARN_UNUSED
318
{
return
mDimension
; }
319
327
void
setFocusable
(
const
bool
focusable);
328
335
bool
isFocusable
() const
A_WARN_UNUSED
;
336
342
virtual
bool
isFocused
() const
A_WARN_UNUSED
;
343
352
void
setEnabled
(const
bool
enabled)
noexcept2
353
{
mEnabled
= enabled; }
354
362
bool
isEnabled
() const
A_WARN_UNUSED
;
363
370
void
setVisible
(
Visible
visible);
371
378
bool
isVisible
() const
A_WARN_UNUSED
379
{
380
return
mVisible
==
Visible_true
&&
381
((
mParent
==
nullptr
) ||
mParent
->
isVisible
());
382
}
383
390
void
setBaseColor
(
const
Color
& color)
noexcept2
391
{
mBaseColor
= color; }
392
399
const
Color
&
getBaseColor
() const
noexcept2
A_WARN_UNUSED
400
{
return
mBaseColor
; }
401
408
void
setForegroundColor
(
const
Color
& color)
noexcept2
409
{
mForegroundColor
= color; }
410
416
const
Color
&
getForegroundColor
() const
noexcept2
A_WARN_UNUSED
417
{
return
mForegroundColor
; }
418
425
void
setBackgroundColor
(
const
Color
&color)
noexcept2
426
{
mBackgroundColor
= color; }
427
433
const
Color
&
getBackgroundColor
() const
noexcept2
A_WARN_UNUSED
434
{
return
mBackgroundColor
; }
435
440
virtual
void
requestFocus
();
441
445
virtual
void
requestMoveToTop
();
446
450
virtual
void
requestMoveToBottom
();
451
462
virtual
void
setFocusHandler
(
FocusHandler
*
const
focusHandler);
463
474
FocusHandler
*
getFocusHandler
()
noexcept2
A_WARN_UNUSED
475
{
return
mFocusHandler
; }
476
485
void
addActionListener
(
ActionListener
*
const
actionListener);
486
493
void
removeActionListener
(
ActionListener
*
const
actionListener);
494
503
void
addDeathListener
(
WidgetDeathListener
*
const
deathListener);
504
511
void
removeDeathListener
(
WidgetDeathListener
*
const
deathListener);
512
521
void
addMouseListener
(
MouseListener
*
const
mouseListener);
522
529
void
removeMouseListener
(
MouseListener
*
const
mouseListener);
530
539
void
addKeyListener
(
KeyListener
*
const
keyListener);
540
547
void
removeKeyListener
(
KeyListener
*
const
keyListener);
548
557
void
addFocusListener
(
FocusListener
*
const
focusListener);
558
565
void
removeFocusListener
(
FocusListener
*
const
focusListener);
566
575
void
addWidgetListener
(
WidgetListener
*
const
widgetListener);
576
583
void
removeWidgetListener
(
WidgetListener
*
const
widgetListener);
584
596
void
setActionEventId
(
const
std::string &actionEventId)
noexcept2
597
{
mActionEventId
= actionEventId; }
598
605
const
std::string &
getActionEventId
() const
noexcept2
606
{
return
mActionEventId
; }
607
614
virtual
void
getAbsolutePosition
(
int
&
x
,
int
&
y
)
const
;
615
626
virtual
void
setParent
(
Widget
* parent)
627
{
mParent
= parent; }
628
637
Font
*
getFont
() const
RETURNS_NONNULL
A_WARN_UNUSED
;
638
645
static
void
setGlobalFont
(
Font
*const font);
646
647
static
Font
*
getGloablFont
()
648
{
return
mGlobalFont
; }
649
650
static
void
cleanGlobalFont
()
651
{
mGlobalFont
=
nullptr
; }
652
660
void
setFont
(
Font
*
const
font);
661
667
virtual
void
fontChanged
()
668
{ }
669
677
static
bool
widgetExists
(
const
Widget
*
const
widget)
A_WARN_UNUSED
;
678
688
bool
isTabInEnabled
() const
noexcept2
A_WARN_UNUSED
689
{
return
mTabIn
; }
690
700
void
setTabInEnabled
(
const
bool
enabled)
noexcept2
701
{
mTabIn
= enabled; }
702
712
bool
isTabOutEnabled
() const
noexcept2
A_WARN_UNUSED
713
{
return
mTabOut
; }
714
724
void
setTabOutEnabled
(
const
bool
enabled)
noexcept2
725
{
mTabOut
= enabled; }
726
734
void
requestModalFocus
();
735
744
virtual
void
requestModalMouseInputFocus
();
745
752
virtual
void
releaseModalFocus
();
753
760
virtual
void
releaseModalMouseInputFocus
();
761
768
virtual
bool
isModalFocused
() const
A_WARN_UNUSED
;
769
777
virtual
bool
isModalMouseInputFocused
() const
A_WARN_UNUSED
;
778
792
virtual
Widget
*
getWidgetAt
(
int
x
A_UNUSED
,
793
int
y
A_UNUSED
)
A_WARN_UNUSED
794
{
return
nullptr
; }
795
801
const
std::list<MouseListener*>&
getMouseListeners
() const
802
A_CONST
A_WARN_UNUSED
;
803
809
const
std
::list<
KeyListener
*>&
getKeyListeners
() const
810
A_CONST
A_WARN_UNUSED
;
811
817
const
std
::list<
FocusListener
*>&
getFocusListeners
() const
818
A_CONST
A_WARN_UNUSED
;
819
839
virtual
Rect
getChildrenArea
()
A_WARN_UNUSED
;
840
848
virtual
FocusHandler
*
getInternalFocusHandler
()
A_WARN_UNUSED
;
849
858
void
setInternalFocusHandler
(
FocusHandler
*const internalFocusHandler);
859
867
virtual
void
moveToTop
(
Widget
* widget
A_UNUSED
)
868
{ }
869
877
virtual
void
moveToBottom
(
Widget
* widget
A_UNUSED
)
878
{ }
879
885
virtual
void
focusNext
()
886
{ }
887
893
virtual
void
focusPrevious
()
894
{ }
895
903
virtual
void
showWidgetPart
(
Widget
*
const
widget
A_UNUSED
,
904
const
Rect
&area
A_UNUSED
)
905
{ }
906
916
void
setId
(
const
std::string&
id
)
917
{
mId
= id; }
918
919
const
std::string&
getId
() const
noexcept2
A_WARN_UNUSED
920
{
return
mId
; }
921
931
virtual
void
showPart
(
const
Rect
&rectangle);
932
933
bool
isAllowLogic
() const
noexcept2
A_WARN_UNUSED
934
{
return
mAllowLogic
; }
935
936
void
setMouseConsume
(
const
bool
b)
noexcept2
937
{
mMouseConsume
= b; }
938
939
bool
isMouseConsume
() const
noexcept2
A_WARN_UNUSED
940
{
return
mMouseConsume
; }
941
942
void
setRedraw
(
const
bool
b)
noexcept2
943
{
mRedraw
= b; }
944
945
virtual
bool
isSelectable
() const
noexcept2
A_WARN_UNUSED
946
{
return
mSelectable
; }
947
948
void
setSelectable
(
const
bool
selectable)
noexcept2
949
{
mSelectable
= selectable; }
950
951
static
void
distributeWindowResizeEvent
();
952
953
void
windowResized
();
954
955
static
Widget
*
callPostInit
(
Widget
*
const
widget)
RETURNS_NONNULL
;
956
957
virtual
void
postInit
()
958
{ }
959
963
Visible
mVisible
;
964
965
protected
:
970
void
distributeActionEvent
();
971
975
void
distributeResizedEvent
();
976
980
void
distributeMovedEvent
();
981
987
void
distributeHiddenEvent
();
988
994
void
distributeShownEvent
();
995
999
typedef
std::list<MouseListener*>
MouseListenerList
;
1000
1004
typedef
MouseListenerList::iterator
MouseListenerIterator
;
1005
1009
MouseListenerList
mMouseListeners
;
1010
1014
typedef
std::list<KeyListener*>
KeyListenerList
;
1015
1019
KeyListenerList
mKeyListeners
;
1020
1024
typedef
KeyListenerList::iterator
KeyListenerIterator
;
1025
1029
typedef
std::list<ActionListener*>
ActionListenerList
;
1030
1034
ActionListenerList
mActionListeners
;
1035
1039
typedef
ActionListenerList::iterator
ActionListenerIterator
;
1040
1044
typedef
std::list<WidgetDeathListener*>
WidgetDeathListenerList
;
1045
1049
WidgetDeathListenerList
mDeathListeners
;
1050
1054
typedef
WidgetDeathListenerList::iterator
WidgetDeathListenerIterator
;
1055
1059
typedef
std::list<FocusListener*>
FocusListenerList
;
1060
1064
FocusListenerList
mFocusListeners
;
1065
1069
typedef
FocusListenerList::iterator
FocusListenerIterator
;
1070
1071
typedef
std::list<WidgetListener*>
WidgetListenerList
;
1072
1076
WidgetListenerList
mWidgetListeners
;
1077
1081
typedef
WidgetListenerList::iterator
WidgetListenerIterator
;
1082
1086
Color
mForegroundColor
;
1087
1091
Color
mBackgroundColor
;
1092
1096
Color
mBaseColor
;
1097
1101
Rect
mDimension
;
1102
1106
std::string
mActionEventId
;
1107
1111
std::string
mId
;
1112
1116
FocusHandler
*
mFocusHandler
;
1117
1122
FocusHandler
*
mInternalFocusHandler
;
1123
1128
Widget
*
mParent
;
1129
1133
Font
*
mCurrentFont
;
1134
1138
unsigned
int
mFrameSize
;
1139
1143
bool
mFocusable
;
1144
1148
bool
mTabIn
;
1149
1153
bool
mTabOut
;
1154
1158
bool
mEnabled
;
1159
1160
bool
mAllowLogic
;
1161
1162
bool
mMouseConsume
;
1163
1164
bool
mRedraw
;
1165
1166
bool
mSelectable
;
1167
1171
static
Font
*
mGlobalFont
;
1172
1173
private
:
1177
static
std::list<Widget*>
mAllWidgets
;
1178
1179
static
std::set<Widget*>
mAllWidgetsSet
;
1180
};
1181
1182
#endif
// GUI_WIDGETS_WIDGET_H
ActionListener
Definition:
actionlistener.h:79
BasicContainer
Definition:
basiccontainer.h:81
Color
Definition:
color.h:76
FocusHandler
Definition:
focushandler.h:85
FocusListener
Definition:
focuslistener.h:79
Font
Definition:
font.h:90
Graphics
Definition:
graphics.h:109
KeyListener
Definition:
keylistener.h:80
MouseListener
Definition:
mouselistener.h:78
Rect
Definition:
rect.h:74
Rect::y
int y
Definition:
rect.h:214
Rect::width
int width
Definition:
rect.h:219
Rect::x
int x
Definition:
rect.h:209
Rect::height
int height
Definition:
rect.h:224
Widget2
Definition:
widget2.h:37
WidgetDeathListener
Definition:
widgetdeathlistener.h:77
WidgetListener
Definition:
widgetlistener.h:81
Widget
Definition:
widget.h:99
Widget::setVisible
void setVisible(Visible visible)
Definition:
widget.cpp:225
Widget::mFocusable
bool mFocusable
Definition:
widget.h:1143
Widget::mAllWidgetsSet
static std::set< Widget * > mAllWidgetsSet
Definition:
widget.h:1179
Widget::isSelectable
virtual bool isSelectable() const
Definition:
widget.h:945
Widget::getFrameSize
unsigned int getFrameSize() const
Definition:
widget.h:184
Widget::mForegroundColor
Color mForegroundColor
Definition:
widget.h:1086
Widget::setFocusHandler
virtual void setFocusHandler(FocusHandler *const focusHandler)
Definition:
widget.cpp:238
Widget::safeDrawFrame
virtual void safeDrawFrame(Graphics *graphics)
Definition:
widget.h:152
Widget::getChildrenArea
virtual Rect getChildrenArea()
Definition:
widget.cpp:451
Widget::setFrameSize
void setFrameSize(const unsigned int frameSize)
Definition:
widget.h:168
Widget::mAllWidgets
static std::list< Widget * > mAllWidgets
Definition:
widget.h:1177
Widget::setFocusable
void setFocusable(const bool focusable)
Definition:
widget.cpp:192
Widget::setBackgroundColor
void setBackgroundColor(const Color &color)
Definition:
widget.h:425
Widget::removeActionListener
void removeActionListener(ActionListener *const actionListener)
Definition:
widget.cpp:257
Widget::distributeWindowResizeEvent
static void distributeWindowResizeEvent()
Definition:
widget.cpp:355
Widget::WidgetDeathListenerList
std::list< WidgetDeathListener * > WidgetDeathListenerList
Definition:
widget.h:1044
Widget::getBaseColor
const Color & getBaseColor() const
Definition:
widget.h:399
Widget::setWidth
void setWidth(const int width)
Definition:
widget.cpp:133
Widget::setSize
void setSize(const int width, const int height)
Definition:
widget.cpp:367
Widget::distributeActionEvent
void distributeActionEvent()
Definition:
widget.cpp:493
Widget::distributeMovedEvent
void distributeMovedEvent()
Definition:
widget.cpp:475
Widget::getFocusHandler
FocusHandler * getFocusHandler()
Definition:
widget.h:474
Widget::setInternalFocusHandler
void setInternalFocusHandler(FocusHandler *const internalFocusHandler)
Definition:
widget.cpp:461
Widget::FocusListenerList
std::list< FocusListener * > FocusListenerList
Definition:
widget.h:1059
Widget::setMouseConsume
void setMouseConsume(const bool b)
Definition:
widget.h:936
Widget::getAbsolutePosition
virtual void getAbsolutePosition(int &x, int &y) const
Definition:
widget.cpp:312
Widget::requestMoveToTop
virtual void requestMoveToTop()
Definition:
widget.cpp:213
Widget::ActionListenerList
std::list< ActionListener * > ActionListenerList
Definition:
widget.h:1029
Widget::setBaseColor
void setBaseColor(const Color &color)
Definition:
widget.h:390
Widget::focusNext
virtual void focusNext()
Definition:
widget.h:885
Widget::getForegroundColor
const Color & getForegroundColor() const
Definition:
widget.h:416
Widget::removeMouseListener
void removeMouseListener(MouseListener *const mouseListener)
Definition:
widget.cpp:297
Widget::KeyListenerIterator
KeyListenerList::iterator KeyListenerIterator
Definition:
widget.h:1024
Widget::postInit
virtual void postInit()
Definition:
widget.h:957
Widget::drawFrame
virtual void drawFrame(Graphics *graphics)
Definition:
widget.h:149
Widget::isModalMouseInputFocused
virtual bool isModalMouseInputFocused() const
Definition:
widget.cpp:422
Widget::getInternalFocusHandler
virtual FocusHandler * getInternalFocusHandler()
Definition:
widget.cpp:456
Widget::logic
virtual void logic()
Definition:
widget.h:193
Widget::showPart
virtual void showPart(const Rect &rectangle)
Definition:
widget.cpp:511
Widget::setForegroundColor
void setForegroundColor(const Color &color)
Definition:
widget.h:408
Widget::getDimension
const Rect & getDimension() const
Definition:
widget.h:317
Widget::mParent
Widget * mParent
Definition:
widget.h:1128
Widget::Widget
Widget(const Widget2 *const widget)
Definition:
widget.cpp:85
Widget::showWidgetPart
virtual void showWidgetPart(Widget *const widget, const Rect &area)
Definition:
widget.h:903
Widget::moveToBottom
virtual void moveToBottom(Widget *widget)
Definition:
widget.h:877
Widget::mDimension
Rect mDimension
Definition:
widget.h:1101
Widget::WidgetListenerIterator
WidgetListenerList::iterator WidgetListenerIterator
Definition:
widget.h:1081
Widget::setY
void setY(const int y)
Definition:
widget.cpp:154
Widget::mFrameSize
unsigned int mFrameSize
Definition:
widget.h:1138
Widget::mBackgroundColor
Color mBackgroundColor
Definition:
widget.h:1091
Widget::removeKeyListener
void removeKeyListener(KeyListener *const keyListener)
Definition:
widget.cpp:277
Widget::widgetExists
static bool widgetExists(const Widget *const widget)
Definition:
widget.cpp:361
Widget::mGlobalFont
static Font * mGlobalFont
Definition:
widget.h:1171
Widget::isMouseConsume
bool isMouseConsume() const
Definition:
widget.h:939
Widget::mCurrentFont
Font * mCurrentFont
Definition:
widget.h:1133
Widget::releaseModalMouseInputFocus
virtual void releaseModalMouseInputFocus()
Definition:
widget.cpp:401
Widget::mAllowLogic
bool mAllowLogic
Definition:
widget.h:1160
Widget::mFocusHandler
FocusHandler * mFocusHandler
Definition:
widget.h:1116
Widget::setEnabled
void setEnabled(const bool enabled)
Definition:
widget.h:352
Widget::mTabIn
bool mTabIn
Definition:
widget.h:1148
Widget::removeDeathListener
void removeDeathListener(WidgetDeathListener *const deathListener)
Definition:
widget.cpp:267
Widget::setRedraw
void setRedraw(const bool b)
Definition:
widget.h:942
Widget::getMouseListeners
const std::list< MouseListener * > & getMouseListeners() const A_CONST
Definition:
widget.cpp:436
Widget::requestModalMouseInputFocus
virtual void requestModalMouseInputFocus()
Definition:
widget.cpp:387
Widget::windowResized
void windowResized()
Definition:
widget.cpp:517
Widget::callPostInit
static Widget * callPostInit(Widget *const widget)
Definition:
widget.cpp:522
Widget::requestModalFocus
void requestModalFocus()
Definition:
widget.cpp:380
Widget::setId
void setId(const std::string &id)
Definition:
widget.h:916
Widget::isFocusable
bool isFocusable() const
Definition:
widget.cpp:199
Widget::addMouseListener
void addMouseListener(MouseListener *const mouseListener)
Definition:
widget.cpp:292
Widget::mActionListeners
ActionListenerList mActionListeners
Definition:
widget.h:1034
Widget::FocusListenerIterator
FocusListenerList::iterator FocusListenerIterator
Definition:
widget.h:1069
Widget::mSelectable
bool mSelectable
Definition:
widget.h:1166
Widget::setGlobalFont
static void setGlobalFont(Font *const font)
Definition:
widget.cpp:338
Widget::setFont
void setFont(Font *const font)
Definition:
widget.cpp:349
Widget::addWidgetListener
void addWidgetListener(WidgetListener *const widgetListener)
Definition:
widget.cpp:302
Widget::setHeight
void setHeight(const int height)
Definition:
widget.cpp:140
Widget::mKeyListeners
KeyListenerList mKeyListeners
Definition:
widget.h:1019
Widget::setActionEventId
void setActionEventId(const std::string &actionEventId)
Definition:
widget.h:596
Widget::MouseListenerIterator
MouseListenerList::iterator MouseListenerIterator
Definition:
widget.h:1004
Widget::setTabInEnabled
void setTabInEnabled(const bool enabled)
Definition:
widget.h:700
Widget::isTabInEnabled
bool isTabInEnabled() const
Definition:
widget.h:688
Widget::distributeResizedEvent
void distributeResizedEvent()
Definition:
widget.cpp:466
Widget::fontChanged
virtual void fontChanged()
Definition:
widget.h:667
Widget::~Widget
~Widget()
Definition:
widget.cpp:118
Widget::setTabOutEnabled
void setTabOutEnabled(const bool enabled)
Definition:
widget.h:724
Widget::mEnabled
bool mEnabled
Definition:
widget.h:1158
Widget::addKeyListener
void addKeyListener(KeyListener *const keyListener)
Definition:
widget.cpp:272
Widget::KeyListenerList
std::list< KeyListener * > KeyListenerList
Definition:
widget.h:1014
Widget::mFocusListeners
FocusListenerList mFocusListeners
Definition:
widget.h:1064
Widget::moveToTop
virtual void moveToTop(Widget *widget)
Definition:
widget.h:867
Widget::requestFocus
virtual void requestFocus()
Definition:
widget.cpp:204
Widget::getY
int getY() const
Definition:
widget.h:288
Widget::isTabOutEnabled
bool isTabOutEnabled() const
Definition:
widget.h:712
Widget::getBackgroundColor
const Color & getBackgroundColor() const
Definition:
widget.h:433
Widget::focusPrevious
virtual void focusPrevious()
Definition:
widget.h:893
Widget::isAllowLogic
bool isAllowLogic() const
Definition:
widget.h:933
Widget::MouseListenerList
std::list< MouseListener * > MouseListenerList
Definition:
widget.h:999
Widget::setDimension
void setDimension(const Rect &dimension)
Definition:
widget.cpp:169
Widget::mRedraw
bool mRedraw
Definition:
widget.h:1164
Widget::mMouseListeners
MouseListenerList mMouseListeners
Definition:
widget.h:1009
Widget::mId
std::string mId
Definition:
widget.h:1111
Widget::getFont
Font * getFont() const
Definition:
widget.cpp:331
Widget::mBaseColor
Color mBaseColor
Definition:
widget.h:1096
Widget::getId
const std::string & getId() const
Definition:
widget.h:919
Widget::WidgetDeathListenerIterator
WidgetDeathListenerList::iterator WidgetDeathListenerIterator
Definition:
widget.h:1054
Widget::cleanGlobalFont
static void cleanGlobalFont()
Definition:
widget.h:650
Widget::mVisible
Visible mVisible
Definition:
widget.h:963
Widget::safeDraw
virtual void safeDraw(Graphics *const graphics)=0
Widget::requestMoveToBottom
virtual void requestMoveToBottom()
Definition:
widget.cpp:219
Widget::isModalFocused
virtual bool isModalFocused() const
Definition:
widget.cpp:408
Widget::getWidgetAt
virtual Widget * getWidgetAt(int x, int y)
Definition:
widget.h:792
Widget::setParent
virtual void setParent(Widget *parent)
Definition:
widget.h:626
Widget::mInternalFocusHandler
FocusHandler * mInternalFocusHandler
Definition:
widget.h:1122
Widget::removeWidgetListener
void removeWidgetListener(WidgetListener *const widgetListener)
Definition:
widget.cpp:307
Widget::addDeathListener
void addDeathListener(WidgetDeathListener *const deathListener)
Definition:
widget.cpp:262
Widget::distributeHiddenEvent
void distributeHiddenEvent()
Definition:
widget.cpp:484
Widget::mActionEventId
std::string mActionEventId
Definition:
widget.h:1106
Widget::isEnabled
bool isEnabled() const
Definition:
widget.cpp:375
Widget::getKeyListeners
const std::list< KeyListener * > & getKeyListeners() const A_CONST
Definition:
widget.cpp:441
Widget::setSelectable
void setSelectable(const bool selectable)
Definition:
widget.h:948
Widget::draw
virtual void draw(Graphics *const graphics)=0
Widget::mWidgetListeners
WidgetListenerList mWidgetListeners
Definition:
widget.h:1076
Widget::addActionListener
void addActionListener(ActionListener *const actionListener)
Definition:
widget.cpp:252
Widget::setX
void setX(const int x)
Definition:
widget.cpp:147
Widget::setPosition
void setPosition(const int x, const int y)
Definition:
widget.cpp:161
Widget::mMouseConsume
bool mMouseConsume
Definition:
widget.h:1162
Widget::releaseModalFocus
virtual void releaseModalFocus()
Definition:
widget.cpp:394
Widget::addFocusListener
void addFocusListener(FocusListener *const focusListener)
Definition:
widget.cpp:282
Widget::isVisible
bool isVisible() const
Definition:
widget.h:378
Widget::getFocusListeners
const std::list< FocusListener * > & getFocusListeners() const A_CONST
Definition:
widget.cpp:446
Widget::mTabOut
bool mTabOut
Definition:
widget.h:1153
Widget::distributeShownEvent
void distributeShownEvent()
Definition:
widget.cpp:502
Widget::removeFocusListener
void removeFocusListener(FocusListener *const focusListener)
Definition:
widget.cpp:287
Widget::WidgetListenerList
std::list< WidgetListener * > WidgetListenerList
Definition:
widget.h:1071
Widget::getParent
Widget * getParent() const
Definition:
widget.h:202
Widget::ActionListenerIterator
ActionListenerList::iterator ActionListenerIterator
Definition:
widget.h:1039
Widget::getX
int getX() const
Definition:
widget.h:269
Widget::getHeight
int getHeight() const
Definition:
widget.h:240
Widget::getActionEventId
const std::string & getActionEventId() const
Definition:
widget.h:605
Widget::getWidth
int getWidth() const
Definition:
widget.h:221
Widget::isFocused
virtual bool isFocused() const
Definition:
widget.cpp:184
Widget::getGloablFont
static Font * getGloablFont()
Definition:
widget.h:647
Widget::mDeathListeners
WidgetDeathListenerList mDeathListeners
Definition:
widget.h:1049
y
y
Definition:
graphics_calcImageRect.hpp:73
x
x
Definition:
graphics_calcImageRect.hpp:73
localconsts.h
RETURNS_NONNULL
#define RETURNS_NONNULL
Definition:
localconsts.h:167
A_WARN_UNUSED
#define A_WARN_UNUSED
Definition:
localconsts.h:161
notfinal
#define notfinal
Definition:
localconsts.h:261
A_NONNULL
#define A_NONNULL(...)
Definition:
localconsts.h:168
noexcept2
#define noexcept2
Definition:
localconsts.h:50
A_DELETE_COPY
#define A_DELETE_COPY(func)
Definition:
localconsts.h:53
A_UNUSED
#define A_UNUSED
Definition:
localconsts.h:160
std
Definition:
mseprimitives.h:398
rect.h
visible.h
Visible
bool Visible
Definition:
visible.h:30
Visible_true
const bool Visible_true
Definition:
visible.h:30
widget2.h
Generated on Wed Mar 17 2021 19:19:07 for ManaPlus by
1.9.1