Weather App
 
Loading...
Searching...
No Matches
Panel.h
Go to the documentation of this file.
1
5
6#pragma once
7#include <wx/wx.h>
8
9
13extern wxWindow* mainWindow;
14
18extern wxBoxSizer* mainSizer;
19
20
25class Panel{
26 public:
30 wxPanel* panel;
31
36 Panel(Panel* origin); //hides the origin panel and displays only this panel
37
38
42 ~Panel(); //deletes this panel and uses the origin panel to be displayed back again.
43
48 void SetTitle(std::string title);
49
50 private:
52 std::string _title;
53};
wxBoxSizer * mainSizer
Pointer to the main sizer for layout management.
wxWindow * mainWindow
Pointer to the main application window.
wxPanel * panel
Pointer to the wxPanel instance managed by this class.
Definition Panel.h:30
std::string _title
Stores the title of the panel.
Definition Panel.h:52
~Panel()
Destructor that deletes the current panel and restores the previous one.
Panel * _origin
Pointer to the previous panel.
Definition Panel.h:51
Panel(Panel *origin)
Constructs a new Panel and hides the previous one if provided.
void SetTitle(std::string title)
Sets the title of the main window.