]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/minifram.cpp
Pressing build-in joystick on WinCE phones fires wxEVT_JOY_BUTTON_DOWN event.
[wxWidgets.git] / src / gtk1 / minifram.cpp
index 5682f4d9f0c144dcdd7f458f9c1521ae45f07d5d..0e4b631ce135e429b0614f00e5b0cb3fce0dc50b 100644 (file)
@@ -4,13 +4,9 @@
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "minifram.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -69,6 +65,7 @@ static void DrawFrame( GtkWidget *widget, int x, int y, int w, int h )
 // "expose_event" of m_mainWidget
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_event, wxFrame *win )
 {
     if (g_isIdle) wxapp_install_idle_handler();
@@ -109,12 +106,14 @@ static void gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *g
         dc.DrawText( win->GetTitle(), 6, 3 );
     }
 }
+}
 
 //-----------------------------------------------------------------------------
 // "draw" of m_mainWidget
 //-----------------------------------------------------------------------------
 
 #ifndef __WXGTK20__
+extern "C" {
 static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNUSED(rect), wxFrame *win )
 {
     if (g_isIdle) wxapp_install_idle_handler();
@@ -154,12 +153,14 @@ static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNU
         dc.DrawText( win->GetTitle(), 6, 3 );
     }
 }
+}
 #endif
 
 //-----------------------------------------------------------------------------
 // "button_press_event" of m_mainWidget
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_event, wxMiniFrame *win )
 {
     if (g_isIdle) wxapp_install_idle_handler();
@@ -203,11 +204,13 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
 
     return TRUE;
 }
+}
 
 //-----------------------------------------------------------------------------
 // "button_release_event" of m_mainWidget
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButton *gdk_event, wxMiniFrame *win )
 {
     if (g_isIdle) wxapp_install_idle_handler();
@@ -236,11 +239,13 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
 
     return TRUE;
 }
+}
 
 //-----------------------------------------------------------------------------
 // "motion_notify_event" of m_mainWidget
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion *gdk_event, wxMiniFrame *win )
 {
     if (g_isIdle) wxapp_install_idle_handler();
@@ -269,17 +274,20 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
 
     return TRUE;
 }
+}
 
 //-----------------------------------------------------------------------------
 // "clicked" of X system button
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxMiniFrame *mf )
 {
     if (g_isIdle) wxapp_install_idle_handler();
 
     mf->Close();
 }
+}
 
 //-----------------------------------------------------------------------------
 // wxMiniFrame
@@ -389,4 +397,15 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
     return TRUE;
 }
 
+void wxMiniFrame::SetTitle( const wxString &title )
+{
+    wxFrame::SetTitle( title );
+    
+#ifdef __WXGTK20__
+    gdk_window_invalidate_rect( GTK_PIZZA(m_mainWidget)->bin_window, NULL, true );
+#else
+    gtk_widget_draw( m_mainWidget, (GdkRectangle*) NULL );
+#endif
+}
+
 #endif