// DisposeMenu( m_macPopUpMenuHandle ) ;
}
+bool wxChoice::Create(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ wxCArrayString chs(choices);
+
+ return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+ style, validator, name);
+}
+
bool wxChoice::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxValidator& validator,
const wxString& name)
{
+ if ( !wxChoiceBase::Create(parent, id, pos, size, style, validator, name) )
+ return false;
+
Rect bounds ;
Str255 title ;
if ( n > 0 )
SetControl32BitValue( (ControlHandle) m_macControl , 1 ) ;
MacPostControlCreate() ;
+ // TODO wxCB_SORT
for ( int i = 0; i < n; i++ )
{
Append(choices[i]);
#endif
{
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);
}