-}
-
-void wxFrame::OnCloseWindow( wxCloseEvent& WXUNUSED(event) )
-{
- Destroy();
-}
-
-void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
-{
- wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
-
-#if wxUSE_CONSTRAINTS
- if (GetAutoLayout())
- {
- Layout();
- }
- else
-#endif // wxUSE_CONSTRAINTS
- {
- /* do we have exactly one child? */
- wxWindow *child = (wxWindow *)NULL;
- for ( wxNode *node = GetChildren().First(); node; node = node->Next() )
- {
- wxWindow *win = (wxWindow *)node->Data();
- if ( !wxIS_KIND_OF(win,wxFrame) && !wxIS_KIND_OF(win,wxDialog) )
- {
- if (child)
- {
- /* it's the second one: do nothing */
- return;
- }
-
- child = win;
- }
- }
-
- /* no children at all? */
- if (child)
- {
- /* yes: set it's size to fill all the frame */
- int client_x, client_y;
- DoGetClientSize( &client_x, &client_y );
- child->SetSize( 1, 1, client_x-2, client_y-2 );
- }
- }
-}
-
-static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
-{
- menu->SetInvokingWindow( win );
-
-#if (GTK_MINOR_VERSION > 0)
- /* support for native hot keys */
- gtk_accel_group_attach( menu->m_accel, GTK_OBJECT(win->m_widget));