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
This commit is contained in:
@@ -24,7 +24,20 @@ BEGIN_EVENT_TABLE(wxStatusBarMac, wxStatusBarGeneric)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
wxStatusBarMac::wxStatusBarMac(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
long style,
|
||||||
|
const wxString& name)
|
||||||
|
:
|
||||||
|
wxStatusBarGeneric()
|
||||||
|
{
|
||||||
|
SetParent( NULL );
|
||||||
|
Create( parent, id, style, name );
|
||||||
|
}
|
||||||
|
|
||||||
wxStatusBarMac::wxStatusBarMac()
|
wxStatusBarMac::wxStatusBarMac()
|
||||||
|
:
|
||||||
|
wxStatusBarGeneric()
|
||||||
{
|
{
|
||||||
SetParent( NULL );
|
SetParent( NULL );
|
||||||
}
|
}
|
||||||
@@ -37,7 +50,7 @@ bool wxStatusBarMac::Create(wxWindow *parent, wxWindowID id,
|
|||||||
long style ,
|
long style ,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
if ( !wxStatusBarGeneric::Create( parent , id , style , name ) )
|
if ( !wxStatusBarGeneric::Create( parent, id, style, name ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( parent->MacGetTopLevelWindow()->MacGetMetalAppearance() )
|
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
|
// normal system font is too tall for fitting into the standard height
|
||||||
SetWindowVariant( wxWINDOW_VARIANT_SMALL );
|
SetWindowVariant( wxWINDOW_VARIANT_SMALL );
|
||||||
|
|
||||||
return true ;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStatusBarMac::DrawFieldText(wxDC& dc, int i)
|
void wxStatusBarMac::DrawFieldText(wxDC& dc, int i)
|
||||||
{
|
{
|
||||||
int leftMargin = 2;
|
int w, h;
|
||||||
int w, h ;
|
GetSize( &w , &h );
|
||||||
GetSize( &w , &h ) ;
|
|
||||||
wxRect rect;
|
wxRect rect;
|
||||||
GetFieldRect(i, rect);
|
GetFieldRect( i, rect );
|
||||||
|
|
||||||
if ( !MacIsReallyHilited() )
|
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;
|
long x, y;
|
||||||
|
|
||||||
dc.GetTextExtent(text, &x, &y);
|
dc.GetTextExtent(text, &x, &y);
|
||||||
|
|
||||||
int xpos = rect.x + leftMargin + 1 ;
|
int leftMargin = 2;
|
||||||
int ypos = 1 ;
|
int xpos = rect.x + leftMargin + 1;
|
||||||
|
int ypos = 1;
|
||||||
|
|
||||||
if ( MacGetTopLevelWindow()->MacGetMetalAppearance() )
|
if ( MacGetTopLevelWindow()->MacGetMetalAppearance() )
|
||||||
ypos++ ;
|
ypos++;
|
||||||
|
|
||||||
dc.SetClippingRegion(rect.x, 0, rect.width, h);
|
dc.SetClippingRegion(rect.x, 0, rect.width, h);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user