ManaPlus
src
gui
widgets
tabs
setuptabscroll.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_TABS_SETUPTABSCROLL_H
23
#define GUI_WIDGETS_TABS_SETUPTABSCROLL_H
24
25
#include "
gui/widgets/tabs/setuptab.h
"
26
27
#include "
localconsts.h
"
28
29
class
SetupItem
;
30
class
ScrollArea
;
31
class
VertContainer
;
32
33
class
SetupTabScroll
notfinal
:
public
SetupTab
34
{
35
public
:
36
explicit
SetupTabScroll
(
const
Widget2
*
const
widget);
37
38
A_DELETE_COPY
(
SetupTabScroll
)
39
40
~SetupTabScroll
()
override
;
41
42
void
addControl
(
SetupItem
*
const
widget);
43
44
void
addControl
(
SetupItem
*
const
widget,
const
std::string &event);
45
46
VertContainer
*
getContainer
() const
noexcept2
A_WARN_UNUSED
47
{
return
mContainer
; }
48
49
void
apply
()
override
;
50
51
void
cancel
()
override
final
;
52
53
void
externalUpdated
()
override
;
54
55
void
externalUnloaded
()
override
;
56
57
void
action
(const
ActionEvent
&event
A_UNUSED
)
override
final
58
{ }
59
60
int
getPreferredFirstItemSize
() const
noexcept2
A_WARN_UNUSED
61
{
return
mPreferredFirstItemSize
; }
62
63
void
widgetResized
(
const
Event
&event)
override
final
;
64
65
void
reread
(
const
std::string &name);
66
67
void
clear
()
override
final
;
68
69
const
std
::set<
SetupItem
*> &
getAllItems
() const
noexcept2
70
{
return
mAllItems
; }
71
72
protected
:
73
void
removeItems
();
74
75
VertContainer
*
mContainer
;
76
ScrollArea
*
mScroll
;
77
std::map<std::string, SetupItem*>
mItems
;
78
std::set<SetupItem*>
mAllItems
;
79
int
mPreferredFirstItemSize
;
80
};
81
82
#endif
// GUI_WIDGETS_TABS_SETUPTABSCROLL_H
ActionEvent
Definition:
actionevent.h:98
Event
Definition:
event.h:79
ScrollArea
Definition:
scrollarea.h:94
SetupItem
Definition:
setupitem.h:53
SetupTabScroll
Definition:
setuptabscroll.h:34
SetupTabScroll::widgetResized
void widgetResized(const Event &event)
Definition:
setuptabscroll.cpp:153
SetupTabScroll::apply
void apply()
Definition:
setuptabscroll.cpp:107
SetupTabScroll::action
void action(const ActionEvent &event)
Definition:
setuptabscroll.h:57
SetupTabScroll::cancel
void cancel()
Definition:
setuptabscroll.cpp:118
SetupTabScroll::mPreferredFirstItemSize
int mPreferredFirstItemSize
Definition:
setuptabscroll.h:79
SetupTabScroll::getPreferredFirstItemSize
int getPreferredFirstItemSize() const
Definition:
setuptabscroll.h:60
SetupTabScroll::mItems
std::map< std::string, SetupItem * > mItems
Definition:
setuptabscroll.h:77
SetupTabScroll::~SetupTabScroll
~SetupTabScroll()
Definition:
setuptabscroll.cpp:46
SetupTabScroll::addControl
void addControl(SetupItem *const widget)
Definition:
setuptabscroll.cpp:74
SetupTabScroll::reread
void reread(const std::string &name)
Definition:
setuptabscroll.cpp:159
SetupTabScroll::removeItems
void removeItems()
Definition:
setuptabscroll.cpp:53
SetupTabScroll::mAllItems
std::set< SetupItem * > mAllItems
Definition:
setuptabscroll.h:78
SetupTabScroll::SetupTabScroll
SetupTabScroll(const Widget2 *const widget)
Definition:
setuptabscroll.cpp:32
SetupTabScroll::getContainer
VertContainer * getContainer() const
Definition:
setuptabscroll.h:46
SetupTabScroll::mContainer
VertContainer * mContainer
Definition:
setuptabscroll.h:75
SetupTabScroll::clear
void clear()
Definition:
setuptabscroll.cpp:67
SetupTabScroll::externalUnloaded
void externalUnloaded()
Definition:
setuptabscroll.cpp:141
SetupTabScroll::mScroll
ScrollArea * mScroll
Definition:
setuptabscroll.h:76
SetupTabScroll::externalUpdated
void externalUpdated()
Definition:
setuptabscroll.cpp:129
SetupTabScroll::getAllItems
const std::set< SetupItem * > & getAllItems() const
Definition:
setuptabscroll.h:69
SetupTab
Definition:
setuptab.h:40
VertContainer
Definition:
vertcontainer.h:39
Widget2
Definition:
widget2.h:37
localconsts.h
override
#define override
Definition:
localconsts.h:47
A_WARN_UNUSED
#define A_WARN_UNUSED
Definition:
localconsts.h:161
notfinal
#define notfinal
Definition:
localconsts.h:261
noexcept2
#define noexcept2
Definition:
localconsts.h:50
final
#define final
Definition:
localconsts.h:46
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
setuptab.h
Generated on Wed Mar 17 2021 19:19:07 for ManaPlus by
1.9.1