gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scrolledwindow1 ), GTK_SHADOW_IN );
- t_materialist = gtk_tree_view_new();
+ t_materialist = ui::TreeView();
gtk_widget_set_name( t_materialist, "t_materialist" );
gtk_widget_show( t_materialist );
gtk_container_add( GTK_CONTAINER( scrolledwindow1 ), t_materialist );
TreePath::TreePath(const char *path) : TreePath(gtk_tree_path_new_from_string(path))
{ }
+ TreeView::TreeView() : TreeView(GTK_TREE_VIEW(gtk_tree_view_new()))
+ { }
+
TreeView::TreeView(TreeModel model) : TreeView(GTK_TREE_VIEW(gtk_tree_view_new_with_model(model)))
{ }
);
WRAP(TreeView, Widget, ui_treeview,
+ TreeView();
TreeView(TreeModel model);
);
{
GtkListStore* store = gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_POINTER );
- GtkTreeView* view = GTK_TREE_VIEW( gtk_tree_view_new_with_model( GTK_TREE_MODEL( store ) ) );
+ GtkTreeView* view = ui::TreeView( ui::TreeModel( GTK_TREE_MODEL( store ) ));
gtk_tree_view_set_enable_search( GTK_TREE_VIEW( view ), FALSE );
gtk_tree_view_set_headers_visible( view, FALSE );
g_signal_connect( G_OBJECT( view ), "button_press_event", G_CALLBACK( EntityClassList_button_press ), 0 );
gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( scr ) );
{
- ui::Widget view = ui::Widget(gtk_tree_view_new());
+ ui::Widget view = ui::TreeView();
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
auto renderer = ui::CellRendererText();
}
void TextureBrowser_createTreeViewTree(){
- g_TextureBrowser.m_treeViewTree = ui::Widget(GTK_WIDGET( gtk_tree_view_new() ));
+ g_TextureBrowser.m_treeViewTree = ui::TreeView();
gtk_tree_view_set_enable_search( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), FALSE );
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), FALSE );
}
void TextureBrowser_createTreeViewTags(){
- g_TextureBrowser.m_treeViewTags = ui::Widget(GTK_WIDGET( gtk_tree_view_new() ));
+ g_TextureBrowser.m_treeViewTags = ui::TreeView();
gtk_tree_view_set_enable_search( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), FALSE );
g_signal_connect( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), "button-press-event", (GCallback)TreeViewTags_onButtonPressed, NULL );