]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
Applied FloodFill patch
[wxWidgets.git] / src / gtk / window.cpp
index 9e821ad94eba75d2370486d8ed8d0041bcfb0a01..38b3a20847411bd3d23381b98a33d79d77099177 100644 (file)
     #endif
 #endif
 
+#ifdef __WXGTK20__
+extern GtkContainerClass *pizza_parent_class;
+#endif
+
 //-----------------------------------------------------------------------------
 // documentation on internals
 //-----------------------------------------------------------------------------
@@ -385,7 +389,6 @@ static wxWindowGTK* wxGetTopLevelParent(wxWindowGTK *win)
     return p;
 }
 
-
 static void draw_frame( GtkWidget *widget, wxWindowGTK *win )
 {
     // wxUniversal widgets draw the borders and scrollbars themselves
@@ -481,6 +484,11 @@ gint gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_even
 
     draw_frame( widget, win );
 
+#ifdef __WXGTK20__
+
+    (* GTK_WIDGET_CLASS (pizza_parent_class)->expose_event) (widget, gdk_event);
+    
+#endif    
     return TRUE;
 }
 
@@ -488,11 +496,15 @@ gint gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_even
 // "draw" of m_widget
 //-----------------------------------------------------------------------------
 
+#ifndef __WXGTK20__
+
 static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNUSED(rect), wxWindowGTK *win )
 {
     draw_frame( widget, win );
 }
 
+#endif
+
 //-----------------------------------------------------------------------------
 // key code mapping routines
 //-----------------------------------------------------------------------------
@@ -817,6 +829,12 @@ static int gtk_window_expose_callback( GtkWidget *widget,
 
     // Actual redrawing takes place in idle time.
     win->Update();
+    
+#ifdef __WXGTK20__
+
+    (* GTK_WIDGET_CLASS (pizza_parent_class)->expose_event) (widget, gdk_event);
+    
+#endif    
 
     return TRUE;
 }
@@ -848,8 +866,10 @@ gint gtk_window_event_event_callback( GtkWidget *widget,
 // "draw" of m_wxwindow
 //-----------------------------------------------------------------------------
 
+#ifndef __WXGTK20__
+
 // This callback is a complete replacement of the gtk_pizza_draw() function,
-// which disabled.
+// which is disabled.
 
 static void gtk_window_draw_callback( GtkWidget *widget,
                                       GdkRectangle *rect,
@@ -934,6 +954,8 @@ static void gtk_window_draw_callback( GtkWidget *widget,
 #endif
 }
 
+#endif
+
 //-----------------------------------------------------------------------------
 // "key_press_event" from any window
 //-----------------------------------------------------------------------------
@@ -2536,7 +2558,7 @@ void wxWindowGTK::PostCreation()
 #endif
         }
 
-        // these are called when the "sunken" or "raised" borders are drawn */
+        // these are called when the "sunken" or "raised" borders are drawn
         gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event",
           GTK_SIGNAL_FUNC(gtk_window_own_expose_callback), (gpointer)this );
 
@@ -2704,12 +2726,14 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
         int border = 0;
         int bottom_border = 0;
 
+#ifndef __WXGTK20__
         if (GTK_WIDGET_CAN_DEFAULT(m_widget))
         {
             /* the default button has a border around it */
             border = 6;
             bottom_border = 5;
         }
+#endif
 
         DoMoveWindow( m_x-border,
                       m_y-border,
@@ -4068,10 +4092,10 @@ void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
     m_clipPaintRegion = FALSE;
 #else
 
-    gdk_window_scroll( GTK_PIZZA(m_wxwindow)->bin_window, -dx, -dy );
+    gdk_window_scroll( GTK_PIZZA(m_wxwindow)->bin_window, dx, dy );
     
-    GTK_PIZZA(m_wxwindow)->xoffset -= dx;
-    GTK_PIZZA(m_wxwindow)->yoffset -= dy;
+    GTK_PIZZA(m_wxwindow)->xoffset += dx;
+    GTK_PIZZA(m_wxwindow)->yoffset += dy;
     
 #endif