Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATMenu::Insert
CATResult CATMenu::Insert ( const CATString displayText,
CATMENUITEM parent,
CATMENUITEM *&  newItemRef,
void *  dataPtr,
bool  subMenu = false,
CATUInt32  index = -1,
const CATString altCommand = "" 
) [virtual]

Insert() inserts an item into the menu's tree.

Parameters:
displayText - text to display for item in menu
parent - ptr to parent menu item
newItemRef - ref to ptr to receive created menu item on success
dataPtr - void* to store caller's data for menu item
subMenu - if true, item has no dataPtr and extends to a sub menu
index - index to insert at. -1 is at end of current menu
altCommand - if true, then instead of sending the scripted menu's command and using dataPtr for information, the item will send the altCommand to the window.
Returns:
CATResult - CAT_SUCCESS on success

Definition at line 238 of file CATMenu.cpp.

References CATMENUITEM::AltCommand, CATMENUITEM::BaseMenu, CAT_ERR_OUT_OF_MEMORY, CAT_SUCCESS, CATRESULT, CATMENUITEM::Children, CATMENUITEM::DataPtr, CATMENUITEM::DisplayText, fMenuDirty, fRootList, CATMENUITEM::IsSubMenu, CATMENUITEM::ItemHandle, and CATMENUITEM::Parent.

Referenced by InsertSeperator(), CATComboBox::RebuildCombo(), GASPilot::UpdateControllerMenu(), and GASPilot::UpdateMappingMenu().


Generated on Mon Feb 11 04:10:45 2008 for Game Accessibility Suite by doxygen 1.5.4