X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/601964ff75f93953dd1f6e4665b9839a8eb72e44..546f34572dcb324b7f55cf3810cb4c6cfbb42225:/samples/controls/controls.cpp?ds=sidebyside diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index bb6d0fea8a..e4b7ae08e7 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -29,12 +29,13 @@ #include "wx/tglbtn.h" #include "wx/notebook.h" #include "wx/imaglist.h" +#include "wx/artprov.h" #if wxUSE_TOOLTIPS #include "wx/tooltip.h" #endif -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) +#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__) #define USE_XPM #endif @@ -483,8 +484,6 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) : wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) ), m_text(NULL), m_notebook(NULL) { - wxLayoutConstraints *c; - m_text = new wxTextCtrl(this, -1, "This is the log window.\n", wxPoint(0, 250), wxSize(100, 50), wxTE_MULTILINE); m_text->SetBackgroundColour(wxT("wheat")); @@ -723,12 +722,12 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) panel = new wxPanel(m_notebook); #if !defined(__WXMOTIF__) && !defined(__WIN16__) // wxStaticBitmap not working under Motif yet; and icons not allowed under WIN16. - wxIcon icon = wxTheApp->GetStdIcon(wxICON_INFORMATION); + wxIcon icon = wxArtProvider::GetIcon(wxART_INFORMATION); wxStaticBitmap *bmpStatic = new wxStaticBitmap(panel, -1, icon, wxPoint(10, 10)); bmpStatic = new wxStaticBitmap(panel, -1, wxNullIcon, wxPoint(50, 10)); - bmpStatic->SetIcon(wxTheApp->GetStdIcon(wxICON_QUESTION)); + bmpStatic->SetIcon(wxArtProvider::GetIcon(wxART_QUESTION)); #endif // !Motif wxBitmap bitmap( 100, 100 ); @@ -753,9 +752,9 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) } #endif - wxBitmap bmp1(wxTheApp->GetStdIcon(wxICON_INFORMATION)), - bmp2(wxTheApp->GetStdIcon(wxICON_WARNING)), - bmp3(wxTheApp->GetStdIcon(wxICON_QUESTION)); + wxBitmap bmp1(wxArtProvider::GetBitmap(wxART_INFORMATION)), + bmp2(wxArtProvider::GetBitmap(wxART_WARNING)), + bmp3(wxArtProvider::GetBitmap(wxART_QUESTION)); wxBitmapButton *bmpBtn = new wxBitmapButton ( panel, -1, @@ -779,6 +778,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) m_notebook->AddPage(panel, "wxBitmapXXX"); // layout constraints +#if wxUSE_CONSTRAINTS + wxLayoutConstraints *c; panel = new wxPanel(m_notebook); panel->SetAutoLayout( TRUE ); @@ -802,7 +803,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) pMyButton2->SetConstraints( c ); m_notebook->AddPage(panel, "wxLayoutConstraint"); - +#endif + // sizer panel = new wxPanel(m_notebook);