-#if wxUSE_TOOLBAR
- m_frameToolBar = NULL ;
-#endif
- m_frameStatusBar = NULL;
-
- SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
-
- if ( id > -1 )
- m_windowId = id;
- else
- m_windowId = (int)NewControlId();
-
- if (parent) parent->AddChild(this);
-
- wxModelessWindows.Append(this);
-
- // create frame.
-
- Rect theBoundsRect;
-
- m_x = (int)pos.x;
- m_y = (int)pos.y;
- if ( m_y < 50 )
- m_y = 50 ;
- if ( m_x < 20 )
- m_x = 20 ;
-
- m_width = size.x;
- if (m_width == -1)
- m_width = 20;
- m_height = size.y;
- if (m_height == -1)
- m_height = 20;
-
- m_macWindowData = new MacWindowData() ;
-
- ::SetRect(&theBoundsRect, m_x, m_y, m_x + m_width, m_y + m_height);
-
- WindowClass wclass = kDocumentWindowClass ;
- WindowAttributes attr = kWindowNoAttributes ;
-
- if ( ( m_windowStyle & wxMINIMIZE_BOX ) || ( m_windowStyle & wxMAXIMIZE_BOX ) )
- {
- attr |= kWindowFullZoomAttribute ;
- attr |= kWindowResizableAttribute ;
- }
- if ( m_windowStyle & wxSTAY_ON_TOP )
- {
- wclass = kFloatingWindowClass ;
-
-// if ( m_windowStyle & wxCAPTION )
-// attr |= kHasPaletteTitlebarMask ;
- }
- else
- {
- }
- if ( m_windowStyle & wxSYSTEM_MENU )
- {
- attr |= kWindowCloseBoxAttribute ;
- }
- UMACreateNewWindow( wclass , attr , &theBoundsRect , &m_macWindowData->m_macWindow ) ;
- wxAssociateWinWithMacWindow( m_macWindowData->m_macWindow , this ) ;
- wxString label ;
- if( wxApp::s_macDefaultEncodingIsPC )
- label = wxMacMakeMacStringFromPC( title ) ;
- else
- label = title ;
- UMASetWTitleC( m_macWindowData->m_macWindow , label ) ;
- UMACreateRootControl( m_macWindowData->m_macWindow , &m_macWindowData->m_macRootControl ) ;
- m_macWindowData->m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ;
- m_macWindowData->m_macFocus = NULL ;
- return TRUE;