EXPORT(sqInt) primitiveSetMenuItemHierarchicalID(void) {
	MenuHandle menuHandle;
	sqInt menuHandleOop;
	sqInt anInteger;
	sqInt aMenuID;
	sqInt _return_value;

	menuHandleOop = interpreterProxy->stackValue(2);
	anInteger = interpreterProxy->stackIntegerValue(1);
	aMenuID = interpreterProxy->stackIntegerValue(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(4, _return_value);
		return null;
	}
	SetMenuItemHierarchicalID(menuHandle,anInteger,aMenuID);
	return null;
}
Esempio n. 2
0
File: uma.cpp Progetto: beanhome/dev
void UMAInsertSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , MenuItemIndex item , SInt16 id  )
{
    InsertMenuItemTextWithCFString( menu,
                CFSTR("A"), item, 0, 0);

    UMASetMenuItemText( menu, item+1, title , encoding );
    SetMenuItemHierarchicalID( menu , item+1 , id ) ;
}
Esempio n. 3
0
// create the Shell menu in Terminal
static void
AddShellItems( MenuRef menu )
{
	MenuItemIndex	item;
	
	AppendMenuItemTextWithCFString( menu, CFSTR("New"), 0, 0, &item );
	SetItemCmd( menu, item, 'N' );
	AppendMenuItemTextWithCFString( menu, CFSTR("Open..."), 0, 0, &item );
	SetItemCmd( menu, item, 'O' );
	AppendMenuItemTextWithCFString( menu, CFSTR("Library"), kMenuItemAttrDisabled, 0, &item );
	SetMenuItemHierarchicalID( menu, item, 201 );
	AppendMenuItemTextWithCFString( menu, NULL, kMenuItemAttrSeparator, 0, NULL );
	AppendMenuItemTextWithCFString( menu, CFSTR("Save"), 0, 0, &item );
	SetItemCmd( menu, item, 'S' );
	AppendMenuItemTextWithCFString( menu, CFSTR("Save As..."), 0, 0, &item );
	SetItemCmd( menu, item, 'S' );
	SetMenuItemModifiers( menu, item, kMenuShiftModifier );
	AppendMenuItemTextWithCFString( menu, CFSTR("Save Text As..."), 0, 0, &item );
	SetItemCmd( menu, item, 'S' );
	SetMenuItemModifiers( menu, item, kMenuOptionModifier );
	AppendMenuItemTextWithCFString( menu, CFSTR("Save Selected Text As..."), 0, 0, &item );
	SetItemCmd( menu, item, 'S' );
	SetMenuItemModifiers( menu, item, kMenuShiftModifier | kMenuOptionModifier );
	AppendMenuItemTextWithCFString( menu, NULL, kMenuItemAttrSeparator, 0, NULL );
	AppendMenuItemTextWithCFString( menu, CFSTR("Run Command..."), 0, 0, &item );
	SetItemCmd( menu, item, 'N' );
	SetMenuItemModifiers( menu, item, kMenuShiftModifier );
	AppendMenuItemTextWithCFString( menu, CFSTR("Set Title..."), 0, 0, &item );
	SetItemCmd( menu, item, 'T' );
	SetMenuItemModifiers( menu, item, kMenuShiftModifier );
	AppendMenuItemTextWithCFString( menu, CFSTR("Inspector..."), 0, 0, &item );
	SetItemCmd( menu, item, 'I' );
	AppendMenuItemTextWithCFString( menu, NULL, kMenuItemAttrSeparator, 0, NULL );
	AppendMenuItemTextWithCFString( menu, CFSTR("Page Setup..."), 0, 0, &item );
	SetItemCmd( menu, item, 'P' );
	SetMenuItemModifiers( menu, item, kMenuShiftModifier );
	AppendMenuItemTextWithCFString( menu, CFSTR("Print..."), 0, 0, &item );
	SetItemCmd( menu, item, 'P' );
}