+ static GtkContainer* s_widget;
+ if (s_widget == NULL)
+ {
+ s_widget = GTK_CONTAINER(gtk_fixed_new());
+ GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(s_widget));
+ }
+ return s_widget;
+}
+
+extern "C" {
+static void style_set(GtkWidget*, GtkStyle*, void*)
+{
+ gs_fontSystem = wxNullFont;
+}
+}
+
+static const GtkStyle* ButtonStyle()
+{
+ static GtkWidget* s_widget;
+ if (s_widget == NULL)
+ {
+ s_widget = gtk_button_new();
+ gtk_container_add(ContainerWidget(), s_widget);
+ gtk_widget_ensure_style(s_widget);
+ g_signal_connect(s_widget, "style_set", G_CALLBACK(style_set), NULL);
+ }
+ return s_widget->style;
+}
+
+static const GtkStyle* ListStyle()
+{
+ static GtkWidget* s_widget;
+ if (s_widget == NULL)
+ {
+ s_widget = gtk_tree_view_new_with_model(
+ GTK_TREE_MODEL(gtk_list_store_new(1, G_TYPE_INT)));
+ gtk_container_add(ContainerWidget(), s_widget);
+ gtk_widget_ensure_style(s_widget);
+ }
+ return s_widget->style;
+}
+
+static const GtkStyle* TextCtrlStyle()
+{
+ static GtkWidget* s_widget;
+ if (s_widget == NULL)
+ {
+ s_widget = gtk_text_view_new();
+ gtk_container_add(ContainerWidget(), s_widget);
+ gtk_widget_ensure_style(s_widget);
+ }
+ return s_widget->style;
+}
+
+static const GtkStyle* MenuItemStyle()
+{
+ static GtkWidget* s_widget;
+ if (s_widget == NULL)
+ {
+ s_widget = gtk_menu_item_new();
+ gtk_container_add(ContainerWidget(), s_widget);
+ gtk_widget_ensure_style(s_widget);
+ }
+ return s_widget->style;
+}
+
+static const GtkStyle* MenuBarStyle()
+{
+ static GtkWidget* s_widget;
+ if (s_widget == NULL)
+ {
+ s_widget = gtk_menu_bar_new();
+ gtk_container_add(ContainerWidget(), s_widget);
+ gtk_widget_ensure_style(s_widget);
+ }
+ return s_widget->style;