GtkRequisition entry_req;
entry_req.width = 2;
entry_req.height = 2;
- (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(gcombo->button) )->size_request )
- (gcombo->button, &entry_req );
+ (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(gcombo->entry) )->size_request )
+ (gcombo->entry, &entry_req );
- requisition->width = w - entry_req.width;
+ GtkRequisition button_req;
+ button_req.width = 2;
+ button_req.height = 2;
+ (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(gcombo->button) )->size_request )
+ (gcombo->button, &button_req );
+
+ requisition->width = w - button_req.width;
requisition->height = entry_req.height;
}
}
// time anymore.
GtkPizza *pizza = GTK_PIZZA( widget );
- if (gdk_event->window != pizza->bin_window) return FALSE;
+ if (gdk_event->window != pizza->bin_window)
+ {
+ // block expose events on GTK_WIDGET(pizza)->window,
+ // all drawing is done on pizza->bin_window
+ return true;
+ }
#if 0
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
scroll_class->scrollbar_spacing = 0;
- gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
+ if (HasFlag(wxALWAYS_SHOW_SB))
+ {
+ gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS );
+
+ scrolledWindow->hscrollbar_visible = TRUE;
+ scrolledWindow->vscrollbar_visible = TRUE;
+ }
+ else
+ {
+ gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
+ }
m_scrollBar[ScrollDir_Horz] = GTK_RANGE(scrolledWindow->hscrollbar);
m_scrollBar[ScrollDir_Vert] = GTK_RANGE(scrolledWindow->vscrollbar);
void wxWindowGTK::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
{
- wxString tmp( tip );
- gtk_tooltips_set_tip( tips, GetConnectWidget(), wxGTK_CONV(tmp), (gchar*) NULL );
+ if (tip)
+ {
+ wxString tmp( tip );
+ gtk_tooltips_set_tip( tips, GetConnectWidget(), wxGTK_CONV(tmp), (gchar*) NULL );
+ }
+ else
+ {
+ gtk_tooltips_set_tip( tips, GetConnectWidget(), NULL, NULL);
+ }
}
#endif // wxUSE_TOOLTIPS
gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy );
m_clipPaintRegion = false;
+
+ bool restoreCaret = (GetCaret() != NULL && GetCaret()->IsVisible());
+ if (restoreCaret)
+ {
+ wxRect caretRect(GetCaret()->GetPosition(), GetCaret()->GetSize());
+ if (dx > 0)
+ caretRect.width += dx;
+ else
+ {
+ caretRect.x += dx; caretRect.width -= dx;
+ }
+ if (dy > 0)
+ caretRect.height += dy;
+ else
+ {
+ caretRect.y += dy; caretRect.height -= dy;
+ }
+
+ RefreshRect(caretRect);
+ }
}
void wxWindowGTK::GtkScrolledWindowSetBorder(GtkWidget* w, int wxstyle)