-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathAuiNotebook.cpp
More file actions
36 lines (30 loc) · 1.26 KB
/
AuiNotebook.cpp
File metadata and controls
36 lines (30 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <wx/wx.h>
#include <wx/splitter.h>
#include <wx/aui/framemanager.h>
#include <wx/aui/auibook.h>
namespace AuiNotebookExample {
class Frame : public wxFrame {
public:
Frame() : wxFrame(nullptr, wxID_ANY, "AuiNotebook example") {
SetClientSize(800, 450);
panelRed->SetBackgroundColour({255, 0, 0});
panelGreen->SetBackgroundColour({0, 128, 0});
panelBlue->SetBackgroundColour({0, 0, 255});
panelYellow->SetBackgroundColour({255, 255, 0});
auiNotebook1->AddPage(panelRed, "Red");
auiNotebook1->AddPage(panelGreen, "Green");
auiNotebook1->AddPage(panelBlue, "Blue");
auiNotebook1->AddPage(panelYellow, "Yellow");
}
private:
wxAuiNotebook* auiNotebook1 = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TOP|wxAUI_NB_TAB_SPLIT|wxAUI_NB_TAB_MOVE|wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_CLOSE_ON_ACTIVE_TAB|wxAUI_NB_MIDDLE_CLICK_CLOSE);
wxPanel* panelRed = new wxPanel(this);
wxPanel* panelGreen = new wxPanel(this);
wxPanel* panelBlue = new wxPanel(this);
wxPanel* panelYellow = new wxPanel(this);
};
class Application : public wxApp {
auto OnInit() -> bool override {return (new Frame)->Show();}
};
}
wxIMPLEMENT_APP(AuiNotebookExample::Application);