#ifndef WX_PRECOMP
#include "wx/window.h"
+ #include "wx/dc.h"
+ #include "wx/dcclient.h"
#endif
#include <gtk/gtk.h>
#include "wx/gtk1/win_gtk.h"
-#include "wx/dc.h"
-#include "wx/dcclient.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
// work for wxMemoryDC. So that is why we assume wxDC
// is wxWindowDC (wxClientDC, wxMemoryDC and wxPaintDC
// are derived from it) and use its m_window.
- wxWindowDC& wdc = (wxWindowDC&)dc;
-
- // only doing debug-time checking here (it should
- // probably be enough)
- wxASSERT ( wdc.IsKindOf(CLASSINFO(wxWindowDC)) );
+ GdkWindow* gdk_window = dc.GetGDKWindow();
+ wxASSERT_MSG( gdk_window,
+ wxT("cannot use wxRendererNative on wxDC of this type") );
// draw arrow so that there is even space horizontally
// on both sides
gtk_paint_arrow
(
button->style,
- wdc.m_window,
+ gdk_window,
state,
flags & wxCONTROL_PRESSED ? GTK_SHADOW_IN : GTK_SHADOW_OUT,
NULL,
GtkWidget *button = GetButtonWidget();
// for reason why we do this, see DrawDropArrow
- wxWindowDC& wdc = (wxWindowDC&)dc;
- wxASSERT ( wdc.IsKindOf(CLASSINFO(wxWindowDC)) );
+ GdkWindow* gdk_window = dc.GetGDKWindow();
+ wxASSERT_MSG( gdk_window,
+ wxT("cannot use wxRendererNative on wxDC of this type") );
// draw button
GtkStateType state;
gtk_paint_box
(
button->style,
- wdc.m_window,
+ gdk_window,
state,
flags & wxCONTROL_PRESSED ? GTK_SHADOW_IN : GTK_SHADOW_OUT,
NULL,