XPLMCreateMenu

Function XPLMCreateMenu 

Source
pub unsafe extern "C" fn XPLMCreateMenu(
    inName: *const c_char,
    inParentMenu: XPLMMenuID,
    inParentItem: c_int,
    inHandler: XPLMMenuHandler_f,
    inMenuRef: *mut c_void,
) -> XPLMMenuID
Expand description

XPLMCreateMenu

This function creates a new menu and returns its ID. It returns NULL if the menu cannot be created. Pass in a parent menu ID and an item index to create a submenu, or NULL for the parent menu to put the menu in the menu bar. The menu’s name is only used if the menu is in the menubar. You also pass a handler function and a menu reference value. Pass NULL for the handler if you do not need callbacks from the menu (for example, if it only contains submenus).

Important: you must pass a valid, non-empty menu title even if the menu is a submenu where the title is not visible.