ManaPlus
setup_colors.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2008 Douglas Boffey <[email protected]>
4  * Copyright (C) 2011-2019 The ManaPlus Developers
5  * Copyright (C) 2019-2021 Andrei Karas
6  *
7  * This file is part of The ManaPlus Client.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef GUI_WIDGETS_TABS_SETUP_COLORS_H
24 #define GUI_WIDGETS_TABS_SETUP_COLORS_H
25 
27 
29 
30 class BrowserBox;
31 class Label;
32 class ListBox;
33 class ScrollArea;
34 class Slider;
35 class TextField;
36 class TextPreview;
37 
38 class Setup_Colors final : public SetupTab,
39  public SelectionListener
40 {
41  public:
42  explicit Setup_Colors(const Widget2 *const widget);
43 
45 
46  ~Setup_Colors() override final;
47 
48  void apply() override final;
49 
50  void cancel() override final;
51 
52  void action(const ActionEvent &event) override final;
53 
54  void valueChanged(const SelectionEvent &event) override final;
55 
56  private:
57  static const char *const rawmsg;
58 
64  int mSelected;
65 
69 
73 
77 
81 
85 
86  static void setEntry(Slider *const s, TextField *const t,
87  const int value);
88  void updateColor() const;
89  void updateGradType();
90 };
91 
92 #endif // GUI_WIDGETS_TABS_SETUP_COLORS_H
Definition: label.h:91
ListBox * mColorBox
Definition: setup_colors.h:59
Slider * mRedSlider
Definition: setup_colors.h:75
BrowserBox * mPreview
Definition: setup_colors.h:61
void updateColor() const
TextField * mGradDelayText
Definition: setup_colors.h:72
ScrollArea * mPreviewBox
Definition: setup_colors.h:63
Label * mGradDelayLabel
Definition: setup_colors.h:70
static void setEntry(Slider *const s, TextField *const t, const int value)
TextField * mBlueText
Definition: setup_colors.h:84
Label * mBlueLabel
Definition: setup_colors.h:82
Slider * mGradTypeSlider
Definition: setup_colors.h:67
void action(const ActionEvent &event)
TextPreview * mTextPreview
Definition: setup_colors.h:62
Label * mGradTypeText
Definition: setup_colors.h:68
Setup_Colors(const Widget2 *const widget)
void valueChanged(const SelectionEvent &event)
Label * mGradTypeLabel
Definition: setup_colors.h:66
TextField * mRedText
Definition: setup_colors.h:76
Label * mRedLabel
Definition: setup_colors.h:74
Slider * mGradDelaySlider
Definition: setup_colors.h:71
Slider * mBlueSlider
Definition: setup_colors.h:83
TextField * mGreenText
Definition: setup_colors.h:80
ScrollArea * mScroll
Definition: setup_colors.h:60
void updateGradType()
Slider * mGreenSlider
Definition: setup_colors.h:79
Label * mGreenLabel
Definition: setup_colors.h:78
static const char *const rawmsg
Definition: setup_colors.h:57
Definition: slider.h:89
#define A_NONNULLPOINTER
Definition: localconsts.h:266
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53