GtkTreeViewColumn* col = gtk_tree_view_column_new();
gtk_tree_view_column_set_title( col, "materials" );
gtk_tree_view_append_column( GTK_TREE_VIEW( lookup_widget( wnd, "t_materialist" ) ), col );
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW( lookup_widget( wnd, "t_materialist" ) ), -1, "", renderer, "text", 0, NULL );
// list store
Button::Button(const char *label) : Button(GTK_BUTTON(gtk_button_new_with_label(label)))
{ }
+ CellRendererText::CellRendererText() : CellRendererText(GTK_CELL_RENDERER_TEXT(gtk_cell_renderer_text_new()))
+ { }
+
CheckButton::CheckButton(const char *label) : CheckButton(GTK_CHECK_BUTTON(gtk_check_button_new_with_label(label)))
{ }
using ui_box = struct _GtkBox;
using ui_button = struct _GtkButton;
using ui_checkbutton = struct _GtkCheckButton;
+using ui_cellrenderer = struct _GtkCellRenderer;
+using ui_cellrenderertext = struct _GtkCellRendererText;
using ui_entry = struct _GtkEntry;
using ui_evkey = struct _GdkEventKey;
using ui_hbox = struct _GtkHBox;
Button(const char *label);
);
+ WRAP(CellRenderer, Widget, ui_cellrenderer,);
+
+ WRAP(CellRendererText, CellRenderer, ui_cellrenderertext,
+ CellRendererText();
+ );
+
WRAP(CheckButton, Widget, ui_checkbutton,
CheckButton(const char *label);
);
ui::Widget view = ui::TreeView( ui::TreeModel(GTK_TREE_MODEL( store ) ));
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
object_set_boolean_property( G_OBJECT( renderer ), "editable", TRUE );
g_signal_connect( renderer, "edited", G_CALLBACK( project_cell_edited ), &projectList );
ui::Widget view = ui::TreeView(ui::TreeModel( GTK_TREE_MODEL( store ) ));
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
object_set_boolean_property( G_OBJECT( renderer ), "editable", TRUE );
g_signal_connect( renderer, "edited", G_CALLBACK( commands_cell_edited ), store );
gtk_tree_view_set_enable_search( GTK_TREE_VIEW( view ), false ); // annoying
{
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes( "Command", renderer, "text", 0, "weight-set", 2, "weight", 3, NULL );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
{
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes( "Key", renderer, "text", 1, "weight-set", 2, "weight", 3, NULL );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
g_signal_connect( G_OBJECT( view ), "key_press_event", G_CALLBACK( EntityClassList_keypress ), 0 );
{
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes( "Key", renderer, "text", 0, 0 );
gtk_tree_view_append_column( view, column );
}
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
{
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes( "", renderer, "text", 0, 0 );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
{
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes( "", renderer, "text", 1, 0 );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
ui::Widget view = ui::Widget(gtk_tree_view_new());
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new();
gtk_tree_view_column_pack_start( column, renderer, TRUE );
gtk_tree_view_column_set_cell_data_func( column, renderer, entitylist_treeviewcolumn_celldatafunc, 0, 0 );
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
{
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes( "", renderer, "text", 0, NULL );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
gtk_tree_view_set_headers_clickable( GTK_TREE_VIEW( view ), TRUE );
{
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes( "Entity", renderer, "text", 0, 0 );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
gtk_tree_view_column_set_sort_column_id( column, 0 );
}
{
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes( "Count", renderer, "text", 1, 0 );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
gtk_tree_view_column_set_sort_column_id( column, 1 );
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
{
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
GtkTreeViewColumn* column = gtk_tree_view_column_new_with_attributes( "Preferences", renderer, "text", 0, NULL );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), FALSE );
g_signal_connect( g_TextureBrowser.m_treeViewTree, "row-activated", (GCallback) TreeView_onRowActivated, NULL );
- renderer = gtk_cell_renderer_text_new();
+ renderer = ui::CellRendererText();
gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), -1, "", renderer, "text", 0, NULL );
TextureBrowser_constructTreeStore();
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), FALSE );
- renderer = gtk_cell_renderer_text_new();
+ renderer = ui::CellRendererText();
gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), -1, "", renderer, "text", 0, NULL );
TextureBrowser_constructTreeStoreTags();
GtkTreeSortable* sortable = GTK_TREE_SORTABLE( g_TextureBrowser.m_assigned_store );
gtk_tree_sortable_set_sort_column_id( sortable, TAG_COLUMN, GTK_SORT_ASCENDING );
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
g_TextureBrowser.m_assigned_tree = ui::TreeView(ui::TreeModel( GTK_TREE_MODEL( g_TextureBrowser.m_assigned_store ) ));
g_object_unref( G_OBJECT( g_TextureBrowser.m_assigned_store ) );
GtkTreeSortable* sortable = GTK_TREE_SORTABLE( g_TextureBrowser.m_available_store );
gtk_tree_sortable_set_sort_column_id( sortable, TAG_COLUMN, GTK_SORT_ASCENDING );
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer* renderer = ui::CellRendererText();
g_TextureBrowser.m_available_tree = ui::TreeView(ui::TreeModel( GTK_TREE_MODEL( g_TextureBrowser.m_available_store ) ));
g_object_unref( G_OBJECT( g_TextureBrowser.m_available_store ) );