]> git.saurik.com Git - wxWidgets.git/commitdiff
Refresh() problem from DialogEd solved
authorRobert Roebling <robert@roebling.de>
Tue, 12 Oct 1999 21:52:17 +0000 (21:52 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 12 Oct 1999 21:52:17 +0000 (21:52 +0000)
  Unified the naming of GNU pragmas for base classed:
    dialogbase, choicebase, etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/choice.h
include/wx/control.h
include/wx/dialog.h
include/wx/font.h
src/common/choiccmn.cpp
src/common/ctrlcmn.cpp
src/common/dlgcmn.cpp
src/common/fontcmn.cpp
src/gtk/window.cpp
src/gtk1/window.cpp

index 3b9eaf5558c5cd1f479b676586251c9af2f7dc39..81d2e29ad91cbc1bb05f1557c1bb73514a6f0ba3 100644 (file)
@@ -17,7 +17,7 @@
 // ----------------------------------------------------------------------------
 
 #ifdef __GNUG__
-    #pragma interface "choiccmn.h"
+    #pragma interface "choicebase.h"
 #endif
 
 #include "wx/control.h"     // the base class
index 5641eb3506fdb73ed539aa6ba853d0a68f44c5ab..47c78785c51cab9a071d2bb32cfeb1deadf32a3f 100644 (file)
@@ -17,7 +17,7 @@
 // ----------------------------------------------------------------------------
 
 #ifdef __GNUG__
-    #pragma interface "ctrlcmn.h"
+    #pragma interface "controlbase.h"
 #endif
 
 #include "wx/window.h"      // base class
index ac5f9a967228e9981484d46f6244a6fe28fd02f0..fb131cd96ce6e89c9e41b70b98aa033c11c2b543 100644 (file)
 #ifndef _WX_DIALOG_H_BASE_
 #define _WX_DIALOG_H_BASE_
 
+#ifdef __GNUG__
+    #pragma interface "dialogbase.h"
+#endif
+
 #include "wx/defs.h"
 #include "wx/panel.h"
 
index 5ae71a8007ded9439226addc60dbf47d74ecd2f8..4afebcc07d8ce4ddc3fc428a8b66bed2bdf96c61 100644 (file)
 #ifndef _WX_FONT_H_BASE_
 #define _WX_FONT_H_BASE_
 
+#ifdef __GNUG__
+    #pragma interface "fontbase.h"
+#endif
+
 // ----------------------------------------------------------------------------
 // headers
 // ----------------------------------------------------------------------------
index cf1305605e78f09c238ae085dcfbf0d343adb0f0..09e5d443d5034b4cad74cad087a0b412dc3bb22c 100644 (file)
@@ -18,7 +18,7 @@
 // ----------------------------------------------------------------------------
 
 #ifdef __GNUG__
-    #pragma implementation "choiccmn.h"
+    #pragma implementation "choicebase.h"
 #endif
 
 // For compilers that support precompilation, includes "wx.h".
index 916a4e578ddadc0eb38f0d70238f115fb0c75f3e..8e99dd0b174b334cabb12f0826cdfae27f3c34f0 100644 (file)
@@ -18,7 +18,7 @@
 // ----------------------------------------------------------------------------
 
 #ifdef __GNUG__
-    #pragma implementation "ctrlcmn.h"
+    #pragma implementation "controlbase.h"
 #endif
 
 // For compilers that support precompilation, includes "wx.h".
index bdae60dffb233e05137ce6dcf7b142816f81850a..73d1bcd7dcb5c44953720c990607167bcde27fbb 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if 0
 #ifdef __GNUG__
-    #pragma implementation
-#endif
+    #pragma implementation "dialogbase.h"
 #endif
 
 // For compilers that support precompilation, includes "wx.h".
index c27bb8d92b4fee9b5e8bad6ff3f26defc9cc14e7..ca1921a2bc6ae38feb20f7afb529a2b6a3754d0a 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
+#ifdef __GNUG__
+    #pragma implementation "fontbase.h"
+#endif
+
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
index 7e235b0c06335305cd875a287ecbb6cc38bbbe66..5c6a1422e1daa164bc9f291ca154f987075e2449 100644 (file)
@@ -2663,50 +2663,44 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
         }
     }
 
