model_server/gala/src/dis_cmds.cxx
// TCL commands.
//    These functions are added to the TCL interpreter.
TCL commands.
These functions are added to the TCL interpreter.
TCL commands . These functions are added to the TCL interpreter .
int dis_file (ClientData, Tcl_Interp* interp, int argc, char* argv[])
{
    GDialog* gd = 0;
    Viewer* vr = 0;
    View* v = 0;
    gdTextItem* myItem;
    char* gdid = Tcl_GetVar (interp, "gd", TCL_GLOBAL_ONLY);
    int gdialog_id = -1;
    if (gdid)
        gdialog_id = atoi (gdid);
	if (gdialog_id > 0 ) {
        gd = GDialog::FindGDialog (gdialog_id);
    }
    if (gd && (argc == 4))
        myItem = (gdTextItem*)gd->FindItem(vnameInternGlobal((const vchar*)argv[4]));
    else {
        Viewer::GetExecutingView (vr, v);
	    if (vr && v && (argc == 4)) {
	        myItem = (gdTextItem*)v->FindItem ((vchar*)argv[3]);
	    }
    }
    if (strcmp(argv[1], "-new") == 0) {
        if (strcmp(argv[2], "-c") == 0) {
        } else if (strcmp(argv[2], "-c") == 0) {
        } else if (strcmp(argv[2], "-cpp") == 0) {
        } else if (strcmp(argv[2], "-frame") == 0) {
        } else if (strcmp(argv[2], "-plain") == 0) {
        } else if (strcmp(argv[2], "-ste") == 0) {
	    }
    } else if (strcmp(argv[1], "-open") == 0) {
	    if (argc == 4 && v) {
            viewLayer* vl = viewLayer::findViewLayer ((vchar*)argv[3]);
            if (!vl) {
                vl = new viewLayer;
	            vl->setTitle((vchar*)argv[2]);
            }
	        if (v) vl->displayInView(v);
        }
    } else if (strcmp(argv[1], "-close") == 0) {
    } else if (strcmp(argv[1], "-revert") == 0) {
    }
    return TCL_OK;
}
int dis_file ( ClientData , Tcl_Interp * interp , int argc , char * argv [ ] ) { GDialog * gd = 0 ; Viewer * vr = 0 ; View * v = 0 ; gdTextItem * myItem ; char * gdid = Tcl_GetVar ( interp , " " , TCL_GLOBAL_ONLY ) ; int gdialog_id = -1 ; if ( gdid ) gdialog_id = atoi ( gdid ) ; if ( gdialog_id > 0 ) { gd = GDialog :: FindGDialog ( gdialog_id ) ; } if ( gd && ( argc == 4 ) ) myItem = ( gdTextItem * ) gd -> FindItem ( vnameInternGlobal ( ( const vchar * ) argv [ 4 ] ) ) ; else { Viewer :: GetExecutingView ( vr , v ) ; if ( vr && v && ( argc == 4 ) ) { myItem = ( gdTextItem * ) v -> FindItem ( ( vchar * ) argv [ 3 ] ) ; } } if ( strcmp ( argv [ 1 ] , " " ) == 0 ) { if ( strcmp ( argv [ 2 ] , " " ) == 0 ) { } else if ( strcmp ( argv [ 2 ] , " " ) == 0 ) { } else if ( strcmp ( argv [ 2 ] , " " ) == 0 ) { } else if ( strcmp ( argv [ 2 ] , " " ) == 0 ) { } else if ( strcmp ( argv [ 2 ] , " " ) == 0 ) { } else if ( strcmp ( argv [ 2 ] , " " ) == 0 ) { } } else if ( strcmp ( argv [ 1 ] , " " ) == 0 ) { if ( argc == 4 && v ) { viewLayer * vl = viewLayer :: findViewLayer ( ( vchar * ) argv [ 3 ] ) ; if ( ! vl ) { vl = new viewLayer ; vl -> setTitle ( ( vchar * ) argv [ 2 ] ) ; } if ( v ) vl -> displayInView ( v ) ; } } else if ( strcmp ( argv [ 1 ] , " " ) == 0 ) { } else if ( strcmp ( argv [ 1 ] , " " ) == 0 ) { } return TCL_OK ; }
TCL commands.
TCL commands .
//myItem->ShowFile((vchar*)argv[2], 0);