- m_insertCallback = wxInsertChildInFrame;
- Create( parent, id, title, pos, size, style, name );
-}
-
-bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
- const wxPoint &pos, const wxSize &size,
- long style, const wxString &name )
-{
- wxTopLevelWindows.Append( this );
-
- m_needParent = FALSE;
-
- PreCreation( parent, id, pos, size, style, name );
-
- m_title = title;
-
- m_insertCallback = wxInsertChildInFrame;
-
- GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
- if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP;
-
- m_widget = gtk_window_new( win_type );
-
- gtk_window_set_title( GTK_WINDOW(m_widget), title.mbc_str() );
- GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
-
- gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
- GTK_SIGNAL_FUNC(gtk_frame_delete_callback), (gpointer)this );
-
- /* m_mainWidget holds the toolbar, the menubar and the client area */
- m_mainWidget = gtk_myfixed_new();
- gtk_widget_show( m_mainWidget );
- GTK_WIDGET_UNSET_FLAGS( m_mainWidget, GTK_CAN_FOCUS );
- gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget );
-
- /* m_wxwindow only represents the client area without toolbar and menubar */
- m_wxwindow = gtk_myfixed_new();
- gtk_widget_show( m_wxwindow );
- gtk_container_add( GTK_CONTAINER(m_mainWidget), m_wxwindow );
-
- /* we allow the frame to get the focus as otherwise no
- key events will get sent to it. the point with this is
- that the menu's key accelerators work by interceting
- key events here */
- GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
- gtk_widget_grab_focus( m_wxwindow );
-
- if (m_parent) m_parent->AddChild( this );
-
- PostCreation();
-
- /* we cannot set MWM hints and icons before the widget has
- been realized, so we do this directly after realization */
- gtk_signal_connect( GTK_OBJECT(m_widget), "realize",
- GTK_SIGNAL_FUNC(gtk_frame_realized_callback), (gpointer) this );
-
- /* we set the position of the window after the map event. setting it
- before has no effect (with KWM) */
- gtk_signal_connect( GTK_OBJECT(m_widget), "map",
- GTK_SIGNAL_FUNC(gtk_frame_map_callback), (gpointer) this );
-
- /* the user resized the frame by dragging etc. */
- gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
- GTK_SIGNAL_FUNC(gtk_frame_size_callback), (gpointer)this );
-
- /* the only way to get the window size is to connect to this event */
- gtk_signal_connect( GTK_OBJECT(m_widget), "configure_event",
- GTK_SIGNAL_FUNC(gtk_frame_configure_callback), (gpointer)this );
-
- return TRUE;