model_server/ui_browser/src/browserShell.h.cxx
//
// This function adds a menu item to a cliMenu.  It works for menu
// items which take selections and for those which don't.
//
This function adds a menu item to a cliMenu.  It works for menu
items which take selections and for those which don't.
This function adds a menu item to a cliMenu . It works for menu items which take selections and for those which don ' t .
void browserShell::add_item_to_cliMenu(cliMenu *menu, const char *name, void *callback)
{
    Initialize(browserShell::add_to_cliMenu);
    if(menu) {
	int first = (menu->items.size()==0);
        cliQueryData *cqd = new cliQueryData(name);
	cliMenuItem *mitem = new cliMenuItem(name, MENU_ITEM_ACTION, menu);
	cliQueryData_put_cliMenuItem(cqd, mitem);
	menu->items.insert_last(cqd);
        Obj *dset = cliMenu_get_browserQueryMenus(menu);
        Obj *el;
        ForEach(el, *dset){
            browserQueryMenu *bqm = (browserQueryMenu*)el;
            query_button_add_item (bqm, first, cqd, callback); 
        }
    }
}
void browserShell :: add_item_to_cliMenu ( cliMenu * menu , const char * name , void * callback ) { Initialize ( browserShell :: add_to_cliMenu ) ; if ( menu ) { int first = ( menu -> items . size ( ) == 0 ) ; cliQueryData * cqd = new cliQueryData ( name ) ; cliMenuItem * mitem = new cliMenuItem ( name , MENU_ITEM_ACTION , menu ) ; cliQueryData_put_cliMenuItem ( cqd , mitem ) ; menu -> items . insert_last ( cqd ) ; Obj * dset = cliMenu_get_browserQueryMenus ( menu ) ; Obj * el ; ForEach ( el , * dset ) { browserQueryMenu * bqm = ( browserQueryMenu * ) el ; query_button_add_item ( bqm , first , cqd , callback ) ; } } }
This function adds a menu item to a cliMenu.
This function adds a menu item to a cliMenu .