]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/renderer.cpp
Build notes for Cygwin.
[wxWidgets.git] / src / gtk / renderer.cpp
index b86627af6357bd485c49fac91450be4c487ba5ae..7a7beefbd2a71ee52daa9b677525150bbfc0b34f 100644 (file)
 #endif
 
 #include "wx/renderer.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/window.h"
+    #include "wx/dcclient.h"
+    #include "wx/settings.h"
+#endif
+
 #include <gtk/gtk.h>
 #include "wx/gtk/win_gtk.h"
 
-#include "wx/window.h"
-#include "wx/dc.h"
-#include "wx/dcclient.h"
-#include "wx/settings.h"
-
 // RR: After a correction to the orientation of the sash
 //     this doesn't seem to be required anymore and it
 //     seems to confuse some themes so USE_ERASE_RECT=0
@@ -202,7 +204,7 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
         NULL,
         button,
         "button",
-        dc.XLOG2DEV(rect.x), rect.y, rect.width, rect.height
+        dc.LogicalToDeviceX(rect.x), rect.y, rect.width, rect.height
     );
 }
 
@@ -436,7 +438,7 @@ wxRendererGTK::DrawComboBoxDropButton(wxWindow *win,
     DrawDropArrow(win,dc,rect);
 }
 
-void 
+void
 wxRendererGTK::DrawCheckBox(wxWindow *win,
                             wxDC& dc,
                             const wxRect& rect,
@@ -468,8 +470,8 @@ wxRendererGTK::DrawCheckBox(wxWindow *win,
         NULL,
         button,
         "cellcheck",
-        dc.LogicalToDeviceX(rect.x)+2, 
-        dc.LogicalToDeviceY(rect.y)+3, 
+        dc.LogicalToDeviceX(rect.x)+2,
+        dc.LogicalToDeviceY(rect.y)+3,
         13, 13
     );
 }
@@ -511,16 +513,12 @@ wxRendererGTK::DrawPushButton(wxWindow *win,
     );
 }
 
-void 
+void
 wxRendererGTK::DrawItemSelectionRect(wxWindow *win,
-                                       wxDC& dc,
-                                       const wxRect& rect,
-                                       int flags )
+                                     wxDC& dc,
+                                     const wxRect& rect,
+                                     int flags )
 {
-    // for reason why we do this, see DrawDropArrow
-    wxWindowDC& wdc = (wxWindowDC&)dc;
-    wxASSERT ( wdc.IsKindOf(CLASSINFO(wxWindowDC)) );
-
     GtkStateType state;
     if (flags & wxCONTROL_SELECTED)
     {
@@ -533,7 +531,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win,
                         GTK_PIZZA(win->m_wxwindow)->bin_window,
                         state,
                         GTK_SHADOW_NONE,
-                        NULL, 
+                        NULL,
                         win->m_wxwindow,
                         "treeview",
                         dc.LogicalToDeviceX(rect.x),