-#if UMA_USE_WINDOWMGR
- if ( UMAHasWindowManager() )
- {
- return CreateNewWindow( windowClass , attributes, bounds, outWindow ) ;
- }
- else
-#endif
- {
- short procID ;
- if ( UMAHasAppearance() )
- {
- switch( windowClass )
- {
- case kMovableModalWindowClass :
- procID = kWindowMovableModalDialogProc;
- break ;
- case kModalWindowClass :
- procID = kWindowShadowDialogProc;
- break ;
- case kFloatingWindowClass :
- if ( attributes & kWindowSideTitlebarAttribute )
- {
- if( ( attributes & kWindowResizableAttribute ) &&
- ( attributes & kWindowFullZoomAttribute ) )
- {
- procID = kWindowFloatSideFullZoomGrowProc ;
- }
- else if( attributes & kWindowFullZoomAttribute )
- {
- procID = kWindowFloatSideFullZoomProc;
- }
- else if ( attributes & kWindowResizableAttribute )
- {
- procID = kWindowFloatSideGrowProc;
- }
- else
- {
- procID = kWindowFloatSideProc;
- }
- }
- else
- {
- if( ( attributes & kWindowResizableAttribute ) &&
- ( attributes & kWindowFullZoomAttribute ) )
- {
- procID = kWindowFloatFullZoomGrowProc ;
- }
- else if( attributes & kWindowFullZoomAttribute )
- {
- procID = kWindowFloatFullZoomProc;
- }
- else if ( attributes & kWindowResizableAttribute )
- {
- procID = kWindowFloatGrowProc;
- }
- else
- {
- procID = kWindowFloatProc;
- }
- }
- break ;
- case kDocumentWindowClass :
- default :
- if( ( attributes & kWindowResizableAttribute ) &&
- ( attributes & kWindowFullZoomAttribute ) )
- {
- procID = kWindowFullZoomGrowDocumentProc;
- }
- else if( attributes & kWindowFullZoomAttribute )
- {
- procID = kWindowFullZoomDocumentProc;
- }
- else if ( attributes & kWindowResizableAttribute )
- {
- procID = kWindowGrowDocumentProc;
- }
- else
- {
- procID = kWindowDocumentProc;
- }
- break ;
- }
- }
- else
- {
- switch( windowClass )
- {
- case kMovableModalWindowClass :
- procID = movableDBoxProc;
- break ;
- case kModalWindowClass :
- procID = altDBoxProc;
- break ;
- case kFloatingWindowClass :
- if ( attributes & kWindowSideTitlebarAttribute )
- {
- if( ( attributes & kWindowResizableAttribute ) &&
- ( attributes & kWindowFullZoomAttribute ) )
- {
- procID = floatSideZoomGrowProc ;
- }
- else if( attributes & kWindowFullZoomAttribute )
- {
- procID = floatSideZoomProc;
- }
- else if ( attributes & kWindowResizableAttribute )
- {
- procID = floatSideGrowProc;
- }
- else
- {
- procID = floatSideProc;
- }
- }
- else
- {
- if( ( attributes & kWindowResizableAttribute ) &&
- ( attributes & kWindowFullZoomAttribute ) )
- {
- procID = floatZoomGrowProc ;
- }
- else if( attributes & kWindowFullZoomAttribute )
- {
- procID = floatZoomProc;
- }
- else if ( attributes & kWindowResizableAttribute )
- {
- procID = floatGrowProc;
- }
- else
- {
- procID = floatProc;
- }
- }
- break ;
- case kDocumentWindowClass :
- default :
- if( ( attributes & kWindowResizableAttribute ) &&
- ( attributes & kWindowFullZoomAttribute ) )
- {
- procID = zoomDocProc;
- }
- else if( attributes & kWindowFullZoomAttribute )
- {
- procID = zoomNoGrow;
- }
- else if ( attributes & kWindowResizableAttribute )
- {
- procID = documentProc;
- }
- else
- {
- procID = noGrowDocProc;
- }
- break ;
- break ;
- }
- }
- *outWindow = NewCWindow(nil, bounds, "\p", false, procID, (WindowRef) -1 /*behind*/,
- attributes & kWindowCloseBoxAttribute , (long)NULL);
- return noErr ;
- }