#include <wx/frame.h>
#include <wx/aui/aui.h>
#include <wx/stattext.h>
///////////////////////////////
class MyWindow: public wxPanel
{
public:
MyWindow(wxWindow *parent, const wxString& title);
~MyWindow(){}
};
//////////////////////////////
class MyFrame: public wxFrame
{
public:
MyFrame(wxFrame *frame, const wxString& title);
~MyFrame(){ manager.UnInit(); }
wxAuiManager manager;
};
// MyFrame ////////////////////////////////
MyFrame::MyFrame(wxFrame *frame, const wxString& title)
: wxFrame(frame, -1, title, wxDefaultPosition, wxSize(800, 570), wxDEFAULT_FRAME_STYLE)
{
manager.SetManagedWindow(this);
MyWindow *window1 = new MyWindow(this, wxString("Main Window"));
manager.AddPane(window1, wxLEFT, wxT("the main window"));
manager.Update();
}
// MyWindow ///////////////////////////
MyWindow::MyWindow(wxWindow *parent, const wxString& title)
: wxPanel(parent, -1, wxDefaultPosition, wxSize(100, 100), wxNO_BORDER, title)
{
wxStaticText *text = new wxStaticText(this, -1, wxString("This is static text in my first window. "), wxDefaultPosition, wxDefaultSize, 0, wxString("staticText"));
}