Mana
Loading...
Searching...
No Matches
src
gui
setup_colors.h
Go to the documentation of this file.
1
/*
2
* Configurable text colors
3
* Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net>
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 "
guichanfwd.h
"
25
26
#include "
gui/widgets/setuptab.h
"
27
28
#include <guichan/actionlistener.hpp>
29
#include <guichan/selectionlistener.hpp>
30
31
#include <string>
32
33
class
BrowserBox
;
34
class
TextField
;
35
class
TextPreview
;
36
37
class
Setup_Colors
:
public
SetupTab
,
38
public
gcn::ActionListener,
39
public
gcn::SelectionListener
40
{
41
public
:
42
Setup_Colors
();
43
~Setup_Colors
()
override
;
44
45
void
apply
()
override
;
46
void
cancel
()
override
;
47
48
void
action
(
const
gcn::ActionEvent &event)
override
;
49
50
void
valueChanged
(
const
gcn::SelectionEvent &event)
override
;
51
52
private
:
53
static
const
std::string
rawmsg
;
54
55
gcn::ListBox *
mColorBox
;
56
gcn::ScrollArea *
mScroll
;
57
BrowserBox
*
mPreview
;
58
TextPreview
*
mTextPreview
;
59
gcn::ScrollArea *
mPreviewBox
;
60
int
mSelected
;
61
62
gcn::Label *
mGradTypeLabel
;
63
gcn::Slider *
mGradTypeSlider
;
64
gcn::Label *
mGradTypeText
;
65
66
gcn::Label *
mGradDelayLabel
;
67
gcn::Slider *
mGradDelaySlider
;
68
TextField
*
mGradDelayText
;
69
70
gcn::Label *
mRedLabel
;
71
gcn::Slider *
mRedSlider
;
72
TextField
*
mRedText
;
73
int
mRedValue
;
74
75
gcn::Label *
mGreenLabel
;
76
gcn::Slider *
mGreenSlider
;
77
TextField
*
mGreenText
;
78
int
mGreenValue
;
79
80
gcn::Label *
mBlueLabel
;
81
gcn::Slider *
mBlueSlider
;
82
TextField
*
mBlueText
;
83
int
mBlueValue
;
84
85
void
setEntry
(gcn::Slider *s,
TextField
*t,
int
value);
86
void
updateColor
();
87
void
updateGradType
();
88
};
BrowserBox
A simple browser box able to handle links and forward events to the parent conteiner.
Definition
browserbox.h:74
SetupTab
A container for the contents of a tab in the setup window.
Definition
setuptab.h:32
Setup_Colors
Definition
setup_colors.h:40
Setup_Colors::rawmsg
static const std::string rawmsg
Definition
setup_colors.h:53
Setup_Colors::valueChanged
void valueChanged(const gcn::SelectionEvent &event) override
Definition
setup_colors.cpp:224
Setup_Colors::mColorBox
gcn::ListBox * mColorBox
Definition
setup_colors.h:55
Setup_Colors::mPreview
BrowserBox * mPreview
Definition
setup_colors.h:57
Setup_Colors::mRedLabel
gcn::Label * mRedLabel
Definition
setup_colors.h:70
Setup_Colors::mGradDelayText
TextField * mGradDelayText
Definition
setup_colors.h:68
Setup_Colors::mGradTypeSlider
gcn::Slider * mGradTypeSlider
Definition
setup_colors.h:63
Setup_Colors::mPreviewBox
gcn::ScrollArea * mPreviewBox
Definition
setup_colors.h:59
Setup_Colors::mGreenValue
int mGreenValue
Definition
setup_colors.h:78
Setup_Colors::mRedSlider
gcn::Slider * mRedSlider
Definition
setup_colors.h:71
Setup_Colors::mScroll
gcn::ScrollArea * mScroll
Definition
setup_colors.h:56
Setup_Colors::setEntry
void setEntry(gcn::Slider *s, TextField *t, int value)
Definition
setup_colors.cpp:274
Setup_Colors::mBlueText
TextField * mBlueText
Definition
setup_colors.h:82
Setup_Colors::mGreenSlider
gcn::Slider * mGreenSlider
Definition
setup_colors.h:76
Setup_Colors::apply
void apply() override
Called when the Apply button is pressed in the setup window.
Definition
setup_colors.cpp:282
Setup_Colors::mGradTypeLabel
gcn::Label * mGradTypeLabel
Definition
setup_colors.h:62
Setup_Colors::mGreenLabel
gcn::Label * mGreenLabel
Definition
setup_colors.h:75
Setup_Colors::mTextPreview
TextPreview * mTextPreview
Definition
setup_colors.h:58
Setup_Colors::action
void action(const gcn::ActionEvent &event) override
Definition
setup_colors.cpp:186
Setup_Colors::mRedValue
int mRedValue
Definition
setup_colors.h:73
Setup_Colors::mBlueSlider
gcn::Slider * mBlueSlider
Definition
setup_colors.h:81
Setup_Colors::mGradTypeText
gcn::Label * mGradTypeText
Definition
setup_colors.h:64
Setup_Colors::mBlueLabel
gcn::Label * mBlueLabel
Definition
setup_colors.h:80
Setup_Colors::mGradDelayLabel
gcn::Label * mGradDelayLabel
Definition
setup_colors.h:66
Setup_Colors::mRedText
TextField * mRedText
Definition
setup_colors.h:72
Setup_Colors::Setup_Colors
Setup_Colors()
Definition
setup_colors.cpp:45
Setup_Colors::mGreenText
TextField * mGreenText
Definition
setup_colors.h:77
Setup_Colors::mBlueValue
int mBlueValue
Definition
setup_colors.h:83
Setup_Colors::mGradDelaySlider
gcn::Slider * mGradDelaySlider
Definition
setup_colors.h:67
Setup_Colors::updateGradType
void updateGradType()
Definition
setup_colors.cpp:316
Setup_Colors::mSelected
int mSelected
Definition
setup_colors.h:60
Setup_Colors::cancel
void cancel() override
Called when the Cancel button is pressed in the setup window.
Definition
setup_colors.cpp:287
Setup_Colors::~Setup_Colors
~Setup_Colors() override
Definition
setup_colors.cpp:178
Setup_Colors::updateColor
void updateColor()
Definition
setup_colors.cpp:344
TextField
A text field.
Definition
textfield.h:72
TextPreview
Preview widget for particle colors, etc.
Definition
textpreview.h:32
guichanfwd.h
setuptab.h
Generated by
1.9.8