cbs->mCallback = aCallback; cbs->mId       = aID;
if (cbs) { cbs->mCallback = aCallback; cbs->mId       = aID; } else cbs = (MenuCallbackStruct *)NS_ERROR_OUT_OF_MEMORY;
Widget CreateMenuItem(Widget          aParent,                       char *          aTitle,                      long            aID,                      MenuCallbackProc aCallback){  Widget widget = XtVaCreateManagedWidget(aTitle, xmPushButtonGadgetClass,                                          aParent,                                          NULL);  MenuCallbackStruct * cbs = new MenuCallbackStruct();  cbs->mCallback = aCallback;  cbs->mId       = aID;  XtAddCallback(widget, XmNactivateCallback, nsXtWidget_Menu_Callback, cbs);  return widget;}