TextureBrowser_createTreeViewTree();
- gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tree ), textureBrowser.m_treeViewTree );
- //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tree ), g_TextureBrowser.m_treeViewTree );
- gtk_container_add( GTK_CONTAINER( g_TextureBrowser.m_scr_win_tree ), GTK_WIDGET( g_TextureBrowser.m_treeViewTree ) );
- g_TextureBrowser.m_treeViewTree.show();
++ //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tree ), textureBrowser.m_treeViewTree );
++ gtk_container_add( GTK_CONTAINER( textureBrowser.m_scr_win_tree ), GTK_WIDGET( textureBrowser.m_treeViewTree ) );
++
+ textureBrowser.m_treeViewTree.show();
}
{ // gl_widget scrollbar
auto w = ui::Widget::from(gtk_vscrollbar_new( ui::Adjustment( 0,0,0,1,1,0 ) ));
auto button = toolbar_append_button( toolbar, "Tags", "texbro_tags.png" );
button.dimensions( 22, 22 );
button.connect( "clicked", G_CALLBACK( Popup_View_Menu ), menu_tags );
+
+ //to show detached menu over floating tex bro and main wnd...
+ gtk_menu_attach_to_widget( GTK_MENU( menu_tags ), GTK_WIDGET( button ), NULL );
}
{ // Tag TreeView
- g_TextureBrowser.m_scr_win_tags = ui::ScrolledWindow(ui::New);
- gtk_container_set_border_width( GTK_CONTAINER( g_TextureBrowser.m_scr_win_tags ), 0 );
+ textureBrowser.m_scr_win_tags = ui::ScrolledWindow(ui::New);
+ gtk_container_set_border_width( GTK_CONTAINER( textureBrowser.m_scr_win_tags ), 0 );
// vertical only scrolling for treeview
- gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tags ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
+ gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tags ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
TextureBrowser_createTreeViewTags();
- auto selection = gtk_tree_view_get_selection(g_TextureBrowser.m_treeViewTags );
+ auto selection = gtk_tree_view_get_selection(textureBrowser.m_treeViewTags );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE );
- gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tags ), textureBrowser.m_treeViewTags );
- //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tags ), g_TextureBrowser.m_treeViewTags );
- gtk_container_add( GTK_CONTAINER( g_TextureBrowser.m_scr_win_tags ), GTK_WIDGET( g_TextureBrowser.m_treeViewTags ) );
- g_TextureBrowser.m_treeViewTags.show();
++ //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tags ), textureBrowser.m_treeViewTags );
++ gtk_container_add( GTK_CONTAINER( textureBrowser.m_scr_win_tags ), GTK_WIDGET( textureBrowser.m_treeViewTags ) );
++
+ textureBrowser.m_treeViewTags.show();
}
{ // Texture/Tag notebook
TextureBrowser_constructTagNotebook();
gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE );
auto column = ui::TreeViewColumn( "", renderer, {{"text", TAG_COLUMN}} );
- gtk_tree_view_append_column(g_TextureBrowser.m_assigned_tree, column );
- g_TextureBrowser.m_assigned_tree.show();
+ gtk_tree_view_append_column(textureBrowser.m_assigned_tree, column );
+ textureBrowser.m_assigned_tree.show();
scrolled_win.show();
- gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), textureBrowser.m_assigned_tree );
- //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), g_TextureBrowser.m_assigned_tree );
- gtk_container_add( GTK_CONTAINER( scrolled_win ), GTK_WIDGET( g_TextureBrowser.m_available_tree ) );
++
++ //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), textureBrowser.m_assigned_tree );
++ gtk_container_add( GTK_CONTAINER( scrolled_win ), GTK_WIDGET( textureBrowser.m_available_tree ) );
frame_table.attach(scrolled_win, {0, 1, 1, 3}, {GTK_FILL, GTK_FILL});
}
gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE );
auto column = ui::TreeViewColumn( "", renderer, {{"text", TAG_COLUMN}} );
- gtk_tree_view_append_column(g_TextureBrowser.m_available_tree, column );
- g_TextureBrowser.m_available_tree.show();
+ gtk_tree_view_append_column(textureBrowser.m_available_tree, column );
+ textureBrowser.m_available_tree.show();
scrolled_win.show();
- gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), textureBrowser.m_available_tree );
- //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), g_TextureBrowser.m_available_tree );
- gtk_container_add( GTK_CONTAINER( scrolled_win ), GTK_WIDGET( g_TextureBrowser.m_available_tree ) );
++
++ //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), textureBrowser.m_available_tree );
++ gtk_container_add( GTK_CONTAINER( scrolled_win ), GTK_WIDGET( textureBrowser.m_available_tree ) );
frame_table.attach(scrolled_win, {2, 3, 1, 3}, {GTK_FILL, GTK_FILL});
}