Table::Table(std::size_t rows, std::size_t columns, bool homogenous) : Table(GTK_TABLE(gtk_table_new(rows, columns, homogenous)))
{ }
+ TreePath::TreePath() : TreePath(gtk_tree_path_new())
+ { }
+
+ TreePath::TreePath(const char *path) : TreePath(gtk_tree_path_new_from_string(path))
+ { }
+
TreeView::TreeView(TreeModel model) : TreeView(GTK_TREE_VIEW(gtk_tree_view_new_with_model(model)))
{ }
using ui_spinbutton = struct _GtkSpinButton;
using ui_table = struct _GtkTable;
using ui_treemodel = struct _GtkTreeModel;
+using ui_treepath = struct _GtkTreePath;
using ui_treeview = struct _GtkTreeView;
using ui_typeinst = struct _GTypeInstance;
using ui_vbox = struct _GtkVBox;
WRAP(TreeModel, Widget, ui_treemodel,);
+ WRAP(TreePath, Object, ui_treepath,
+ TreePath();
+ TreePath(const char *path);
+ );
+
WRAP(TreeView, Widget, ui_treeview,
TreeView(TreeModel model);
);
gboolean project_cell_edited( GtkCellRendererText* cell, gchar* path_string, gchar* new_text, ProjectList* projectList ){
Project& project = projectList->m_project;
- GtkTreePath* path = gtk_tree_path_new_from_string( path_string );
+ GtkTreePath* path = ui::TreePath( path_string );
ASSERT_MESSAGE( gtk_tree_path_get_depth( path ) == 1, "invalid path length" );
}
Build& build = *g_current_build;
- GtkTreePath* path = gtk_tree_path_new_from_string( path_string );
+ GtkTreePath* path = ui::TreePath( path_string );
ASSERT_MESSAGE( gtk_tree_path_get_depth( path ) == 1, "invalid path length" );
#include <gtk/gtktreemodel.h>
#include <gtk/gtktreednd.h>
#include <gtk/gtkmain.h>
+#include <uilib/uilib.h>
#include "iscenegraph.h"
#include "nameable.h"
graph_type& graph = *GRAPH_TREE_MODEL( tree_model )->graph;
graph_type::iterator i = graph_iterator_read_tree_iter( iter );
- GtkTreePath* path = gtk_tree_path_new();
+ GtkTreePath* path = ui::TreePath();
for ( std::size_t depth = ( *i ).first.get().size(); depth != 0; --depth )
{
ASSERT_MESSAGE( tree_model != 0, "RUNTIME ERROR" );
GraphTreeNode* graph = GRAPH_TREE_MODEL( tree_model )->m_graph;
- GtkTreePath* path = gtk_tree_path_new();
+ GtkTreePath* path = ui::TreePath();
for ( GraphTreeNode* node = ( *graph_iterator_read_tree_iter( iter ) ).second; node != graph; node = node->m_parent )
{
{
GtkTreeIter iter;
- GtkTreePath* path = gtk_tree_path_new_from_string( "0" );
+ GtkTreePath* path = ui::TreePath( "0" );
gtk_tree_model_get_iter( model, &iter, path );
gtk_tree_path_free( path );
{
GtkTreeIter iter;
- GtkTreePath* path = gtk_tree_path_new_from_string( "1" );
+ GtkTreePath* path = ui::TreePath( "1" );
gtk_tree_model_get_iter( model, &iter, path );
gtk_tree_path_free( path );