X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8552e6f031ded8ae61b4a5b489fbf06962365da7..9ad7392b6a1bcd63cce8ad7899348f49d3e82a88:/contrib/samples/fl/fl_sample1.cpp diff --git a/contrib/samples/fl/fl_sample1.cpp b/contrib/samples/fl/fl_sample1.cpp index d873fe3328..9ec4cd35aa 100644 --- a/contrib/samples/fl/fl_sample1.cpp +++ b/contrib/samples/fl/fl_sample1.cpp @@ -56,7 +56,7 @@ public: void OnStore( wxCommandEvent& event ); void OnQuit( wxCommandEvent& event ); - bool OnClose(void) { return TRUE; } + bool OnClose(void) { return true; } DECLARE_EVENT_TABLE() }; @@ -67,7 +67,7 @@ IMPLEMENT_APP (MyApp) bool MyApp::OnInit(void) { - // wxWindows boiler-plate: + // wxWidgets boiler-plate: MyFrame *frame = new MyFrame(NULL, _("wxFrameLayout sample")); @@ -83,14 +83,16 @@ bool MyApp::OnInit(void) menu_bar->Append(file_menu, _("&File")); +#if wxUSE_STATUSBAR frame->CreateStatusBar(3); +#endif // wxUSE_STATUSBAR frame->SetMenuBar(menu_bar); - frame->Show(TRUE); + frame->Show(true); SetTopWindow(frame); - return TRUE; + return true; } /***** Immlementation for class MyFrame *****/ @@ -102,7 +104,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) END_EVENT_TABLE() MyFrame::MyFrame( wxWindow* parent, const wxChar *title ) - : wxFrame( parent, -1, title, wxDefaultPosition, + : wxFrame( parent, wxID_ANY, title, wxDefaultPosition, wxSize( 700, 500 ), wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION, @@ -122,7 +124,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title ) cbCommonPaneProperties props; mpLayout->GetPaneProperties( props ); - props.mRealTimeUpdatesOn = FALSE; // off + props.mRealTimeUpdatesOn = false; // off mpLayout->SetPaneProperties( props, wxALL_PANES ); #endif @@ -134,7 +136,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title ) cbDimInfo sizes( 80,65, // when docked horizontally 80,65, // when docked vertically 80,30, // when floated - TRUE, // the bar is fixed-size + true, // the bar is fixed-size 5, // vertical gap (bar border) 5 // horizontal gap (bar border) ); @@ -169,7 +171,7 @@ MyFrame::~MyFrame() wxTextCtrl* MyFrame::CreateTextCtrl( const wxString& value ) { - wxTextCtrl* pCtrl = new wxTextCtrl( mpInternalFrm, -1, value, + wxTextCtrl* pCtrl = new wxTextCtrl( mpInternalFrm, wxID_ANY, value, wxPoint(0,0), wxSize(1,1), wxTE_MULTILINE ); pCtrl->SetBackgroundColour( wxColour( 255,255,255 ) ); @@ -189,8 +191,8 @@ void MyFrame::OnStore( wxCommandEvent& WXUNUSED(event) ) void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) ) { - Show( FALSE ); // TRICK:: hide it, to avoid flickered destruction + Show( false ); // TRICK:: hide it, to avoid flickered destruction - Close(TRUE); + Close(true); }