ManaPlus
debugwindow.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2019 The ManaPlus Developers
6  * Copyright (C) 2019-2021 Andrei Karas
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_WINDOWS_DEBUGWINDOW_H
25 #define GUI_WINDOWS_DEBUGWINDOW_H
26 
27 #include "gui/widgets/window.h"
28 
29 class MapDebugTab;
30 class NetDebugTab;
31 class StatDebugTab;
32 class TabbedArea;
33 class TargetDebugTab;
34 
40 class DebugWindow final : public Window
41 {
42  public:
46  explicit DebugWindow(const std::string &name);
47 
49 
50  ~DebugWindow() override final;
51 
52  void postInit() override final;
53 
57  void slowLogic();
58 
59  void draw(Graphics *const g) override final A_NONNULL(2);
60 
61  void safeDraw(Graphics *const g) override final A_NONNULL(2);
62 
63  void setPing(int pingTime);
64 
65  void widgetResized(const Event &event) override final;
66 
67 #ifdef USE_PROFILER
68  void logicChildren();
69 #endif // USE_PROFILER
70 
71  private:
77 };
78 
79 extern DebugWindow *debugWindow;
80 
81 #endif // GUI_WINDOWS_DEBUGWINDOW_H
virtual void logicChildren()
void safeDraw(Graphics *const g)
TabbedArea * mTabs
Definition: debugwindow.h:72
void draw(Graphics *const g)
void setPing(int pingTime)
MapDebugTab * mMapWidget
Definition: debugwindow.h:73
TargetDebugTab * mTargetWidget
Definition: debugwindow.h:74
DebugWindow(const std::string &name)
Definition: debugwindow.cpp:45
void slowLogic()
void postInit()
Definition: debugwindow.cpp:97
void widgetResized(const Event &event)
StatDebugTab * mStatWidget
Definition: debugwindow.h:76
NetDebugTab * mNetWidget
Definition: debugwindow.h:75
Definition: event.h:79
Definition: window.h:102
DebugWindow * debugWindow
Definition: debugwindow.cpp:43
#define A_NONNULL(...)
Definition: localconsts.h:168
#define A_NONNULLPOINTER
Definition: localconsts.h:266
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53