EXPORT(sqInt) primitiveSetMenuTitle(void) {
	ConstStr255Param constStr255;
	MenuHandle menuHandle;
	sqInt menuHandleOop;
	char *str255;
	sqInt _return_value;

	menuHandleOop = interpreterProxy->stackValue(1);
	interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));
	str255 = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));
	if (interpreterProxy->failed()) {
		return null;
	}
	menuHandle = ((MenuHandle) (interpreterProxy->positive64BitValueOf(menuHandleOop)));
	if (!(ioCheckMenuHandle(menuHandle))) {
		_return_value = interpreterProxy->success(0);
		if (interpreterProxy->failed()) {
			return null;
		}
		interpreterProxy->popthenPush(3, _return_value);
		return null;
	}
	constStr255 = ((ConstStr255Param) str255);
	SetMenuTitle(menuHandle,constStr255);
	return null;
}
Beispiel #2
0
void UMASetMenuTitle( MenuRef menu , const wxString& title , wxFontEncoding encoding)
{
    wxString str = wxStripMenuCodes( title ) ;
#if TARGET_CARBON
    SetMenuTitleWithCFString( menu , wxMacCFStringHolder(str , encoding) ) ;
#else
    Str255 ptitle ;
    wxMacStringToPascal( str , ptitle ) ;
    SetMenuTitle( menu , ptitle ) ;
#endif
}