model_server/gala/src/dis_cmds.cxx
//-----------------------------------------------------------------------------------------------------
// <index> <-  <name> 
//
// This function will return the currently selected line index.
//-----------------------------------------------------------------------------------------------------
 <-  
This function will return the currently selected line index.
< - This function will return the currently selected line index .
int dis_gdTextSpinGetSelectedIndex(ClientData, Tcl_Interp* interp, int argc, char *argv[]) {
   if (argc != 2) {
	  Tcl_SetResult (interp, "wrong number of arguments", TCL_STATIC);
	  return TCL_ERROR;
   }
   gdTextSpinner *spinner = (gdTextSpinner *)dis_findItem(interp, (vchar*) argv[1]);
   if(!spinner)  TCL_EXECERR1 ("Text spinner was not found", argv[1]);
   int index = spinner->GetCurrentIndex();
   gString result_str;
   result_str.sprintf((vchar *)"%d", index);
   Tcl_SetResult (interp, (char *)result_str, TCL_VOLATILE);
   return TCL_OK;
}
int dis_gdTextSpinGetSelectedIndex ( ClientData , Tcl_Interp * interp , int argc , char * argv [ ] ) { if ( argc != 2 ) { Tcl_SetResult ( interp , " " , TCL_STATIC ) ; return TCL_ERROR ; } gdTextSpinner * spinner = ( gdTextSpinner * ) dis_findItem ( interp , ( vchar * ) argv [ 1 ] ) ; if ( ! spinner ) TCL_EXECERR1 ( " " , argv [ 1 ] ) ; int index = spinner -> GetCurrentIndex ( ) ; gString result_str ; result_str . sprintf ( ( vchar * ) " " , index ) ; Tcl_SetResult ( interp , ( char * ) result_str , TCL_VOLATILE ) ; return TCL_OK ; }
<index> <-  <name>
This function will return the currently selected line index.
<index > < - <name > This function will return the currently selected line index .