- // if we're using constraints - do use them
-#if wxUSE_CONSTRAINTS
- if ( GetAutoLayout() )
- {
- Layout();
- }
- else
-#endif // wxUSE_CONSTRAINTS
- {
- // do we have _exactly_ one child?
- wxWindow *child = (wxWindow *)NULL;
- for ( wxWindowList::Node *node = GetChildren().GetFirst();
- node;
- node = node->GetNext() )
- {
- wxWindow *win = node->GetData();
-
- // exclude top level and managed windows (status bar isn't
- // currently in the children list except under wxMac anyhow, but
- // it makes no harm to test for it)
- if ( !win->IsTopLevel() && !IsOneOfBars(win) )
- {
- if ( child )
- {
- return; // it's our second subwindow - nothing to do
- }
-
- child = win;
- }
- }
-
- // do we have any children at all?
- if ( child )
- {
- // exactly one child - set it's size to fill the whole frame
- int clientW, clientH;
- DoGetClientSize(&clientW, &clientH);
-
- // for whatever reasons, wxGTK wants to have a small offset - it
- // probably looks better with it?
-#ifdef __WXGTK__
- static const int ofs = 1;
-#else
- static const int ofs = 0;