X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e7092398891c83b12c84305d8d0206bdbe415fa0..fa699cbaaf217af186cd04dd10d6ec67c8667136:/samples/statbar/statbar.cpp?ds=sidebyside diff --git a/samples/statbar/statbar.cpp b/samples/statbar/statbar.cpp index e053fe1642..d81ddd4606 100644 --- a/samples/statbar/statbar.cpp +++ b/samples/statbar/statbar.cpp @@ -218,6 +218,7 @@ enum StatusBar_SetPaneStyleNormal, StatusBar_SetPaneStyleFlat, StatusBar_SetPaneStyleRaised, + StatusBar_SetPaneStyleSunken, StatusBar_SetStyleSizeGrip, StatusBar_SetStyleEllipsizeStart, @@ -256,6 +257,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(StatusBar_SetPaneStyleNormal, MyFrame::OnSetPaneStyle) EVT_MENU(StatusBar_SetPaneStyleFlat, MyFrame::OnSetPaneStyle) EVT_MENU(StatusBar_SetPaneStyleRaised, MyFrame::OnSetPaneStyle) + EVT_MENU(StatusBar_SetPaneStyleSunken, MyFrame::OnSetPaneStyle) EVT_MENU(StatusBar_SetStyleSizeGrip, MyFrame::OnSetStyle) EVT_MENU(StatusBar_SetStyleEllipsizeStart, MyFrame::OnSetStyle) @@ -267,7 +269,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) MyFrame::OnUpdateForDefaultStatusbar) EVT_UPDATE_UI(StatusBar_Toggle, MyFrame::OnUpdateStatusBarToggle) EVT_UPDATE_UI_RANGE(StatusBar_SetPaneStyleNormal, - StatusBar_SetPaneStyleRaised, + StatusBar_SetPaneStyleSunken, MyFrame::OnUpdateSetPaneStyle) EVT_UPDATE_UI_RANGE(StatusBar_SetStyleSizeGrip, StatusBar_SetStyleShowTips, MyFrame::OnUpdateSetStyle) @@ -396,6 +398,12 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) wxT("&Raised"), wxT("Sets the style of the first field to raised look") ); + statbarPaneStyleMenu->AppendCheckItem + ( + StatusBar_SetPaneStyleSunken, + wxT("&Sunken"), + wxT("Sets the style of the first field to sunken look") + ); statbarMenu->Append(StatusBar_SetPaneStyle, wxT("Field style"), statbarPaneStyleMenu); @@ -722,6 +730,9 @@ void MyFrame::OnUpdateSetPaneStyle(wxUpdateUIEvent& event) case StatusBar_SetPaneStyleRaised: event.Check(m_statbarPaneStyle == wxSB_RAISED); break; + case StatusBar_SetPaneStyleSunken: + event.Check(m_statbarPaneStyle == wxSB_SUNKEN); + break; } } @@ -738,6 +749,9 @@ void MyFrame::OnSetPaneStyle(wxCommandEvent& event) case StatusBar_SetPaneStyleRaised: m_statbarPaneStyle = wxSB_RAISED; break; + case StatusBar_SetPaneStyleSunken: + m_statbarPaneStyle = wxSB_SUNKEN; + break; } ApplyPaneStyle(); @@ -947,11 +961,6 @@ void MyStatusBar::OnSize(wxSizeEvent& event) return; #endif - // TEMPORARY HACK: TODO find a more general solution -#ifdef wxStatusBarGeneric - wxStatusBar::OnSize(event); -#endif - wxRect rect; if (!GetFieldRect(Field_Checkbox, rect)) {