From 71786e29faec237f66f3a9a2e63c000ccd056143 Mon Sep 17 00:00:00 2001 From: David Surovell Date: Sun, 5 Feb 2006 20:52:30 +0000 Subject: [PATCH] added ctor implementation from header + initialzation; more reformatting git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/statbrma.cpp | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/mac/carbon/statbrma.cpp b/src/mac/carbon/statbrma.cpp index ee4fddd494..e743653a1d 100644 --- a/src/mac/carbon/statbrma.cpp +++ b/src/mac/carbon/statbrma.cpp @@ -24,7 +24,20 @@ BEGIN_EVENT_TABLE(wxStatusBarMac, wxStatusBarGeneric) END_EVENT_TABLE() +wxStatusBarMac::wxStatusBarMac(wxWindow *parent, + wxWindowID id, + long style, + const wxString& name) + : + wxStatusBarGeneric() +{ + SetParent( NULL ); + Create( parent, id, style, name ); +} + wxStatusBarMac::wxStatusBarMac() + : + wxStatusBarGeneric() { SetParent( NULL ); } @@ -37,7 +50,7 @@ bool wxStatusBarMac::Create(wxWindow *parent, wxWindowID id, long style , const wxString& name) { - if ( !wxStatusBarGeneric::Create( parent , id , style , name ) ) + if ( !wxStatusBarGeneric::Create( parent, id, style, name ) ) return false; if ( parent->MacGetTopLevelWindow()->MacGetMetalAppearance() ) @@ -46,31 +59,31 @@ bool wxStatusBarMac::Create(wxWindow *parent, wxWindowID id, // normal system font is too tall for fitting into the standard height SetWindowVariant( wxWINDOW_VARIANT_SMALL ); - return true ; + return true; } void wxStatusBarMac::DrawFieldText(wxDC& dc, int i) { - int leftMargin = 2; - int w, h ; - GetSize( &w , &h ) ; + int w, h; + GetSize( &w , &h ); wxRect rect; - GetFieldRect(i, rect); + GetFieldRect( i, rect ); if ( !MacIsReallyHilited() ) - dc.SetTextForeground( wxColour( 0x80 , 0x80 , 0x80 ) ) ; + dc.SetTextForeground( wxColour( 0x80, 0x80, 0x80 ) ); - wxString text(GetStatusText(i)); + wxString text(GetStatusText( i )); long x, y; dc.GetTextExtent(text, &x, &y); - int xpos = rect.x + leftMargin + 1 ; - int ypos = 1 ; + int leftMargin = 2; + int xpos = rect.x + leftMargin + 1; + int ypos = 1; if ( MacGetTopLevelWindow()->MacGetMetalAppearance() ) - ypos++ ; + ypos++; dc.SetClippingRegion(rect.x, 0, rect.width, h); -- 2.45.2