Implemented DoGetBestSize for wxListBox, (native) wxComboBox and
wxTextCtrl, and used it when wxSize(-1, -1) is passed to Create, to set the initial size. Added wxDoChangeFont and wxXmStringToString helper functions, removed the use of m_stringList in native wxComboBox, removed some duplicated code in wxWindow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1247,6 +1247,21 @@ void wxDoChangeBackgroundColour(WXWidget widget, wxColour& backgroundColour, boo
|
||||
NULL);
|
||||
}
|
||||
|
||||
extern void wxDoChangeFont(WXWidget widget, wxFont& font)
|
||||
{
|
||||
// lesstif 0.87 hangs here, but 0.93 does not
|
||||
#if !defined(LESSTIF_VERSION) \
|
||||
|| (defined(LesstifVersion) && LesstifVersion >= 93)
|
||||
|
||||
Widget w = (Widget)widget;
|
||||
XmFontList fontList = (XmFontList)font.GetFontList(1.0, XtDisplay(w));
|
||||
XtVaSetValues( w,
|
||||
XmNfontList, fontList,
|
||||
NULL );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
// __WXMOTIF__
|
||||
|
||||
@@ -1257,3 +1272,17 @@ bool wxWindowIsVisible(Window win)
|
||||
|
||||
return (wa.map_state == IsViewable);
|
||||
}
|
||||
|
||||
wxString wxXmStringToString( const XmString& xmString )
|
||||
{
|
||||
char *txt;
|
||||
if( XmStringGetLtoR( xmString, XmSTRING_DEFAULT_CHARSET, &txt ) )
|
||||
{
|
||||
wxString str(txt);
|
||||
XtFree (txt);
|
||||
return str;
|
||||
}
|
||||
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user