+//static
+wxVisualAttributes
+wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNew_t widget_new,
+ bool useBase,
+ int state)
+{
+ wxVisualAttributes attr;
+ // NB: we need toplevel window so that GTK+ can find the right style
+ GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ GtkWidget* widget = widget_new();
+ gtk_container_add(GTK_CONTAINER(wnd), widget);
+ attr = GetDefaultAttributesFromGTKWidget(widget, useBase, state);
+ gtk_widget_destroy(wnd);
+ return attr;
+}
+
+//static
+wxVisualAttributes
+wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromStr_t widget_new,
+ bool useBase,
+ int state)
+{
+ wxVisualAttributes attr;
+ // NB: we need toplevel window so that GTK+ can find the right style
+ GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ GtkWidget* widget = widget_new("");
+ gtk_container_add(GTK_CONTAINER(wnd), widget);
+ attr = GetDefaultAttributesFromGTKWidget(widget, useBase, state);
+ gtk_widget_destroy(wnd);
+ return attr;
+}
+
+
+//static
+wxVisualAttributes
+wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new,
+ bool useBase,
+ int state)
+{
+ wxVisualAttributes attr;
+ // NB: we need toplevel window so that GTK+ can find the right style
+ GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ GtkWidget* widget = widget_new(NULL);
+ gtk_container_add(GTK_CONTAINER(wnd), widget);
+ attr = GetDefaultAttributesFromGTKWidget(widget, useBase, state);
+ gtk_widget_destroy(wnd);
+ return attr;
+}
+
+#endif // wxUSE_CONTROLS