const wxRect& rect,
int flags = 0);
- virtual void DrawChoice(wxWindow* win,
- wxDC& dc,
- const wxRect& rect,
+ virtual void DrawChoice(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
int flags=0);
- virtual void DrawComboBox(wxWindow* win,
- wxDC& dc,
- const wxRect& rect,
+ virtual void DrawComboBox(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
int flags=0);
- virtual void DrawTextCtrl(wxWindow* win,
- wxDC& dc,
- const wxRect& rect,
+ virtual void DrawTextCtrl(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
int flags=0);
- virtual void DrawRadioButton(wxWindow* win,
- wxDC& dc,
- const wxRect& rect,
+ virtual void DrawRadioButton(wxWindow* win,
+ wxDC& dc,
+ const wxRect& rect,
int flags=0);
virtual void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0);
static GdkWindow* wxGetGdkWindowForDC(wxWindow* win, wxDC& dc)
{
GdkWindow* gdk_window = NULL;
-
+
#if wxUSE_GRAPHICS_CONTEXT
if ( dc.IsKindOf( CLASSINFO(wxGCDC) ) )
gdk_window = win->GTKGetDrawingWindow();
"button",
dc.LogicalToDeviceX(rect.x) - x_diff, rect.y, rect.width, rect.height
);
-
+
return DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params);
}
int wxRendererGTK::GetHeaderButtonHeight(wxWindow *WXUNUSED(win))
{
GtkWidget *button = wxGTKPrivate::GetHeaderButtonWidget();
-
+
GtkRequisition req;
GTK_WIDGET_GET_CLASS(button)->size_request(button, &req);
-
+
return req.height;
}
NULL,
button,
"button",
- dc.LogicalToDeviceX(rect.x),
- dc.LogicalToDeviceY(rect.y),
- rect.width,
+ dc.LogicalToDeviceX(rect.x),
+ dc.LogicalToDeviceY(rect.y),
+ rect.width,
rect.height
);
}
int flags )
{
GtkWidget *tree = wxGTKPrivate::GetTreeWidget();
-
+
GdkWindow* gdk_window = wxGetGdkWindowForDC(win, dc);
wxASSERT_MSG( gdk_window,
wxT("cannot use wxRendererNative on wxDC of this type") );
x_diff = rect.width;
GtkStateType state = GTK_STATE_NORMAL;
-
+
if (flags & wxCONTROL_SELECTED)
{
// the wxCONTROL_FOCUSED state is deduced
{
if (flags & wxCONTROL_SELECTED)
state = GTK_STATE_SELECTED;
-
+
gtk_paint_focus( tree->style,
gdk_window,
state,
GtkStateType state = GTK_STATE_NORMAL;
if ( flags & wxCONTROL_DISABLED )
state = GTK_STATE_INSENSITIVE;
-
+
if (flags & wxCONTROL_CURRENT )
GTK_WIDGET_SET_FLAGS( entry, GTK_HAS_FOCUS );
else
gtk_paint_shadow
(
- entry->style,
+ entry->style,
gdk_window,
state,
GTK_SHADOW_OUT,
dc.LogicalToDeviceX(rect.x),
dc.LogicalToDeviceY(rect.y),
rect.width,
- rect.height
+ rect.height
);
}
GtkStateType state = GTK_STATE_NORMAL;
if ( flags & wxCONTROL_DISABLED )
state = GTK_STATE_INSENSITIVE;
-
+
if (flags & wxCONTROL_CURRENT )
GTK_WIDGET_SET_FLAGS( combo, GTK_HAS_FOCUS );
else
gtk_paint_shadow
(
- combo->style,
+ combo->style,
gdk_window,
state,
GTK_SHADOW_OUT,
dc.LogicalToDeviceX(rect.x),
dc.LogicalToDeviceY(rect.y),
rect.width,
- rect.height
+ rect.height
);
wxRect r = rect;
gtk_paint_arrow
(
- combo->style,
+ combo->style,
gdk_window,
state,
GTK_SHADOW_OUT,
gtk_paint_box
(
- combo->style,
+ combo->style,
gdk_window,
state,
GTK_SHADOW_ETCHED_OUT,
DrawComboBox( win, dc, rect, flags );
}
-
+
// Draw a themed radio button
void wxRendererGTK::DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
{
GtkWidget *button = wxGTKPrivate::GetRadioButtonWidget();
GdkWindow* gdk_window = wxGetGdkWindowForDC(win, dc);
-
+
GtkShadowType shadow_type = GTK_SHADOW_OUT;
if ( flags & wxCONTROL_CHECKED )
shadow_type = GTK_SHADOW_IN;
else if ( flags & wxCONTROL_UNDETERMINED )
shadow_type = GTK_SHADOW_ETCHED_IN;
-
+
GtkStateType state = GTK_STATE_NORMAL;
if ( flags & wxCONTROL_DISABLED )
state = GTK_STATE_INSENSITIVE;
NULL,
button,
"radiobutton",
- dc.LogicalToDeviceX(rect.x),
- dc.LogicalToDeviceY(rect.y),
+ dc.LogicalToDeviceX(rect.x),
+ dc.LogicalToDeviceY(rect.y),
rect.width, rect.height
);
}