#include <set>
-#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "uilib/uilib.h"
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
{
- GtkEntry* entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ auto entry = ui::Entry();
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
brushes_entry = entry;
}
{
- GtkEntry* entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ auto entry = ui::Entry();
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Total Brushes" );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Total Entities" );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Entity breakdown" );
- gtk_widget_show( label );
+ label.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, TRUE, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
gtk_tree_view_column_set_sort_column_id( column, 1 );
}
- gtk_widget_show( view );
+ view.show();
gtk_container_add( GTK_CONTAINER( scr ), view );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
{
ui::Widget label = ui::Label( "Entity number" );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Brush number" );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkEntry* entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ auto entry = ui::Entry();
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
entity = entry;
}
{
- GtkEntry* entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ auto entry = ui::Entry();
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
GtkHBox* hbox = create_dialog_hbox( 4 );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), TRUE, TRUE, 0 );
{
- GtkButton* button = create_dialog_button( "Find", G_CALLBACK( dialog_button_ok ), &dialog );
+ auto button = create_dialog_button( "Find", G_CALLBACK( dialog_button_ok ), &dialog );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
- widget_make_default( GTK_WIDGET( button ) );
+ widget_make_default( button );
gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
}
{