/////////////////////////////////////////////////////////////////////////////
-// Name: frame.cpp
+// Name: src/gtk/frame.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
// ============================================================================
// declarations
// ============================================================================
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "frame.h"
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#include "wx/defs.h"
-
#include "wx/frame.h"
-#include "wx/dialog.h"
-#include "wx/control.h"
-#include "wx/app.h"
-#include "wx/menu.h"
-#if wxUSE_TOOLBAR
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/dcclient.h"
+ #include "wx/menu.h"
+ #include "wx/dialog.h"
+ #include "wx/control.h"
#include "wx/toolbar.h"
-#endif
-#if wxUSE_STATUSBAR
#include "wx/statusbr.h"
-#endif
-#include "wx/dcclient.h"
+#endif // WX_PRECOMP
#include <glib.h>
#include "wx/gtk/private.h"
const int wxSTATUS_HEIGHT = 25;
const int wxPLACE_HOLDER = 0;
-// ----------------------------------------------------------------------------
-// idle system
-// ----------------------------------------------------------------------------
-
-extern void wxapp_install_idle_handler();
-extern bool g_isIdle;
-
// ----------------------------------------------------------------------------
// event tables
// ----------------------------------------------------------------------------
wxToolBar *toolBar = (wxToolBar*) child;
if (toolBar->GetWindowStyle() & wxTB_DOCKABLE)
{
- gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_attached",
- GTK_SIGNAL_FUNC(gtk_toolbar_attached_callback), (gpointer)parent );
-
- gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_detached",
- GTK_SIGNAL_FUNC(gtk_toolbar_detached_callback), (gpointer)parent );
+ g_signal_connect (toolBar->m_widget, "child_attached",
+ G_CALLBACK (gtk_toolbar_attached_callback),
+ parent);
+ g_signal_connect (toolBar->m_widget, "child_detached",
+ G_CALLBACK (gtk_toolbar_detached_callback),
+ parent);
}
}
#endif // wxUSE_TOOLBAR
gtk_pizza_set_size( GTK_PIZZA(m_wxwindow),
m_frameStatusBar->m_widget,
xx, yy, ww, hh );
- gtk_widget_draw( m_frameStatusBar->m_widget, (GdkRectangle*) NULL );
+ if (GTK_WIDGET_DRAWABLE (m_frameStatusBar->m_widget))
+ {
+ gtk_widget_queue_draw (m_frameStatusBar->m_widget);
+ // FIXME: Do we really want to force an immediate redraw?
+ gdk_window_process_updates (m_frameStatusBar->m_widget->window, TRUE);
+ }
}
#endif // wxUSE_STATUSBAR
if (m_frameMenuBar->GetWindowStyle() & wxMB_DOCKABLE)
{
- gtk_signal_disconnect_by_func( GTK_OBJECT(m_frameMenuBar->m_widget),
- GTK_SIGNAL_FUNC(gtk_menu_attached_callback), (gpointer)this );
+ g_signal_handlers_disconnect_by_func (m_frameMenuBar->m_widget,
+ (gpointer) gtk_menu_attached_callback,
+ this);
- gtk_signal_disconnect_by_func( GTK_OBJECT(m_frameMenuBar->m_widget),
- GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this );
+ g_signal_handlers_disconnect_by_func (m_frameMenuBar->m_widget,
+ (gpointer) gtk_menu_detached_callback,
+ this);
}
gtk_widget_ref( m_frameMenuBar->m_widget );
if (menuBar->GetWindowStyle() & wxMB_DOCKABLE)
{
- gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_attached",
- GTK_SIGNAL_FUNC(gtk_menu_attached_callback), (gpointer)this );
-
- gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_detached",
- GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this );
+ g_signal_connect (menuBar->m_widget, "child_attached",
+ G_CALLBACK (gtk_menu_attached_callback),
+ this);
+ g_signal_connect (menuBar->m_widget, "child_detached",
+ G_CALLBACK (gtk_menu_detached_callback),
+ this);
}
gtk_widget_show( m_frameMenuBar->m_widget );
// this is called after Remove with a NULL m_frameMenuBar
if ( m_frameMenuBar )
- (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(m_frameMenuBar->m_widget) )->size_request )
- (m_frameMenuBar->m_widget, &req );
+ (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(m_frameMenuBar->m_widget) )->size_request )
+ (m_frameMenuBar->m_widget, &req );
m_menuBarHeight = req.height;
- // resize window in OnInternalIdle
+ // resize window in OnInternalIdle
GtkUpdateSize();
}
GtkUpdateSize();
}
#endif // wxUSE_STATUSBAR
-