TopBarMenu

TopBarInsItem

Insert an item before an existing position in the menu bar

Syntax

Signature
xBool       TopBarInsItem( TopBarMenu *topBar, int position, MenuItem *item );

Arguments

topBar the top bar menu.

position the one-based position of an existing item.

item the item to insert. NULL is invalid.

Return value

T on success, or F if the object is NULL, item is NULL or position is outside the existing item list.

Description

The items at and after the insertion point shift right. If the current item moves, its position is adjusted. The bar takes ownership on success. The caller retains ownership on failure. Use `TopBarAddItem()` to append or to add the first item.

See also