- m_frameMenuBar = (wxMenuBar *) NULL;
- m_frameStatusBar = (wxStatusBar *) NULL;
- m_frameToolBar = (wxToolBar *) NULL;
- m_sizeSet = FALSE;
- m_miniEdge = 0;
- m_miniTitle = 0;
- m_mainWidget = (GtkWidget*) NULL;
- m_menuBarDetached = FALSE;
- m_toolBarDetached = FALSE;
- 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 );
-
-#ifdef __WXDEBUG__
- debug_focus_in( m_widget, _T("wxFrame::m_widget"), name );
-#endif
-
- 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 );
-
-#ifdef __WXDEBUG__
- debug_focus_in( m_mainWidget, _T("wxFrame::m_mainWidget"), name );
-#endif
-
- /* 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 );
-
-#ifdef __WXDEBUG__
- debug_focus_in( m_wxwindow, _T("wxFrame::m_wxwindow"), name );
-#endif
-
- /* we donm't allow the frame to get the focus as otherwise
- the frame will grabit at arbitrary fcous changes. */
- GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
-
- 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 );
-
- /* 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;