ManaPlus
textpopup.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2008 The Legend of Mazzeroth Development Team
4  * Copyright (C) 2008-2009 The Mana World Development Team
5  * Copyright (C) 2009-2010 The Mana Developers
6  * Copyright (C) 2011-2018 The ManaPlus Developers
7  *
8  * This file is part of The ManaPlus Client.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef GUI_POPUPS_TEXTPOPUP_H
25 #define GUI_POPUPS_TEXTPOPUP_H
26 
27 #include "gui/widgets/popup.h"
28 
29 class Label;
30 
31 const int TEXTPOPUPCOUNT = 3;
32 
36 class TextPopup final : public Popup
37 {
38  public:
42  TextPopup();
43 
45 
46 
49  ~TextPopup() override final;
50 
51  void postInit() override final;
52 
56  void show(const int x, const int y, const std::string &str1)
57  {
58  show(x, y, str1, static_cast<const char*>(""),
59  static_cast<const char*>(""));
60  }
61 
65  void show(const int x, const int y, const std::string &str1,
66  const std::string &str2)
67  { show(x, y, str1, str2, static_cast<const char*>("")); }
68 
72  void show(const int x, const int y, const std::string &str1,
73  const std::string &str2, const std::string &str3);
74 
75  void mouseMoved(MouseEvent &event) override final;
76 
77  private:
79 };
80 
81 extern TextPopup *textPopup;
82 
83 #endif // GUI_POPUPS_TEXTPOPUP_H
#define A_DELETE_COPY(func)
Definition: localconsts.h:52
void show(const int x, const int y, const std::string &str1)
Definition: textpopup.h:56
#define final
Definition: localconsts.h:45
Label * mText[TEXTPOPUPCOUNT]
Definition: textpopup.h:78
Definition: label.h:87
void show(const int x, const int y, const std::string &str1, const std::string &str2)
Definition: textpopup.h:65
const int TEXTPOPUPCOUNT
Definition: textpopup.h:31
Definition: popup.h:48
TextPopup * textPopup
Definition: textpopup.cpp:32
void mouseMoved(MouseEvent &event)
Definition: textpopup.cpp:107
void postInit()
Definition: textpopup.cpp:40