+    /* there is no GTK equivalent of "draw only, don't clear" so we
+       invent our own in the GtkMyFixed widget */
+
     if (!rect)
     {
         if (m_wxwindow)
        {
-           /* call the callback directly for preventing GTK from
-              clearing the background */
-           int w = 0;
-           int h = 0;
-           GetClientSize( &w, &h );
+           GtkMyFixed *myfixed = GTK_MYFIXED(m_wxwindow);
+           gboolean old_clear = myfixed->clear_on_draw;
+           gtk_my_fixed_set_clear( myfixed, FALSE );
+           
+            gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
            
-            GetUpdateRegion().Union( 0, 0, w, h );
-            wxPaintEvent event( GetId() );
-            event.SetEventObject( this );
-            GetEventHandler()->ProcessEvent( event );
-            GetUpdateRegion().Clear();
+           gtk_my_fixed_set_clear( myfixed, old_clear );
        }
         else
-       {
             gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
-       }
     }
     else
     {
+        GdkRectangle gdk_rect;
+        gdk_rect.x = rect->x;
+        gdk_rect.y = rect->y;
+        gdk_rect.width = rect->width;
+        gdk_rect.height = rect->height;
 
         if (m_wxwindow)
        {
-           /* call the callback directly for preventing GTK from
-              clearing the background */
-            GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height );
-            wxPaintEvent event( GetId() );
-            event.SetEventObject( this );
-            GetEventHandler()->ProcessEvent( event );
-            GetUpdateRegion().Clear();
+           GtkMyFixed *myfixed = GTK_MYFIXED(m_wxwindow);
+           gboolean old_clear = myfixed->clear_on_draw;
+           gtk_my_fixed_set_clear( myfixed, FALSE );
+           
+            gtk_widget_draw( m_wxwindow, &gdk_rect );
+           
+           gtk_my_fixed_set_clear( myfixed, old_clear );
        }
         else
-       {
-            GdkRectangle gdk_rect;
-            gdk_rect.x = rect->x;
-            gdk_rect.y = rect->y;
-            gdk_rect.width = rect->width;
-            gdk_rect.height = rect->height;
-           
             gtk_widget_draw( m_widget, &gdk_rect );
-       }
     }
 }
 
index 7e235b0c06335305cd875a287ecbb6cc38bbbe66..5c6a1422e1daa164bc9f291ca154f987075e2449 100644 (file)
@@ -2663,50 +2663,44 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
         }
     }
 
+    /* there is no GTK equivalent of "draw only, don't clear" so we
+       invent our own in the GtkMyFixed widget */
+
     if (!rect)
     {
         if (m_wxwindow)
        {
-           /* call the callback directly for preventing GTK from
-              clearing the background */
-           int w = 0;
-           int h = 0;
-           GetClientSize( &w, &h );
+           GtkMyFixed *myfixed = GTK_MYFIXED(m_wxwindow);
+           gboolean old_clear = myfixed->clear_on_draw;
+           gtk_my_fixed_set_clear( myfixed, FALSE );
+           
+            gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
            
-            GetUpdateRegion().Union( 0, 0, w, h );
-            wxPaintEvent event( GetId() );
-            event.SetEventObject( this );
-            GetEventHandler()->ProcessEvent( event );
-            GetUpdateRegion().Clear();
+           gtk_my_fixed_set_clear( myfixed, old_clear );
        }
         else
-       {
             gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
-       }
     }
     else
     {
+        GdkRectangle gdk_rect;
+        gdk_rect.x = rect->x;
+        gdk_rect.y = rect->y;
+        gdk_rect.width = rect->width;
+        gdk_rect.height = rect->height;
 
         if (m_wxwindow)
        {
-           /* call the callback directly for preventing GTK from
-              clearing the background */
-            GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height );
-            wxPaintEvent event( GetId() );
-            event.SetEventObject( this );
-            GetEventHandler()->ProcessEvent( event );
-            GetUpdateRegion().Clear();
+           GtkMyFixed *myfixed = GTK_MYFIXED(m_wxwindow);
+           gboolean old_clear = myfixed->clear_on_draw;
+           gtk_my_fixed_set_clear( myfixed, FALSE );
+           
+            gtk_widget_draw( m_wxwindow, &gdk_rect );
+           
+           gtk_my_fixed_set_clear( myfixed, old_clear );
        }
         else
-       {
-            GdkRectangle gdk_rect;
-            gdk_rect.x = rect->x;
-            gdk_rect.y = rect->y;
-            gdk_rect.width = rect->width;
-            gdk_rect.height = rect->height;
-           
             gtk_widget_draw( m_widget, &gdk_rect );
-       }
     }
 }