ManaPlus
spellshortcutcontainer.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_WIDGETS_SPELLSHORTCUTCONTAINER_H
24 #define GUI_WIDGETS_SPELLSHORTCUTCONTAINER_H
25 
27 
34 {
35  public:
39  SpellShortcutContainer(Widget2 *const widget,
40  const unsigned number);
41 
43 
44 
47  ~SpellShortcutContainer() override final;
48 
52  void draw(Graphics *const graphics) override final A_NONNULL(2);
53 
54  void safeDraw(Graphics *const graphics) override final A_NONNULL(2);
55 
59  void mouseDragged(MouseEvent &event) override final;
60 
64  void mousePressed(MouseEvent &event) override final;
65 
69  void mouseReleased(MouseEvent &event) override final;
70 
71  void widgetHidden(const Event &event) override final;
72 
73  void mouseExited(MouseEvent &event) override final;
74 
75  void mouseMoved(MouseEvent &event) override final;
76 
77  void setSkin(const Widget2 *const widget,
78  Skin *const skin) override final;
79 
80  int getItemByIndex(const int index) const A_WARN_UNUSED;
81 
82  private:
83  unsigned int mNumber;
85 };
86 
87 #endif // GUI_WIDGETS_SPELLSHORTCUTCONTAINER_H
Definition: event.h:79
Definition: skin.h:37
void mouseExited(MouseEvent &event)
SpellShortcutContainer(Widget2 *const widget, const unsigned number)
int getItemByIndex(const int index) const
void draw(Graphics *const graphics)
void mousePressed(MouseEvent &event)
void mouseMoved(MouseEvent &event)
void setSkin(const Widget2 *const widget, Skin *const skin)
void safeDraw(Graphics *const graphics)
void mouseReleased(MouseEvent &event)
void widgetHidden(const Event &event)
void mouseDragged(MouseEvent &event)
#define A_WARN_UNUSED
Definition: localconsts.h:161
#define A_NONNULL(...)
Definition: localconsts.h:168
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53