model_server/gala/src/view.cxx
// print - Prints out current view hierarchy.
//    Note - This method does not print childViewTree_ info.
Prints out current view hierarchy.
Note - This method does not print childViewTree_ info.
Prints out current view hierarchy . Note - This method does not print childViewTree_ info .
void View::print(int level)
{
    if (level == 0) {
        if (myViewer && myViewer->layerViews)
            myViewer->layerViews->print(1);
    } else {
        for (int i=1; i<level; i++)
            fprintf(stderr, "  ");
        fprintf(stderr, "%x (%d,%d,%d,%d): Parent=%x Left=%x, Right=%x, Child=%x\n",
                this, myRect.x, myRect.y, myRect.w, myRect.h,
                ParentView, LeftView, RightView, ChildView);
        fflush(stderr);
        if (RightView) RightView->print(level);
        if (ChildView) ChildView->print(level+1);
    }
}
void View :: print ( int level ) { if ( level == 0 ) { if ( myViewer && myViewer -> layerViews ) myViewer -> layerViews -> print ( 1 ) ; } else { for ( int i = 1 ; i < level ; i ++ ) fprintf ( stderr , " " ) ; fprintf ( stderr , " \n " , this , myRect . x , myRect . y , myRect . w , myRect . h , ParentView , LeftView , RightView , ChildView ) ; fflush ( stderr ) ; if ( RightView ) RightView -> print ( level ) ; if ( ChildView ) ChildView -> print ( level + 1 ) ; } }
print - Prints out current view hierarchy.
print - Prints out current view hierarchy .
// First check for full print. // Else print this node and all below it. // First, index 2 spaces per level. // (Well, actually for every level after the first.) // Next, print this node. // Next, print Right neighbors. // Lastly, print any children.