Home | All Classes | Grouped Classes | Index | Search

CL_MenuData::insert_item

Inserts an item at index. Inserts an item at index, with a submenu. Inserts an item (uses any type of component) at index. Inserts an item (uses any type of component) at index, with a submenu.

	CL_MenuNode* insert_item(
		const std::string& text, int index = -1);

	CL_MenuNode* insert_item(
		const std::string& text, CL_PopupMenu* submenu, int index = -1);

	CL_MenuNode* insert_item(
		CL_Component* component, bool delete_component = false, int index = -1);

	CL_MenuNode* insert_item(
		CL_Component* component, CL_PopupMenu* submenu, bool delete_component = false, int index = -1);

Return value:

the node of the item.the node of the item.the node of the item.

Detailed description:

If index is negative, text is inserted at the end of the list. Returns the node of the item.

If index is negative, text is inserted at the end of the list.

If index is negative, text is inserted at the end of the list. Set delete_component to true if you want the component to be deleted when this node gets deleted.

If index is negative, text is inserted at the end of the list. Set delete_component to true if you want the component to be deleted when this node gets deleted.

See also:

CL_MenuData



Questions or comments, write to the ClanLib mailing list.