X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d143b6689b9ce3f02398d1ee4129f6a21024183..eb6b14dc71402c42e0474779bfcd6e878383071e:/samples/statbar/statbar.cpp diff --git a/samples/statbar/statbar.cpp b/samples/statbar/statbar.cpp index 31a26ddfbb..ec12792ad7 100644 --- a/samples/statbar/statbar.cpp +++ b/samples/statbar/statbar.cpp @@ -3,7 +3,6 @@ // Purpose: wxStatusBar sample // Author: Vadim Zeitlin // Created: 04.02.00 -// RCS-ID: $Id$ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -50,7 +49,7 @@ #include "wx/numdlg.h" #include "wx/fontdlg.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif @@ -218,6 +217,7 @@ enum StatusBar_SetPaneStyleNormal, StatusBar_SetPaneStyleFlat, StatusBar_SetPaneStyleRaised, + StatusBar_SetPaneStyleSunken, StatusBar_SetStyleSizeGrip, StatusBar_SetStyleEllipsizeStart, @@ -256,6 +256,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 +268,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 +397,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 +729,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 +748,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 +960,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)) {