unicode fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -238,7 +238,20 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
// Find the widest line
|
// Find the widest line
|
||||||
for(int i = 0; i < GetCount(); i++) {
|
for(int i = 0; i < GetCount(); i++) {
|
||||||
wxString str(GetString(i));
|
wxString str(GetString(i));
|
||||||
wLine = ::TextWidth( str.c_str() , 0 , str.Length() ) ;
|
#if wxUSE_UNICODE
|
||||||
|
Point bounds={0,0} ;
|
||||||
|
SInt16 baseline ;
|
||||||
|
::GetThemeTextDimensions( wxMacCFStringHolder( str ) ,
|
||||||
|
kThemeCurrentPortFont,
|
||||||
|
kThemeStateActive,
|
||||||
|
false,
|
||||||
|
&bounds,
|
||||||
|
&baseline );
|
||||||
|
wLine = bounds.h ;
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( str ) ;
|
||||||
|
wLine = ::TextWidth( text , 0 , strlen(text) ) ;
|
||||||
|
#endif
|
||||||
lbWidth = wxMax(lbWidth, wLine);
|
lbWidth = wxMax(lbWidth, wLine);
|
||||||
}
|
}
|
||||||
// Add room for the popup arrow
|
// Add room for the popup arrow
|
||||||
|
@@ -620,7 +620,20 @@ wxSize wxListBox::DoGetBestSize() const
|
|||||||
// Find the widest line
|
// Find the widest line
|
||||||
for(int i = 0; i < GetCount(); i++) {
|
for(int i = 0; i < GetCount(); i++) {
|
||||||
wxString str(GetString(i));
|
wxString str(GetString(i));
|
||||||
wLine = ::TextWidth( str.c_str() , 0 , str.Length() ) ;
|
#if wxUSE_UNICODE
|
||||||
|
Point bounds={0,0} ;
|
||||||
|
SInt16 baseline ;
|
||||||
|
::GetThemeTextDimensions( wxMacCFStringHolder( str ) ,
|
||||||
|
kThemeCurrentPortFont,
|
||||||
|
kThemeStateActive,
|
||||||
|
false,
|
||||||
|
&bounds,
|
||||||
|
&baseline );
|
||||||
|
wLine = bounds.h ;
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( str ) ;
|
||||||
|
wLine = ::TextWidth( text , 0 , strlen(text) ) ;
|
||||||
|
#endif
|
||||||
lbWidth = wxMax(lbWidth, wLine);
|
lbWidth = wxMax(lbWidth, wLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -256,7 +256,6 @@ void wxMacToolTip::Draw()
|
|||||||
::GetFontInfo(&fontInfo);
|
::GetFontInfo(&fontInfo);
|
||||||
short lineh = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
|
short lineh = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
|
||||||
short height = 0 ;
|
short height = 0 ;
|
||||||
// short width = TextWidth( m_label , 0 ,m_label.Length() ) ;
|
|
||||||
|
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
int length = m_label.Length() ;
|
int length = m_label.Length() ;
|
||||||
|
@@ -238,7 +238,20 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
// Find the widest line
|
// Find the widest line
|
||||||
for(int i = 0; i < GetCount(); i++) {
|
for(int i = 0; i < GetCount(); i++) {
|
||||||
wxString str(GetString(i));
|
wxString str(GetString(i));
|
||||||
wLine = ::TextWidth( str.c_str() , 0 , str.Length() ) ;
|
#if wxUSE_UNICODE
|
||||||
|
Point bounds={0,0} ;
|
||||||
|
SInt16 baseline ;
|
||||||
|
::GetThemeTextDimensions( wxMacCFStringHolder( str ) ,
|
||||||
|
kThemeCurrentPortFont,
|
||||||
|
kThemeStateActive,
|
||||||
|
false,
|
||||||
|
&bounds,
|
||||||
|
&baseline );
|
||||||
|
wLine = bounds.h ;
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( str ) ;
|
||||||
|
wLine = ::TextWidth( text , 0 , strlen(text) ) ;
|
||||||
|
#endif
|
||||||
lbWidth = wxMax(lbWidth, wLine);
|
lbWidth = wxMax(lbWidth, wLine);
|
||||||
}
|
}
|
||||||
// Add room for the popup arrow
|
// Add room for the popup arrow
|
||||||
|
@@ -620,7 +620,20 @@ wxSize wxListBox::DoGetBestSize() const
|
|||||||
// Find the widest line
|
// Find the widest line
|
||||||
for(int i = 0; i < GetCount(); i++) {
|
for(int i = 0; i < GetCount(); i++) {
|
||||||
wxString str(GetString(i));
|
wxString str(GetString(i));
|
||||||
wLine = ::TextWidth( str.c_str() , 0 , str.Length() ) ;
|
#if wxUSE_UNICODE
|
||||||
|
Point bounds={0,0} ;
|
||||||
|
SInt16 baseline ;
|
||||||
|
::GetThemeTextDimensions( wxMacCFStringHolder( str ) ,
|
||||||
|
kThemeCurrentPortFont,
|
||||||
|
kThemeStateActive,
|
||||||
|
false,
|
||||||
|
&bounds,
|
||||||
|
&baseline );
|
||||||
|
wLine = bounds.h ;
|
||||||
|
#else
|
||||||
|
wxCharBuffer text = wxMacStringToCString( str ) ;
|
||||||
|
wLine = ::TextWidth( text , 0 , strlen(text) ) ;
|
||||||
|
#endif
|
||||||
lbWidth = wxMax(lbWidth, wLine);
|
lbWidth = wxMax(lbWidth, wLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -256,7 +256,6 @@ void wxMacToolTip::Draw()
|
|||||||
::GetFontInfo(&fontInfo);
|
::GetFontInfo(&fontInfo);
|
||||||
short lineh = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
|
short lineh = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
|
||||||
short height = 0 ;
|
short height = 0 ;
|
||||||
// short width = TextWidth( m_label , 0 ,m_label.Length() ) ;
|
|
||||||
|
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
int length = m_label.Length() ;
|
int length = m_label.Length() ;
|
||||||
|
Reference in New Issue
Block a user