]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/renderer.cpp
avoiding warning because of missing define
[wxWidgets.git] / src / gtk / renderer.cpp
index 3f32713a4994d8d9706199761384a3dc0fdbe0c8..a8eb92b00734e525dc7f46c54276dc16c93206a5 100644 (file)
@@ -33,6 +33,8 @@
     #include "wx/module.h"
 #endif
 
     #include "wx/module.h"
 #endif
 
+#include "wx/gtk/dc.h"
+
 #include <gtk/gtk.h>
 
 // ----------------------------------------------------------------------------
 #include <gtk/gtk.h>
 
 // ----------------------------------------------------------------------------
@@ -282,8 +284,8 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
-    wxImplDC *impl = dc.GetImpl();
-    wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC );
+    wxDCImpl *impl = dc.GetImpl();
+    wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl );
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
@@ -329,8 +331,8 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* win,
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
-    wxImplDC *impl = dc.GetImpl();
-    wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC );
+    wxDCImpl *impl = dc.GetImpl();
+    wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl );
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
@@ -416,8 +418,8 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win,
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
-    wxImplDC *impl = dc.GetImpl();
-    wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC );
+    wxDCImpl *impl = dc.GetImpl();
+    wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl );
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
@@ -484,8 +486,8 @@ wxRendererGTK::DrawDropArrow(wxWindow *WXUNUSED(win),
     // are derived from it) and use its m_window.
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
     // are derived from it) and use its m_window.
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
-    wxImplDC *impl = dc.GetImpl();
-    wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC );
+    wxDCImpl *impl = dc.GetImpl();
+    wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl );
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
@@ -554,8 +556,8 @@ wxRendererGTK::DrawCheckBox(wxWindow *WXUNUSED(win),
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
-    wxImplDC *impl = dc.GetImpl();
-    wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC );
+    wxDCImpl *impl = dc.GetImpl();
+    wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl );
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
@@ -600,8 +602,8 @@ wxRendererGTK::DrawPushButton(wxWindow *WXUNUSED(win),
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
 
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
-    wxImplDC *impl = dc.GetImpl();
-    wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC );
+    wxDCImpl *impl = dc.GetImpl();
+    wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl );
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
@@ -643,8 +645,8 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win,
 {
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
 {
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
-    wxImplDC *impl = dc.GetImpl();
-    wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC );
+    wxDCImpl *impl = dc.GetImpl();
+    wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl );
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
@@ -688,7 +690,12 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win,
                          state,
                          NULL,
                          win->m_wxwindow,
                          state,
                          NULL,
                          win->m_wxwindow,
-                         "treeview",
+                         // Detail "treeview" causes warning with GTK+ 2.12 Clearlooks theme:
+                         // "... no property named `row-ending-details'"
+                         // Using "treeview-middle" would fix the warning, but the right
+                         // edge of the focus rect is not getting erased properly either.
+                         // Better to not specify this detail unless the drawing is fixed.
+                         NULL,
                          dc.LogicalToDeviceX(rect.x),
                          dc.LogicalToDeviceY(rect.y),
                          rect.width,
                          dc.LogicalToDeviceX(rect.x),
                          dc.LogicalToDeviceY(rect.y),
                          rect.width,
@@ -700,8 +707,8 @@ void wxRendererGTK::DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, i
 {
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
 {
     GdkWindow* gdk_window = NULL;
 #if wxUSE_NEW_DC
-    wxImplDC *impl = dc.GetImpl();
-    wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC );
+    wxDCImpl *impl = dc.GetImpl();
+    wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl );
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else
     if (gtk_impl)
         gdk_window = gtk_impl->GetGDKWindow();
 #else