+#endif //wxUSE_TOOLBAR
+ float sbarheight = 0.0;
+ if(m_frameStatusBar)
+ {
+ NSView *sbarNSView = m_frameStatusBar->GetNSViewForSuperview();
+ if(![sbarNSView superview])
+ [m_frameNSView addSubview: sbarNSView];
+ NSRect sbarRect = [sbarNSView frame];
+ sbarRect.size.width = frameRect.size.width;
+ sbarRect.origin.x = 0.0;
+ sbarRect.origin.y = 0.0;
+ [sbarNSView setFrame:sbarRect];
+ // width expands, top margin expands
+ [sbarNSView setAutoresizingMask: NSViewWidthSizable|NSViewMaxYMargin];
+ sbarheight = sbarRect.size.height;
+ }
+ wxLogTrace(wxTRACE_COCOA,wxT("frame height=%f, tbar=%f, sbar=%f"),frameRect.size.height,tbarheight,sbarheight);
+ NSRect innerRect = [m_cocoaNSView frame];
+ innerRect.size.height = frameRect.size.height - tbarheight - sbarheight;
+ innerRect.origin.y = sbarheight;
+ [m_cocoaNSView setFrame:innerRect];
+ [m_cocoaNSView setAutoresizingMask: NSViewWidthSizable|NSViewHeightSizable];
+ // Don't let the frame get smaller than the toolbar+statusbar height
+ NSRect frameMinRect = [NSWindow frameRectForContentRect:
+ NSMakeRect(0.0,0.0,0.0,tbarheight+sbarheight)
+ styleMask: [m_cocoaNSWindow styleMask]];
+ [m_cocoaNSWindow setMinSize:frameMinRect.size];