]> git.saurik.com Git - wxWidgets.git/commitdiff
Updated makefile for mobile sample.
authorRobert Roebling <robert@roebling.de>
Fri, 19 Apr 2002 17:39:49 +0000 (17:39 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 19 Apr 2002 17:39:49 +0000 (17:39 +0000)
  Updated changes.txt.
  Moved contents of ::Update() to ::GtkUpdate()
  Moved internal idle functions in wxApp to
    its own function.
  Tried to fix themed background redraw problem
    (probably same bug in wxNotebook and in
     wxStatusBar and others).

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

Makefile.in
docs/gtk/changes.txt
docs/gtk/readme.txt
include/wx/gtk/app.h
include/wx/gtk/window.h
include/wx/gtk1/app.h
include/wx/gtk1/window.h
src/gtk/app.cpp
src/gtk/window.cpp
src/gtk1/app.cpp
src/gtk1/window.cpp

index 0c706ee022a453ebee9a548d108ccfae246d79e7..946687f0bd9075ef5fdc687a29b1ea6d45f00d4f 100644 (file)
@@ -1061,6 +1061,13 @@ SAMPLES_DIST: ALL_GUI_DIST
        cp $(SAMPDIR)/minimal/*.xpm $(DISTDIR)/samples/minimal
        cp $(SAMPDIR)/minimal/*.mms $(DISTDIR)/samples/minimal
 
+       mkdir $(DISTDIR)/samples/mobile
+       cp $(SAMPDIR)/mobile/Makefile.in $(DISTDIR)/samples/mobile
+       mkdir $(DISTDIR)/samples/mobile/wxedit
+       cp $(SAMPDIR)/mobile/wxedit/Makefile.in $(DISTDIR)/samples/mobile/wxedit
+       cp $(SAMPDIR)/mobile/wxedit/*.cpp $(DISTDIR)/samples/mobile/wxedit
+       cp $(SAMPDIR)/mobile/wxedit/*.h $(DISTDIR)/samples/mobile/wxedit
+    
        mkdir $(DISTDIR)/samples/dialup
        cp $(SAMPDIR)/dialup/Makefile.in $(DISTDIR)/samples/dialup
        cp $(SAMPDIR)/dialup/makefile.unx $(DISTDIR)/samples/dialup
index f70807fd93996a31c4fbeaa3863fabbdc2171bfa..e0352be6eb8877ecaf8c4e095b90fbfed0fe0ce5 100644 (file)
@@ -1,6 +1,23 @@
 
 *** wxWindows 2.3.3 ***
 
+Beta support for GTK 2.0.
+
+Added wxArtProvider for changing default icons and more.
+
+Corrected wxScrolledWindow in some rare cases.
+
+Added wxIconBundle for mini- and normal icons.
+
+Made wxWindow::SetFocus() work before a wxDialog
+is created. Until now always the first item
+was focussed.
+
+Corrected wxComboBox's semantics of pressing <Enter>.
+
+Corrected SeekI() return values and other related functions
+in wxFilterStream and wxBufferedStream.
+
 Implemented new ref-counting for GDI classes.
 
 New implemenation of wxCondition.
@@ -39,7 +56,7 @@ Added IFF image handler.
 
 Added ICO, CUR and ANI image handler.
 
-wxFrame::SetMenuBar() corrected.
+wxFrame::SetMenuBar() corrected (for NULL etc.)
 
 wxButton honours wxBU_EXACTFIT.
 
index bf37a03d8355b821cce21c951d2f36692ded3a79..58a83d81e2f5f08e63f672d3e66aad806b5a5aff 100644 (file)
@@ -7,13 +7,10 @@ wxWindows GUI library.
 wxWindows no longer supports GTK 1.0 (as did some early
 snapshots) so that you will need GTK 1.2 when using it.
 GTK 1.2.6 or above is recommended although some programs 
-will work with GTK 1.2.3 onwards.
+will work with GTK 1.2.3 onwards. There is now beta support
+for GTK 2.0.
 
-More information is available from my homepage at:
-
-  http://wesley.informatik.uni-freiburg.de/~wxxt
-  
-and about the wxWindows project as a whole (and the MSW
+More info about the wxWindows project (and the Windows
 and Motif ports in particular) can be found at Julian's 
 homepage at:
 
index f8b359a39f27a58b02dfce21dbd122c39cbfd7ee..d10118ecf3199fa8b099c05e04955c62b604c8a7 100644 (file)
@@ -87,6 +87,8 @@ private:
     bool m_isInAssert;
 #endif // __WXDEBUG__
 
+    bool CallInternalIdle( wxWindow* win );
+    
     DECLARE_DYNAMIC_CLASS(wxApp)
     DECLARE_EVENT_TABLE()
 };
index cd5b5c16a5c375087197827b2fc808890ea3330f..e8e7944efcfe1af0a9cd496d34db11398a302f21 100644 (file)
@@ -112,6 +112,9 @@ public:
     // OnInternalIdle
     virtual void OnInternalIdle();
 
+    // Internal represention of Update()
+    void GtkUpdate();
+    
     // For delayed background 
     void GtkSetBackgroundColour( const wxColour &colour );
     void GtkSetForegroundColour( const wxColour &colour );
index f8b359a39f27a58b02dfce21dbd122c39cbfd7ee..d10118ecf3199fa8b099c05e04955c62b604c8a7 100644 (file)
@@ -87,6 +87,8 @@ private:
     bool m_isInAssert;
 #endif // __WXDEBUG__
 
+    bool CallInternalIdle( wxWindow* win );
+    
     DECLARE_DYNAMIC_CLASS(wxApp)
     DECLARE_EVENT_TABLE()
 };
index cd5b5c16a5c375087197827b2fc808890ea3330f..e8e7944efcfe1af0a9cd496d34db11398a302f21 100644 (file)
@@ -112,6 +112,9 @@ public:
     // OnInternalIdle
     virtual void OnInternalIdle();
 
+    // Internal represention of Update()
+    void GtkUpdate();
+    
     // For delayed background 
     void GtkSetBackgroundColour( const wxColour &colour );
     void GtkSetForegroundColour( const wxColour &colour );
index 43d42a540f3b96bd3c0788141d24415f83509328..6e1c25de261aedb153d6c96cee36d985bd2071fe 100644 (file)
@@ -486,12 +486,37 @@ bool wxApp::SendIdleEvents()
         wxWindow* win = node->GetData();
         if (SendIdleEvents(win))
             needMore = TRUE;
+            
         node = node->GetNext();
     }
 
+    node = wxTopLevelWindows.GetFirst();
+    while (node)
+    {
+        wxWindow* win = node->GetData();
+        CallInternalIdle( win );
+        
+        node = node->GetNext();
+    }
     return needMore;
 }
 
+bool wxApp::CallInternalIdle( wxWindow* win )
+{
+    win->OnInternalIdle();
+
+    wxNode* node = win->GetChildren().First();
+    while (node)
+    {
+        wxWindow* win = (wxWindow*) node->Data();
+        CallInternalIdle( win );
+
+        node = node->Next();
+    }
+    
+    return TRUE;
+}
+
 bool wxApp::SendIdleEvents( wxWindow* win )
 {
     bool needMore = FALSE;
@@ -514,8 +539,6 @@ bool wxApp::SendIdleEvents( wxWindow* win )
         node = node->Next();
     }
     
-    win->OnInternalIdle();
-
     return needMore;
 }
 
index efc124ac8dd7ad236dd2da336a9ebc5d3b121681..c15e735d2b18ed4a83e5eb0871d394ffd3ba1e23 100644 (file)
@@ -551,35 +551,13 @@ static int gtk_window_expose_callback( GtkWidget *widget,
     }
 #endif
 
-#ifndef __WXUNIVERSAL__
-    GtkPizza *pizza = GTK_PIZZA (widget);
-
-    if (win->GetThemeEnabled())
-    {
-        wxWindow *parent = win->GetParent();
-        while (parent && !parent->IsTopLevel())
-            parent = parent->GetParent();
-        if (!parent)
-            parent = win;
-
-        gtk_paint_flat_box (parent->m_widget->style,
-                            pizza->bin_window,
-                            GTK_STATE_NORMAL,
-                            GTK_SHADOW_NONE,
-                            &gdk_event->area,
-                            parent->m_widget,
-                            (char *)"base",
-                            0, 0, -1, -1);
-    }
-#endif
-
     win->GetUpdateRegion().Union( gdk_event->area.x,
                                   gdk_event->area.y,
                                   gdk_event->area.width,
                                   gdk_event->area.height );
 
     // Actual redrawing takes place in idle time.
-    win->Update();
+    win->GtkUpdate();
 
 #ifdef __WXGTK20__
 
@@ -686,7 +664,7 @@ static void gtk_window_draw_callback( GtkWidget *widget,
 
     // Actual redrawing takes place in idle time.
 
-    win->Update();
+    win->GtkUpdate();
 
 #ifndef __WXUNIVERSAL__
     // Redraw child widgets
@@ -2902,7 +2880,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
 void wxWindowGTK::OnInternalIdle()
 {
     // Update invalidated regions.
-    Update();
+    GtkUpdate();
 
     // Synthetize activate events.
     if ( g_sendActivateEvent != -1 )
@@ -3500,6 +3478,11 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect )
 }
 
 void wxWindowGTK::Update()
+{
+    GtkUpdate();
+}
+
+void wxWindowGTK::GtkUpdate()
 {
 #ifdef __WXGTK20__
     if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window)
@@ -3538,11 +3521,41 @@ void wxWindowGTK::GtkSendPaintEvents()
             }
             gdk_gc_set_foreground( g_eraseGC, m_backgroundColour.GetColor() );
 
+            // widget to draw on
+            GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
+            
+            // find ancestor from which to steal background
+            wxWindow *parent = GetParent();
+            while (parent && !parent->IsTopLevel())
+                parent = parent->GetParent();
+            if (!parent)
+                parent = this;
+    
             wxRegionIterator upd( m_clearRegion );
             while (upd)
             {
-                gdk_draw_rectangle( GTK_PIZZA(m_wxwindow)->bin_window, g_eraseGC, 1,
-                                       upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
+                if (GetThemeEnabled())
+                { 
+                    GdkRectangle rect;
+                    rect.x = upd.GetX();
+                    rect.y = upd.GetY();
+                    rect.width = upd.GetWidth();
+                    rect.height = upd.GetHeight();
+                    
+                    gtk_paint_flat_box( parent->m_widget->style,
+                        pizza->bin_window,
+                        GTK_STATE_NORMAL,
+                        GTK_SHADOW_NONE,
+                        &rect,
+                        parent->m_widget,
+                        (char *)"base",
+                        0, 0, -1, -1 );
+                }
+                else
+                {
+                    gdk_draw_rectangle( pizza->bin_window, g_eraseGC, 1,
+                                        upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
+                }
                 upd ++;
             }
         }
@@ -3619,7 +3632,7 @@ void wxWindowGTK::Clear()
         m_clearRegion.Union( 0,0,size.x,size.y );
         
         // Better do this in idle?
-        Update();
+        GtkUpdate();
     }
 }
 
index 43d42a540f3b96bd3c0788141d24415f83509328..6e1c25de261aedb153d6c96cee36d985bd2071fe 100644 (file)
@@ -486,12 +486,37 @@ bool wxApp::SendIdleEvents()
         wxWindow* win = node->GetData();
         if (SendIdleEvents(win))
             needMore = TRUE;
+            
         node = node->GetNext();
     }
 
+    node = wxTopLevelWindows.GetFirst();
+    while (node)
+    {
+        wxWindow* win = node->GetData();
+        CallInternalIdle( win );
+        
+        node = node->GetNext();
+    }
     return needMore;
 }
 
+bool wxApp::CallInternalIdle( wxWindow* win )
+{
+    win->OnInternalIdle();
+
+    wxNode* node = win->GetChildren().First();
+    while (node)
+    {
+        wxWindow* win = (wxWindow*) node->Data();
+        CallInternalIdle( win );
+
+        node = node->Next();
+    }
+    
+    return TRUE;
+}
+
 bool wxApp::SendIdleEvents( wxWindow* win )
 {
     bool needMore = FALSE;
@@ -514,8 +539,6 @@ bool wxApp::SendIdleEvents( wxWindow* win )
         node = node->Next();
     }
     
-    win->OnInternalIdle();
-
     return needMore;
 }
 
index efc124ac8dd7ad236dd2da336a9ebc5d3b121681..c15e735d2b18ed4a83e5eb0871d394ffd3ba1e23 100644 (file)
@@ -551,35 +551,13 @@ static int gtk_window_expose_callback( GtkWidget *widget,
     }
 #endif
 
-#ifndef __WXUNIVERSAL__
-    GtkPizza *pizza = GTK_PIZZA (widget);
-
-    if (win->GetThemeEnabled())
-    {
-        wxWindow *parent = win->GetParent();
-        while (parent && !parent->IsTopLevel())
-            parent = parent->GetParent();
-        if (!parent)
-            parent = win;
-
-        gtk_paint_flat_box (parent->m_widget->style,
-                            pizza->bin_window,
-                            GTK_STATE_NORMAL,
-                            GTK_SHADOW_NONE,
-                            &gdk_event->area,
-                            parent->m_widget,
-                            (char *)"base",
-                            0, 0, -1, -1);
-    }
-#endif
-
     win->GetUpdateRegion().Union( gdk_event->area.x,
                                   gdk_event->area.y,
                                   gdk_event->area.width,
                                   gdk_event->area.height );
 
     // Actual redrawing takes place in idle time.
-    win->Update();
+    win->GtkUpdate();
 
 #ifdef __WXGTK20__
 
@@ -686,7 +664,7 @@ static void gtk_window_draw_callback( GtkWidget *widget,
 
     // Actual redrawing takes place in idle time.
 
-    win->Update();
+    win->GtkUpdate();
 
 #ifndef __WXUNIVERSAL__
     // Redraw child widgets
@@ -2902,7 +2880,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
 void wxWindowGTK::OnInternalIdle()
 {
     // Update invalidated regions.
-    Update();
+    GtkUpdate();
 
     // Synthetize activate events.
     if ( g_sendActivateEvent != -1 )
@@ -3500,6 +3478,11 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect )
 }
 
 void wxWindowGTK::Update()
+{
+    GtkUpdate();
+}
+
+void wxWindowGTK::GtkUpdate()
 {
 #ifdef __WXGTK20__
     if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window)
@@ -3538,11 +3521,41 @@ void wxWindowGTK::GtkSendPaintEvents()
             }
             gdk_gc_set_foreground( g_eraseGC, m_backgroundColour.GetColor() );
 
+            // widget to draw on
+            GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
+            
+            // find ancestor from which to steal background
+            wxWindow *parent = GetParent();
+            while (parent && !parent->IsTopLevel())
+                parent = parent->GetParent();
+            if (!parent)
+                parent = this;
+    
             wxRegionIterator upd( m_clearRegion );
             while (upd)
             {
-                gdk_draw_rectangle( GTK_PIZZA(m_wxwindow)->bin_window, g_eraseGC, 1,
-                                       upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
+                if (GetThemeEnabled())
+                { 
+                    GdkRectangle rect;
+                    rect.x = upd.GetX();
+                    rect.y = upd.GetY();
+                    rect.width = upd.GetWidth();
+                    rect.height = upd.GetHeight();
+                    
+                    gtk_paint_flat_box( parent->m_widget->style,
+                        pizza->bin_window,
+                        GTK_STATE_NORMAL,
+                        GTK_SHADOW_NONE,
+                        &rect,
+                        parent->m_widget,
+                        (char *)"base",
+                        0, 0, -1, -1 );
+                }
+                else
+                {
+                    gdk_draw_rectangle( pizza->bin_window, g_eraseGC, 1,
+                                        upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
+                }
                 upd ++;
             }
         }
@@ -3619,7 +3632,7 @@ void wxWindowGTK::Clear()
         m_clearRegion.Union( 0,0,size.x,size.y );
         
         // Better do this in idle?
-        Update();
+        GtkUpdate();
     }
 }