All pastes #744887 Raw Edit

houlala

public cpp v1 · immutable
·published 2007-10-21 21:34 UTC
rendered paste body
  #include <wx/wx.h>  #include "wx/aui/aui.h"    class FrameBis : wxFrame   { public: 	  FrameBis(wxWindow* parent) : wxFrame(parent, -1, _("wxAUI Test"),                      wxDefaultPosition, wxSize(800,600),                      wxDEFAULT_FRAME_STYLE)                                 {     // notify wxAUI which frame to use     m_mgr.SetManagedWindow(this);      // create several text controls                          wxTextCtrl* text2 = new wxTextCtrl(this, -1, _("Pane 2 - sample text"),                      wxDefaultPosition, wxSize(200,150),                      wxNO_BORDER | wxTE_MULTILINE);                                             wxTextCtrl* text3 = new wxTextCtrl(this, -1, _("Main content window"),                      wxDefaultPosition, wxSize(200,150),                      wxNO_BORDER | wxTE_MULTILINE);               wxTextCtrl* text1 = new wxTextCtrl(this, -1, _("Pane 2 - sample text"),                      wxDefaultPosition, wxSize(200,150),                      wxNO_BORDER | wxTE_MULTILINE);                                             wxTextCtrl* text4 = new wxTextCtrl(this, -1, _("Main content window"),                      wxDefaultPosition, wxSize(200,150),                      wxNO_BORDER | wxTE_MULTILINE);              // add the panes to the manager     m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Number Two"));     m_mgr.AddPane(text3, wxTOP);     m_mgr.AddPane(text1, wxLEFT, wxT("Pane Number Two"));     m_mgr.AddPane(text4, wxRIGHT);	 	 /*m_mgr.GetPane(text2).Floatable(false);	 m_mgr.GetPane(text3).Floatable(false);                               	 m_mgr.GetPane(text2).CloseButton(false);	 m_mgr.GetPane(text3).CloseButton(false);       */                             // tell the manager to "commit" all the changes just made     m_mgr.Update();   }    ~FrameBis()   {     // deinitialize the frame manager     m_mgr.UnInit();   }  private:     wxAuiManager m_mgr; };   class MyFrame : public wxFrame { public:   MyFrame(wxWindow* parent) : wxFrame(parent, -1, _("wxAUI Test"),                      wxDefaultPosition, wxSize(800,600),                      wxDEFAULT_FRAME_STYLE)                                 {	   Maximize();     // notify wxAUI which frame to use     m_mgr.SetManagedWindow(this);      // create several text controls                          wxTextCtrl* text2 = new wxTextCtrl(this, -1, _("Pane 2 - sample text"),                      wxDefaultPosition, wxSize(200,150),                      wxNO_BORDER | wxTE_MULTILINE);     /*                                        wxTextCtrl* text3 = new wxTextCtrl(this, -1, _("Main content window"),                      wxDefaultPosition, wxSize(200,150),                      wxNO_BORDER | wxTE_MULTILINE);       */	FrameBis * text3 = new FrameBis(this);     // add the panes to the manager     m_mgr.AddPane(text3, wxCENTER);     m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Number Two"));	 	 /*m_mgr.GetPane(text2).Floatable(false);	 m_mgr.GetPane(text3).Floatable(false);                               	 m_mgr.GetPane(text2).CloseButton(false);	 m_mgr.GetPane(text3).CloseButton(false);       */                             // tell the manager to "commit" all the changes just made     m_mgr.Update();   }    ~MyFrame()   {     // deinitialize the frame manager     m_mgr.UnInit();   }  private:     wxAuiManager m_mgr; };   // our normal wxApp-derived class, as usual class MyApp : public wxApp { public:    bool OnInit()   {     wxFrame* frame = new MyFrame(NULL);     SetTopWindow(frame);     frame->Show();     return true;                       } };   DECLARE_APP(MyApp);  IMPLEMENT_APP(MyApp);