int result = OS.CallNextEventHandler (nextHandler, theEvent);
result = OS.CallNextEventHandler (nextHandler, theEvent);
int kEventMenuMeasureItemWidth (int nextHandler, int theEvent, int userData) {	short [] index = new short [1];	OS.GetEventParameter (theEvent, OS.kEventParamMenuItemIndex, OS.typeMenuItemIndex, null, 2, null, index);	MenuItem item = items [index [0] - 1];	if (item.accelerator == 0) {		int accelIndex = item.text.indexOf ('\t');		if (accelIndex != -1) {			String accelText = item.text.substring (accelIndex + 1);			if (accelText.length () != 0) {				int result = OS.CallNextEventHandler (nextHandler, theEvent);				char [] buffer = new char [accelText.length ()];				accelText.getChars (0, buffer.length, buffer, 0);				int str = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, buffer.length);				org.eclipse.swt.internal.carbon.Point size = new org.eclipse.swt.internal.carbon.Point ();				OS.GetThemeTextDimensions (str, (short) OS.kThemeMenuItemCmdKeyFont, 0, false, size, null);				OS.CFRelease (str);				short [] width = new short [1];				OS.GetEventParameter (theEvent, OS.kEventParamMenuItemWidth, OS.typeSInt16, null, 2, null, width);				int [] metric = new int [1];				OS.GetThemeMetric (OS.kThemeMetricMenuTextTrailingEdgeMargin, metric);				width [0] += metric [0] + size.h;				OS.SetEventParameter (theEvent, OS.kEventParamMenuItemWidth, OS.typeSInt16, 2, width);				return result;			}		}				}	return OS.eventNotHandledErr;}