model_server/gala/src/dis_cmds.cxx
// Select all entries in the given selection.
Select all entries in the given selection.
Select all entries in the given selection .
int dis_gdListItemSelection (ClientData, Tcl_Interp* interp,
			     int argc, char** argv)
{
    if (argc < 3)
	TCL_EXECERR ("wrong number of arguments");
    gdListItem* myItem = (gdListItem*) dis_findItem(interp, (vchar*) argv[1]);
    if (!myItem)
	TCL_EXECERR ("List item not found");
    vlist* list = myItem->GetList();
    vlistSelection* sel = myItem->GetSelection();
    list->UnselectAll(sel);
    myItem->AllowSelection(vFALSE);
    SelectionIterator newSel((vchar*)argv[2]);
    while (newSel.Next()) 
        list->SelectRow(sel, newSel.GetNext() );
    myItem->AllowSelection(vTRUE);
    return TCL_OK;
}
int dis_gdListItemSelection ( ClientData , Tcl_Interp * interp , int argc , char * * argv ) { if ( argc < 3 ) TCL_EXECERR ( " " ) ; gdListItem * myItem = ( gdListItem * ) dis_findItem ( interp , ( vchar * ) argv [ 1 ] ) ; if ( ! myItem ) TCL_EXECERR ( " " ) ; vlist * list = myItem -> GetList ( ) ; vlistSelection * sel = myItem -> GetSelection ( ) ; list -> UnselectAll ( sel ) ; myItem -> AllowSelection ( vFALSE ) ; SelectionIterator newSel ( ( vchar * ) argv [ 2 ] ) ; while ( newSel . Next ( ) ) list -> SelectRow ( sel , newSel . GetNext ( ) ) ; myItem -> AllowSelection ( vTRUE ) ; return TCL_OK ; }
Select all entries in the given selection.
Select all entries in the given selection .
// Get the list and listSelector. // Unselect all current selections. // Tell list item to ignore selections until we are done. // Select all items in the selection. // Tell list item to handle selections again.