]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/statbrma.cpp
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: native implementation of wxStatusBar (optional)
8 // Copyright: (c) 1998 AUTHOR
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "statbrma.h"
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #include "wx/statusbr.h"
22 #include "wx/dcclient.h"
24 BEGIN_EVENT_TABLE(wxStatusBarMac
, wxStatusBarGeneric
)
25 EVT_PAINT(wxStatusBarMac::OnPaint
)
28 // ============================================================================
30 // ============================================================================
32 // ----------------------------------------------------------------------------
33 // wxStatusBarMac class
34 // ----------------------------------------------------------------------------
36 wxStatusBarMac::wxStatusBarMac()
41 wxStatusBarMac::~wxStatusBarMac()
45 bool wxStatusBarMac::Create(wxWindow
*parent
, wxWindowID id
,
49 return wxStatusBarGeneric::Create( parent
, id
, style
, name
) ;
52 void wxStatusBarMac::DrawFieldText(wxDC
& dc
, int i
)
57 GetFieldRect(i
, rect
);
59 wxString
text(GetStatusText(i
));
63 dc
.GetTextExtent(text
, &x
, &y
);
65 int xpos
= rect
.x
+ leftMargin
+ 1 ;
68 dc
.SetClippingRegion(rect
.x
, 0, rect
.width
, m_height
);
70 dc
.DrawText(text
, xpos
, ypos
);
72 dc
.DestroyClippingRegion();
75 void wxStatusBarMac::DrawField(wxDC
& dc
, int i
)
80 void wxStatusBarMac::OnPaint(wxPaintEvent
& WXUNUSED(event
) )
83 wxPen
black( wxBLACK
, 1 , wxSOLID
) ;
84 wxPen
white( wxWHITE
, 1 , wxSOLID
) ;
96 dc
.SetFont(GetFont());
97 dc
.SetBackgroundMode(wxTRANSPARENT
);
99 for ( i
= 0; i
< m_nFields
; i
++ )
103 dc
.SetFont(wxNullFont
);