ManaPlus
textcommandeditor.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2009 The Mana World Development Team
4  * Copyright (C) 2011-2019 The ManaPlus Developers
5  * Copyright (C) 2009-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_WINDOWS_TEXTCOMMANDEDITOR_H
24 #define GUI_WINDOWS_TEXTCOMMANDEDITOR_H
25 
26 #include "gui/widgets/window.h"
27 
29 
30 class Button;
31 class DropDown;
32 class IconsModel;
33 class IntTextField;
34 class Label;
35 #ifdef TMWA_SUPPORT
36 class MagicSchoolModel;
37 #endif // TMWA_SUPPORT
38 
39 class RadioButton;
40 class TargetTypeModel;
41 class TextCommand;
42 class TextField;
43 
45  public ActionListener
46 {
47  public:
51  explicit TextCommandEditor(TextCommand *const command);
52 
54 
55 
58  ~TextCommandEditor() override final;
59 
60  void postInit() override final;
61 
62  void action(const ActionEvent &event) override final;
63 
64  void scheduleDelete() override final;
65 
66  private:
67 #ifdef TMWA_SUPPORT
68  void showControls(const Visible show);
69 #endif // TMWA_SUPPORT
70 
71  void save();
72 
73  void deleteCommand();
74 
75 #ifdef TMWA_SUPPORT
77 #endif // TMWA_SUPPORT
78 
80 #ifdef TMWA_SUPPORT
82 #endif // TMWA_SUPPORT
83 
97 #ifdef TMWA_SUPPORT
107 #endif // TMWA_SUPPORT
108 
112 
114 };
115 
116 #endif // GUI_WINDOWS_TEXTCOMMANDEDITOR_H
Definition: button.h:102
Definition: label.h:91
TextCommand * mCommand
TextField * mCommentTextField
IconsModel * mIconsModel
IntTextField * mManaField
TargetTypeModel * mTargetTypeModel
MagicSchoolModel * mMagicSchoolModel
DropDown * mSchoolDropDown
void action(const ActionEvent &event)
IntTextField * mMagicLvlField
DropDown * mTypeDropDown
DropDown * mIconDropDown
TextField * mSymbolTextField
IntTextField * mSchoolLvlField
void showControls(const Visible show)
RadioButton * mIsMagic
TextCommandEditor(TextCommand *const command)
RadioButton * mIsOther
TextField * mCommandTextField
Definition: window.h:102
#define A_NONNULLPOINTER
Definition: localconsts.h:266
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53
bool Visible
Definition: visible.h:30