// Put in standard place for resource files if not absolute
strcpy (buf, DEFAULT_XRESOURCE_DIR);
strcat (buf, "/");
- strcat (buf, (const char*) wxFileNameFromPath (name));
+ strcat (buf, wxFileNameFromPath (name).c_str());
}
if (create) {
}
char resName[300];
- strcpy (resName, (const char*) section);
+ strcpy (resName, section.c_str());
strcat (resName, ".");
- strcat (resName, (const char*) entry);
+ strcat (resName, entry.c_str());
XrmPutStringResource (&database, resName, value);
return TRUE;
wxString classname = theApp->GetClassName();
char name[256];
(void) strcpy (name, "/usr/lib/X11/app-defaults/");
- (void) strcat (name, (const char*) classname);
+ (void) strcat (name, classname.c_str());
/* Get application defaults file, if any */
applicationDB = XrmGetFileDatabase (name);
Cardinal argc = 0;
Display *display = XtOpenDisplay((XtAppContext) wxTheApp->GetAppContext(),
- (const char*) display_name,
- (const char*) wxTheApp->GetAppName(),
- (const char*) wxTheApp->GetClassName(),
+ display_name.c_str(),
+ wxTheApp->GetAppName().c_str(),
+ wxTheApp->GetClassName().c_str(),
NULL,
#if XtSpecificationRelease < 5
0, &argc,
NULL);
}
+extern void wxDoChangeFont(WXWidget widget, wxFont& font)
+{
+ // Lesstif 0.87 hangs here, but 0.93 does not
+#if !wxCHECK_LESSTIF() || wxCHECK_LESSTIF_VERSION( 0, 93 )
+ Widget w = (Widget)widget;
+ XtVaSetValues( w,
+ wxFont::GetFontTag(), font.GetFontType( XtDisplay(w) ),
+ NULL );
+#endif
+
+}
+
#endif
// __WXMOTIF__
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;
+}
+
+XmString wxStringToXmString( const wxString& str )
+{
+ return XmStringCreateLtoR((char *)str.c_str(), XmSTRING_DEFAULT_CHARSET);
+}
+
+XmString wxStringToXmString( const char* str )
+{
+ return XmStringCreateLtoR((char *)str, XmSTRING_DEFAULT_CHARSET);
+}