ClipRect( drawRect );
EraseRect( drawRect );
- wxFontRefData * font = (wxFontRefData*) list->GetFont().GetRefData() ;
-
- if ( font )
+ const wxFont& font = list->GetFont();
+ if ( font.Ok() )
{
- ::TextFont( font->m_macFontNum ) ;
- ::TextSize( short(font->m_macFontSize) ) ;
- ::TextFace( font->m_macFontStyle ) ;
+ ::TextFont( font.GetMacFontNum() ) ;
+ ::TextSize( font.GetMacFontSize() ) ;
+ ::TextFace( font.GetMacFontStyle() ) ;
}
else
{
}
#else
{
- wxCharBuffer text = wxMacStringToCString( linetext ) ;
+ wxCharBuffer text = linetext.mb_str( wxConvLocal) ;
MoveTo(drawRect->left + 4 , drawRect->top + 10 );
DrawText(text, 0 , strlen(text) );
}
const wxValidator& validator,
const wxString& name)
{
+ if ( !wxListBoxBase::Create(parent, id, pos, size, style & ~(wxHSCROLL|wxVSCROLL), validator, name) )
+ return false;
+
m_noItems = 0 ; // this will be increased by our append command
m_selected = 0;
{
wxMacPortStateHelper st( UMAGetWindowPort( (WindowRef) MacGetRootWindow() ) ) ;
- wxFontRefData * font = (wxFontRefData*) m_font.GetRefData() ;
-
- if ( font )
+ if ( m_font.Ok() )
{
- ::TextFont( font->m_macFontNum ) ;
- ::TextSize( short(font->m_macFontSize) ) ;
- ::TextFace( font->m_macFontStyle ) ;
+ ::TextFont( m_font.GetMacFontNum() ) ;
+ ::TextSize( m_font.GetMacFontSize() ) ;
+ ::TextFace( m_font.GetMacFontStyle() ) ;
}
else
{
&baseline );
wLine = bounds.h ;
#else
- wxCharBuffer text = wxMacStringToCString( str ) ;
- wLine = ::TextWidth( text , 0 , strlen(text) ) ;
+ wLine = ::TextWidth( str.c_str() , 0 , str.Length() ) ;
#endif
lbWidth = wxMax(lbWidth, wLine);
}
LCellSize( pt , (ListHandle)m_macList ) ;
}
-void wxListBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
+void wxListBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED(mouseStillDown))
{
Boolean wasDoubleClick = false ;
long result ;