GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_BROWSE );
- gtk_widget_show( view );
+ view.show();
buildView = view;
projectList.m_store = store;
GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_BROWSE );
- gtk_widget_show( view );
+ view.show();
gtk_container_add( GTK_CONTAINER( scr ), view );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
- gtk_widget_show( view );
+ view.show();
gtk_container_add( GTK_CONTAINER( scr ), view );
{
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( clearbutton ), FALSE, FALSE, 0 );
ui::Widget spacer = ui::Image();
- gtk_widget_show( spacer );
+ spacer.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( spacer ), TRUE, TRUE, 0 );
auto button = create_modal_dialog_button( "Close", dialog.m_close_button );
ui::Widget item(ui::MenuItem( "Clear" ));
g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( console_clear ), 0 );
- gtk_widget_show( item );
+ item.show();
container_add_widget( menu, item );
}
ui::Widget scr = ui::ScrolledWindow();
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
- gtk_widget_show( scr );
+ scr.show();
{
ui::Widget text = ui::TextView();
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( text ), GTK_WRAP_WORD );
gtk_text_view_set_editable( GTK_TEXT_VIEW( text ), FALSE );
gtk_container_add( GTK_CONTAINER( scr ), text );
- gtk_widget_show( text );
+ text.show();
g_console = text;
//globalExtendedASCIICharacterSet().print();
GtkEntry* DialogEntry_new(){
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_widget_set_size_request( GTK_WIDGET( entry ), 64, -1 );
return entry;
}
DialogEntryRow DialogEntryRow_new( const char* name ){
ui::Widget alignment = ui::Alignment( 0.0, 0.5, 0.0, 0.0 );
- gtk_widget_show( alignment );
+ alignment.show();
GtkEntry* entry = DialogEntry_new();
gtk_container_add( GTK_CONTAINER( alignment ), GTK_WIDGET( entry ) );
{
++digits;
}
- GtkSpinButton* spin = ui::SpinButton( ui::Adjustment( value, lower, upper, step, 10, 0 ), step, digits );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ auto spin = ui::SpinButton( ui::Adjustment( value, lower, upper, step, 10, 0 ), step, digits );
+ spin.show();
gtk_widget_set_size_request( GTK_WIDGET( spin ), 64, -1 );
return spin;
}
DialogSpinnerRow DialogSpinnerRow_new( const char* name, double value, double lower, double upper, int fraction ){
ui::Widget alignment = ui::Alignment( 0.0, 0.5, 0.0, 0.0 );
- gtk_widget_show( alignment );
+ alignment.show();
GtkSpinButton* spin = DialogSpinner_new( value, lower, upper, fraction );
gtk_container_add( GTK_CONTAINER( alignment ), GTK_WIDGET( spin ) );
void Dialog::ShowDlg(){
ASSERT_MESSAGE( m_window, "dialog was not constructed" );
importData();
- gtk_widget_show( GTK_WIDGET( m_window ) );
+ m_window.show();
}
void Dialog::HideDlg(){
ui::CheckButton Dialog::addCheckBox( ui::Widget vbox, const char* name, const char* flag, const BoolImportCallback& importViewer, const BoolExportCallback& exportViewer ){
auto check = ui::CheckButton( flag );
- gtk_widget_show( check );
+ check.show();
AddBoolToggleData( *GTK_TOGGLE_BUTTON( check ), importViewer, exportViewer );
DialogVBox_packRow( ui::VBox(GTK_VBOX( vbox )), ui::Widget(GTK_WIDGET( DialogRow_new( name, check ) ) ));
void Dialog::addCombo( ui::Widget vbox, const char* name, StringArrayRange values, const IntImportCallback& importViewer, const IntExportCallback& exportViewer ){
ui::Widget alignment = ui::Alignment( 0.0, 0.5, 0.0, 0.0 );
- gtk_widget_show( alignment );
+ alignment.show();
{
ui::Widget combo = ui::ComboBoxText();
AddIntComboData( *GTK_COMBO_BOX( combo ), importViewer, exportViewer );
- gtk_widget_show( combo );
+ combo.show();
gtk_container_add( GTK_CONTAINER( alignment ), combo );
}
#if 0
if ( draw_value == FALSE ) {
ui::Widget hbox2 = ui::HBox( FALSE, 0 );
- gtk_widget_show( hbox2 );
+ hbox2.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox2 ), FALSE, FALSE, 0 );
{
ui::Widget label = ui::Label( low );
- gtk_widget_show( label );
+ label.show();
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, FALSE, 0 );
}
{
ui::Widget label = ui::Label( high );
- gtk_widget_show( label );
+ label.show();
gtk_box_pack_end( GTK_BOX( hbox2 ), label, FALSE, FALSE, 0 );
}
}
// scale
ui::Widget alignment = ui::Alignment( 0.0, 0.5, 1.0, 0.0 );
- gtk_widget_show( alignment );
+ alignment.show();
ui::Widget scale = ui::HScale( adj );
gtk_scale_set_value_pos( GTK_SCALE( scale ), GTK_POS_LEFT );
- gtk_widget_show( scale );
+ scale.show();
gtk_container_add( GTK_CONTAINER( alignment ), scale );
gtk_scale_set_draw_value( GTK_SCALE( scale ), draw_value );
void Dialog::addRadio( ui::Widget vbox, const char* name, StringArrayRange names, const IntImportCallback& importViewer, const IntExportCallback& exportViewer ){
ui::Widget alignment = ui::Alignment( 0.0, 0.5, 0.0, 0.0 );
- gtk_widget_show( alignment );
+ alignment.show();;
{
RadioHBox radioBox = RadioHBox_new( names );
gtk_container_add( GTK_CONTAINER( alignment ), GTK_WIDGET( radioBox.m_hbox ) );
void Dialog::addRadioIcons( ui::Widget vbox, const char* name, StringArrayRange icons, const IntImportCallback& importViewer, const IntExportCallback& exportViewer ){
ui::Widget table = ui::Table( 2, icons.last - icons.first, FALSE );
- gtk_widget_show( table );
+ table.show();;
gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
for ( StringArrayRange::Iterator icon = icons.first; icon != icons.last; ++icon )
{
guint pos = static_cast<guint>( icon - icons.first );
- GtkImage* image = new_local_image( *icon );
- gtk_widget_show( GTK_WIDGET( image ) );
+ auto image = new_local_image( *icon );
+ image.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( image ), pos, pos + 1, 0, 1,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
radio = ui::Widget(gtk_radio_button_new( group ));
- gtk_widget_show( radio );
+ radio.show();
gtk_table_attach( GTK_TABLE( table ), radio, pos, pos + 1, 1, 2,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
BooleanAttribute( const char* key ) :
m_key( key ),
m_check( 0 ){
- GtkCheckButton* check = GTK_CHECK_BUTTON( gtk_check_button_new() );
- gtk_widget_show( GTK_WIDGET( check ) );
+ auto check = ui::CheckButton(GTK_CHECK_BUTTON( gtk_check_button_new() ));
+ check.show();
m_check = check;
m_entry( nullptr ),
m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_widget_set_size_request( GTK_WIDGET( entry ), 50, -1 );
m_entry = entry;
NonModalEntry m_nonModal;
RadioHBox m_radio;
NonModalRadio m_nonModalRadio;
-GtkHBox* m_hbox;
+ui::HBox m_hbox{nullptr};
public:
DirectionAttribute( const char* key ) :
m_key( key ),
m_nonModalRadio.connect( m_radio.m_radio );
m_hbox = ui::HBox( FALSE, 4 );
- gtk_widget_show( GTK_WIDGET( m_hbox ) );
+ m_hbox.show();
gtk_box_pack_start( GTK_BOX( m_hbox ), GTK_WIDGET( m_radio.m_hbox ), TRUE, TRUE, 0 );
gtk_box_pack_start( GTK_BOX( m_hbox ), GTK_WIDGET( m_entry ), TRUE, TRUE, 0 );
m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ),
m_hbox(ui::HBox( TRUE, 4 ))
{
- gtk_widget_show( GTK_WIDGET( m_hbox ) );
+ m_hbox.show();
{
auto entry = numeric_entry_new();
gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
CopiedString m_key;
Vector3Entry m_vector3;
NonModalEntry m_nonModal;
-GtkBox* m_hbox;
+ui::Box m_hbox{nullptr};
public:
Vector3Attribute( const char* key ) :
m_key( key ),
m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){
m_hbox = ui::HBox( TRUE, 4 );
- gtk_widget_show( GTK_WIDGET( m_hbox ) );
+ m_hbox.show();
{
auto entry = numeric_entry_new();
gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
gtk_combo_box_text_append_text( GTK_COMBO_BOX_TEXT( combo ), ( *i ).first.c_str() );
}
- gtk_widget_show( GTK_WIDGET( combo ) );
+ combo.show();
m_nonModal.connect( combo );
m_combo = combo;
for ( int i = 0; i < g_spawnflag_count; ++i )
{
ui::Widget widget = ui::Widget(GTK_WIDGET( g_entitySpawnflagsCheck[i] ));
- gtk_widget_show( widget );
+ widget.show();
StringOutputStream str( 16 );
str << LowerCase( eclass->flagnames[spawn_table[i]] );
ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){
ui::Widget vbox = ui::VBox( FALSE, 2 );
- gtk_widget_show( vbox );
+ vbox.show();
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 2 );
g_signal_connect( G_OBJECT( vbox ), "destroy", G_CALLBACK( EntityInspector_destroyWindow ), 0 );
{
ui::Widget split1 = ui::VPaned();
gtk_box_pack_start( GTK_BOX( vbox ), split1, TRUE, TRUE, 0 );
- gtk_widget_show( split1 );
+ split1.show();
g_entity_split1 = split1;
{
ui::Widget split2 = ui::VPaned();
gtk_paned_add1( GTK_PANED( split1 ), split2 );
- gtk_widget_show( split2 );
+ split2.show();
g_entity_split2 = split2;
{
// class list
ui::Widget scr = ui::ScrolledWindow();
- gtk_widget_show( scr );
+ scr.show();
gtk_paned_add1( GTK_PANED( split2 ), scr );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
{
ui::ListStore store = ui::ListStore(gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_POINTER ));
- GtkTreeView* view = ui::TreeView( ui::TreeModel( GTK_TREE_MODEL( store ) ));
+ auto 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 );
g_signal_connect( G_OBJECT( selection ), "changed", G_CALLBACK( EntityClassList_selection_changed ), 0 );
}
- gtk_widget_show( GTK_WIDGET( view ) );
+ view.show();
gtk_container_add( GTK_CONTAINER( scr ), GTK_WIDGET( view ) );
{
ui::Widget scr = ui::ScrolledWindow();
- gtk_widget_show( scr );
+ scr.show();
gtk_paned_add2( GTK_PANED( split2 ), scr );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
{
- GtkTextView* text = ui::TextView();
+ auto text = ui::TextView();
gtk_widget_set_size_request( GTK_WIDGET( text ), 0, -1 ); // allow shrinking
gtk_text_view_set_wrap_mode( text, GTK_WRAP_WORD );
gtk_text_view_set_editable( text, FALSE );
- gtk_widget_show( GTK_WIDGET( text ) );
+ text.show();
gtk_container_add( GTK_CONTAINER( scr ), GTK_WIDGET( text ) );
g_entityClassComment = text;
}
{
ui::Widget split2 = ui::VPaned();
gtk_paned_add2( GTK_PANED( split1 ), split2 );
- gtk_widget_show( split2 );
+ split2.show();
{
ui::Widget vbox2 = ui::VBox( FALSE, 2 );
- gtk_widget_show( vbox2 );
+ vbox2.show();
gtk_paned_pack1( GTK_PANED( split2 ), vbox2, FALSE, FALSE );
{
// Spawnflags (4 colums wide max, or window gets too wide.)
- GtkTable* table = ui::Table( 4, 4, FALSE );
+ auto table = ui::Table( 4, 4, FALSE );
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), FALSE, TRUE, 0 );
- gtk_widget_show( GTK_WIDGET( table ) );
+ table.show();
g_spawnflagsTable = table;
{
// key/value list
ui::Widget scr = ui::ScrolledWindow();
- gtk_widget_show( scr );
+ scr.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), scr, TRUE, TRUE, 0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
g_signal_connect( G_OBJECT( selection ), "changed", G_CALLBACK( EntityProperties_selection_changed ), 0 );
}
- gtk_widget_show( view );
+ view.show();
gtk_container_add( GTK_CONTAINER( scr ), view );
{
// key/value entry
- GtkTable* table = ui::Table( 2, 2, FALSE );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = ui::Table( 2, 2, FALSE );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), FALSE, TRUE, 0 );
gtk_table_set_row_spacings( table, 3 );
gtk_table_set_col_spacings( table, 5 );
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Value" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Value" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions)( GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Key" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Key" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions)( GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- GtkBox* hbox = ui::HBox( TRUE, 4 );
- gtk_widget_show( GTK_WIDGET( hbox ) );
+ auto hbox = ui::HBox( TRUE, 4 );
+ hbox.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
{
- GtkButton* button = ui::Button( "Clear All" );
- gtk_widget_show( GTK_WIDGET( button ) );
+ auto button = ui::Button( "Clear All" );
+ button.show();
g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( EntityInspector_clearAllKeyValues ), 0 );
gtk_box_pack_start( hbox, GTK_WIDGET( button ), TRUE, TRUE, 0 );
}
{
- GtkButton* button = ui::Button( "Delete Key" );
- gtk_widget_show( GTK_WIDGET( button ) );
+ auto button = ui::Button( "Delete Key" );
+ button.show();
g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( EntityInspector_clearKeyValue ), 0 );
gtk_box_pack_start( hbox, GTK_WIDGET( button ), TRUE, TRUE, 0 );
}
{
ui::Widget scr = ui::ScrolledWindow();
- gtk_widget_show( scr );
+ scr.show();
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC );
ui::Widget viewport = ui::Widget(gtk_viewport_new( 0, 0 ));
- gtk_widget_show( viewport );
+ viewport.show();
gtk_viewport_set_shadow_type( GTK_VIEWPORT( viewport ), GTK_SHADOW_NONE );
g_attributeBox = ui::VBox( FALSE, 2 );
- gtk_widget_show( GTK_WIDGET( g_attributeBox ) );
+ g_attributeBox.show();
gtk_container_add( GTK_CONTAINER( viewport ), GTK_WIDGET( g_attributeBox ) );
gtk_container_add( GTK_CONTAINER( scr ), viewport );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
- gtk_widget_show( view );
+ view.show();
gtk_container_add( GTK_CONTAINER( scr ), view );
getEntityList().m_tree_view = GTK_TREE_VIEW( view );
}
ui::Window window = MainFrame_getWindow().create_floating_window("Q3Map debug window" );
ui::Widget scr = ui::ScrolledWindow();
- gtk_widget_show( scr );
+ scr.show();
gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( scr ) );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
g_signal_connect( G_OBJECT( selection ), "changed", G_CALLBACK( feedback_selection_changed ), NULL );
}
- gtk_widget_show( view );
+ view.show();
gtk_container_add( GTK_CONTAINER( scr ), view );
ui::Window dlg = ui::Window(create_floating_window( "Find / Replace Texture(s)", m_parent ));
hbox = ui::HBox( FALSE, 5 );
- gtk_widget_show( hbox );
+ hbox.show();
gtk_container_add( GTK_CONTAINER( dlg ), GTK_WIDGET( hbox ) );
gtk_container_set_border_width( GTK_CONTAINER( hbox ), 5 );
vbox = ui::VBox( FALSE, 5 );
- gtk_widget_show( vbox );
+ vbox.show();
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
table = ui::Table( 2, 2, FALSE );
- gtk_widget_show( table );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
label = ui::Label( "Find:" );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
label = ui::Label( "Replace:" );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
entry = ui::Entry();
- gtk_widget_show( entry );
+ entry.show();
gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
GlobalTextureEntryCompletion::instance().connect( GTK_ENTRY( entry ) );
entry = ui::Entry();
- gtk_widget_show( entry );
+ entry.show();
gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
GlobalTextureEntryCompletion::instance().connect( GTK_ENTRY( entry ) );
check = ui::CheckButton( "Within selected brushes only" );
- gtk_widget_show( check );
+ check.show();
gtk_box_pack_start( GTK_BOX( vbox ), check, TRUE, TRUE, 0 );
AddDialogData( *GTK_TOGGLE_BUTTON( check ), m_bSelectedOnly );
vbox = ui::VBox( FALSE, 5 );
- gtk_widget_show( vbox );
+ vbox.show();
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
button = ui::Button( "Apply" );
- gtk_widget_show( button );
+ button.show();
gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked",
G_CALLBACK( OnApply ), 0 );
gtk_widget_set_size_request( button, 60, -1 );
button = ui::Button( "Close" );
- gtk_widget_show( button );
+ button.show();
gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked",
G_CALLBACK( OnClose ), 0 );
void Show(){
// workaround for strange gtk behaviour - modifying the contents of a window while it is not visible causes the window position to change without sending a configure_event
m_position_tracker.sync( m_window );
- gtk_widget_show( GTK_WIDGET( m_window ) );
+ m_window.show();
}
void Hide(){
gtk_widget_hide( GTK_WIDGET( m_window ) );
{
ui::Widget notebook = ui::Widget(gtk_notebook_new());
- gtk_widget_show( notebook );
+ notebook.show();
gtk_container_add( GTK_CONTAINER( window ), notebook );
gtk_notebook_set_tab_pos( GTK_NOTEBOOK( notebook ), GTK_POS_BOTTOM );
m_pNotebook = notebook;
ui::Widget GroupDialog_addPage( const char* tabLabel, ui::Widget widget, const StringExportCallback& title ){
ui::Widget w = ui::Label( tabLabel );
- gtk_widget_show( w );
+ w.show();
ui::Widget page = ui::Widget(gtk_notebook_get_nth_page( GTK_NOTEBOOK( g_GroupDlg.m_pNotebook ), gtk_notebook_insert_page( GTK_NOTEBOOK( g_GroupDlg.m_pNotebook ), widget, w, -1 ) ));
g_pages.push_back( title );
}
else
{
- gtk_widget_show( GTK_WIDGET( g_GroupDlg.m_window ) );
+ g_GroupDlg.m_window.show();
GroupDialog_setPage( page );
}
}
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( table2 ) );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Select mod" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Select mod" );
+ label.show();
gtk_table_attach( table2, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
gtk_combo_box_text_append_text( dialog.game_combo.game_select, globalGameComboConfiguration().custom );
- gtk_widget_show( GTK_WIDGET( dialog.game_combo.game_select ) );
+ dialog.game_combo.game_select.show();
gtk_table_attach( table2, GTK_WIDGET( dialog.game_combo.game_select ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "fs_game" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "fs_game" );
+ label.show();
gtk_table_attach( table2, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table2, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
if ( globalMappingMode().do_mapping_mode ) {
- GtkLabel* label = GTK_LABEL( ui::Label( "Mapping mode" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Mapping mode" );
+ label.show();
gtk_table_attach( table2, GTK_WIDGET( label ), 0, 1, 3, 4,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_combo_box_text_append_text( combo, globalMappingMode().sp_mapping_mode );
gtk_combo_box_text_append_text( combo, globalMappingMode().mp_mapping_mode );
- gtk_widget_show( GTK_WIDGET( combo ) );
+ combo.show();
gtk_table_attach( table2, GTK_WIDGET( combo ), 1, 2, 3, 4,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
GtkHBox* hbox = create_dialog_hbox( 4, 4 );
gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( hbox ) );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Sides:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Sides:" );
+ label.show();
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), FALSE, FALSE, 0 );
sides_entry = entry;
gtk_widget_grab_focus( GTK_WIDGET( entry ) );
GtkFrame* frame = create_dialog_frame( 0, GTK_SHADOW_IN );
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
{
- GtkImage* image = new_local_image( "logo.png" );
- gtk_widget_show( GTK_WIDGET( image ) );
+ auto image = new_local_image( "logo.png" );
+ image.show();
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( image ) );
}
}
"you may report your problems at\n"
"https://gitlab.com/xonotic/netradiant/issues";
- GtkLabel* label = GTK_LABEL( ui::Label( label_text ) );
+ auto label = ui::Label( label_text );
- gtk_widget_show( GTK_WIDGET( label ) );
+ label.show();
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
GtkTable* table = create_dialog_table( 3, 2, 4, 4, 4 );
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( table ) );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Vendor:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Vendor:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Version:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Version:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Renderer:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Renderer:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( reinterpret_cast<const char*>( glGetString( GL_VENDOR ) ) ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( reinterpret_cast<const char*>( glGetString( GL_VENDOR ) ) );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( reinterpret_cast<const char*>( glGetString( GL_VERSION ) ) ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( reinterpret_cast<const char*>( glGetString( GL_VERSION ) ) );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( reinterpret_cast<const char*>( glGetString( GL_RENDERER ) ) ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( reinterpret_cast<const char*>( glGetString( GL_RENDERER ) ) );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 1, 2, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
GtkTextBuffer* buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( text_extensions ) );
gtk_text_buffer_set_text( buffer, reinterpret_cast<const char*>( glGetString( GL_EXTENSIONS ) ), -1 );
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( text_extensions ), GTK_WRAP_WORD );
- gtk_widget_show( text_extensions );
+ text_extensions.show();
}
}
}
GtkVBox* vbox = create_dialog_vbox( 4 );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Texture will be fit across the patch based\n"
+ auto label = ui::Label( "Texture will be fit across the patch based\n"
"on the x and y values given. Values of 1x1\n"
"will \"fit\" the texture. 2x2 will repeat\n"
- "it twice, etc." ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ "it twice, etc." );
+ label.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), TRUE, TRUE, 0 );
gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
}
{
- GtkTable* table = create_dialog_table( 2, 2, 4, 4 );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = create_dialog_table( 2, 2, 4, 4 );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Texture x:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Texture x:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Texture y:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Texture y:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_window_set_default_size( GTK_WINDOW( dlg ), 600, 300 );
vbox = ui::VBox( FALSE, 5 );
- gtk_widget_show( vbox );
+ vbox.show();
gtk_container_add( GTK_CONTAINER( dlg ), GTK_WIDGET( vbox ) );
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
scr = ui::ScrolledWindow();
- gtk_widget_show( scr );
+ scr.show();
gtk_box_pack_start( GTK_BOX( vbox ), scr, TRUE, TRUE, 0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
text = ui::TextView();
gtk_container_add( GTK_CONTAINER( scr ), text );
- gtk_widget_show( text );
+ text.show();
g_object_set_data( G_OBJECT( dlg ), "text", (gpointer) text );
gtk_text_view_set_editable( GTK_TEXT_VIEW( text ), TRUE );
hbox = ui::HBox( FALSE, 5 );
- gtk_widget_show( hbox );
+ hbox.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
button = ui::Button( "Close" );
- gtk_widget_show( button );
+ button.show();
gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked",
G_CALLBACK( editor_close ), dlg );
gtk_widget_set_size_request( button, 60, -1 );
button = ui::Button( "Save" );
- gtk_widget_show( button );
+ button.show();
gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked",
G_CALLBACK( editor_save ), dlg );
g_object_set_data( G_OBJECT( text_editor ), "filename", strdup( filename ) );
// trying to show later
- gtk_widget_show( text_editor );
+ text_editor.show();
#ifdef WIN32
process_gui();
GtkVBox* vbox = create_dialog_vbox( 4 );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "ESC for default, ENTER to validate" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "ESC for default, ENTER to validate" );
+ label.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
gtk_widget_grab_focus( GTK_WIDGET( entry ) );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
{
//GtkLabel* label = GTK_LABEL(gtk_label_new("Enter one ore more tags separated by spaces"));
- GtkLabel* label = GTK_LABEL( ui::Label( "ESC to cancel, ENTER to validate" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "ESC to cancel, ENTER to validate" );
+ label.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
gtk_widget_grab_focus( GTK_WIDGET( entry ) );
GtkVBox* vbox = create_dialog_vbox( 4 );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "The selected shader" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "The selected shader" );
+ label.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( name ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( name );
+ label.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "is located in file" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "is located in file" );
+ label.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( filename ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( filename );
+ label.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
{
public:
ui::Window m_window;
-GtkLabel* m_label;
+ui::Label m_label{(GtkLabel *) nullptr};
};
WaitDialog create_wait_dialog( const char* title, const char* text ){
g_signal_connect( G_OBJECT( dialog.m_window ), "realize", G_CALLBACK( window_realize_remove_decoration ), 0 );
{
- dialog.m_label = GTK_LABEL( ui::Label( text ) );
+ dialog.m_label = ui::Label( text );
gtk_misc_set_alignment( GTK_MISC( dialog.m_label ), 0.0, 0.5 );
gtk_label_set_justify( dialog.m_label, GTK_JUSTIFY_LEFT );
- gtk_widget_show( GTK_WIDGET( dialog.m_label ) );
+ dialog.m_label.show();
gtk_widget_set_size_request( GTK_WIDGET( dialog.m_label ), 200, -1 );
gtk_container_add( GTK_CONTAINER( dialog.m_window ), GTK_WIDGET( dialog.m_label ) );
gtk_grab_add( GTK_WIDGET( g_wait.m_window ) );
if ( isActiveApp ) {
- gtk_widget_show( GTK_WIDGET( g_wait.m_window ) );
+ g_wait.m_window.show();
ScreenUpdates_process();
}
}
}
GtkMenuBar* create_main_menu( MainFrame::EViewStyle style ){
- GtkMenuBar* menu_bar = GTK_MENU_BAR( gtk_menu_bar_new() );
- gtk_widget_show( GTK_WIDGET( menu_bar ) );
-
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_file_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_edit_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_view_menu( style ) ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_selection_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_bsp_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_grid_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_misc_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_entity_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_brush_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_patch_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_plugins_menu() ) );
- gtk_container_add( GTK_CONTAINER( menu_bar ), GTK_WIDGET( create_help_menu() ) );
+ auto menu_bar = ui::MenuBar(GTK_MENU_BAR( gtk_menu_bar_new() ));
+ menu_bar.show();
+
+ gtk_container_add( menu_bar, GTK_WIDGET( create_file_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_edit_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_view_menu( style ) ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_selection_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_bsp_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_grid_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_misc_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_entity_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_brush_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_patch_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_plugins_menu() ) );
+ gtk_container_add( menu_bar, GTK_WIDGET( create_help_menu() ) );
return menu_bar;
}
gtk_orientable_set_orientation( GTK_ORIENTABLE(toolbar), GTK_ORIENTATION_HORIZONTAL );
gtk_toolbar_set_style( toolbar, GTK_TOOLBAR_ICONS );
- gtk_widget_show( GTK_WIDGET( toolbar ) );
+ toolbar.show();
auto space = [&]() {
- auto btn = gtk_separator_tool_item_new();
- gtk_widget_show(GTK_WIDGET(btn));
- gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(btn));
+ auto btn = ui::Widget(GTK_WIDGET(gtk_separator_tool_item_new()));
+ btn.show();
+ gtk_container_add(toolbar, btn);
};
File_constructToolbar( toolbar );
}
ui::Widget create_main_statusbar( ui::Widget pStatusLabel[c_count_status] ){
- GtkTable* table = ui::Table( 1, c_count_status, FALSE );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = ui::Table( 1, c_count_status, FALSE );
+ table.show();
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Label" ) );
+ auto label = ui::Label( "Label" );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
gtk_misc_set_padding( GTK_MISC( label ), 4, 2 );
- gtk_widget_show( GTK_WIDGET( label ) );
+ label.show();
gtk_table_attach_defaults( table, GTK_WIDGET( label ), 0, 1, 0, 1 );
pStatusLabel[c_command_status] = ui::Widget(GTK_WIDGET( label ));
}
for ( int i = 1; i < c_count_status; ++i )
{
- GtkFrame* frame = ui::Frame();
- gtk_widget_show( GTK_WIDGET( frame ) );
+ auto frame = ui::Frame();
+ frame.show();
gtk_table_attach_defaults( table, GTK_WIDGET( frame ), i, i + 1, 0, 1 );
gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN );
- GtkLabel* label = GTK_LABEL( ui::Label( "Label" ) );
+ auto label = ui::Label( "Label" );
gtk_label_set_ellipsize( label, PANGO_ELLIPSIZE_END );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
gtk_misc_set_padding( GTK_MISC( label ), 4, 2 );
- gtk_widget_show( GTK_WIDGET( label ) );
+ label.show();
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( label ) );
pStatusLabel[i] = ui::Widget(GTK_WIDGET( label ));
}
{
static gboolean notify( ui::Window window, gpointer dummy, MainWindowActive* self ){
if ( g_wait.m_window && gtk_window_is_active( window ) && !gtk_widget_get_visible( g_wait.m_window ) ) {
- gtk_widget_show( GTK_WIDGET( g_wait.m_window ) );
+ g_wait.m_window.show();
}
return FALSE;
gtk_window_set_position( window, GTK_WIN_POS_CENTER );
gtk_container_set_border_width( GTK_CONTAINER( window ), 0 );
- GtkImage* image = new_local_image( "splash.png" );
- gtk_widget_show( GTK_WIDGET( image ) );
+ auto image = new_local_image( "splash.png" );
+ image.show();
gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( image ) );
gtk_widget_set_size_request( GTK_WIDGET( window ), -1, -1 );
- gtk_widget_show( GTK_WIDGET( window ) );
+ window.show();
return window;
}
ui::Widget vbox = ui::VBox( FALSE, 0 );
gtk_container_add( GTK_CONTAINER( window ), vbox );
- gtk_widget_show( vbox );
+ vbox.show();
global_accel_connect_window( window );
m_window = window;
- gtk_widget_show( GTK_WIDGET( window ) );
+ window.show();
if ( CurrentStyle() == eRegular || CurrentStyle() == eRegularLeft ) {
{
ui::Widget vsplit = ui::VPaned();
m_vSplit = vsplit;
gtk_box_pack_start( GTK_BOX( vbox ), vsplit, TRUE, TRUE, 0 );
- gtk_widget_show( vsplit );
+ vsplit.show();
// console
ui::Widget console_window = Console_constructWindow( window );
{
ui::Widget hsplit = ui::HPaned();
- gtk_widget_show( hsplit );
+ hsplit.show();
m_hSplit = hsplit;
gtk_paned_add1( GTK_PANED( vsplit ), hsplit );
{
ui::Widget vsplit2 = ui::VPaned();
- gtk_widget_show( vsplit2 );
+ vsplit2.show();
m_vSplit2 = vsplit2;
if ( CurrentStyle() == eRegular ) {
global_accel_connect_window( window );
g_posCamWnd.connect( window );
- gtk_widget_show( GTK_WIDGET( window ) );
+ window.show();
m_pCamWnd = NewCamWnd();
GlobalCamera_setCamWnd( *m_pCamWnd );
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( 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 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
MRU_SetText( 0, str );
gtk_widget_set_sensitive( GTK_WIDGET( MRU_items[0] ), TRUE );
- gtk_widget_show( GTK_WIDGET( MRU_items[MRU_used - 1] ) );
+ ui::Widget(GTK_WIDGET( MRU_items[MRU_used - 1] )).show();
}
void MRU_Init(){
if ( pos < MRU_used ) {
MRU_updateWidget( pos, MRU_GetText( pos ) );
gtk_widget_set_sensitive( GTK_WIDGET( MRU_items[0] ), TRUE );
- gtk_widget_show( GTK_WIDGET( MRU_items[pos] ) );
+ ui::Widget(GTK_WIDGET( MRU_items[pos] )).show();
}
}
}
{
- GtkVBox* vbox = ui::VBox( FALSE, 5 );
+ auto vbox = ui::VBox( FALSE, 5 );
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
- gtk_widget_show( GTK_WIDGET( vbox ) );
+ vbox.show();
gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( vbox ) );
{
- GtkHBox* hbox = ui::HBox( FALSE, 5 );
- gtk_widget_show( GTK_WIDGET( hbox ) );
+ auto hbox = ui::HBox( FALSE, 5 );
+ hbox.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), TRUE, TRUE, 0 );
{
- GtkVBox* vbox2 = ui::VBox( FALSE, 0 );
+ auto vbox2 = ui::VBox( FALSE, 0 );
gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 0 );
- gtk_widget_show( GTK_WIDGET( vbox2 ) );
+ vbox2.show();
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox2 ), TRUE, TRUE, 0 );
{
- GtkFrame* frame = ui::Frame( "Details" );
- gtk_widget_show( GTK_WIDGET( frame ) );
+ auto frame = ui::Frame( "Details" );
+ frame.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
{
- GtkVBox* vbox3 = ui::VBox( FALSE, 5 );
+ auto vbox3 = ui::VBox( FALSE, 5 );
gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 5 );
- gtk_widget_show( GTK_WIDGET( vbox3 ) );
+ vbox3.show();
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) );
{
- GtkTable* table = ui::Table( 2, 2, FALSE );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = ui::Table( 2, 2, FALSE );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Row:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Row:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Column:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Column:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 1, 2, 0, 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
g_signal_connect( G_OBJECT( combo ), "changed", G_CALLBACK( OnSelchangeComboColRow ), this );
AddDialogData( *GTK_COMBO_BOX(combo), m_nRow );
- gtk_widget_show( GTK_WIDGET( combo ) );
+ combo.show();
gtk_table_attach( table, GTK_WIDGET( combo ), 0, 1, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
g_signal_connect( G_OBJECT( combo ), "changed", G_CALLBACK( OnSelchangeComboColRow ), this );
AddDialogData( *GTK_COMBO_BOX(combo), m_nCol );
- gtk_widget_show( GTK_WIDGET( combo ) );
+ combo.show();
gtk_table_attach( table, GTK_WIDGET( combo ), 1, 2, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
m_pColCombo = combo;
}
}
- GtkTable* table = ui::Table( 5, 2, FALSE );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = ui::Table( 5, 2, FALSE );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "X:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "X:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Y:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Y:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Z:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Z:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 2, 3,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "S:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "S:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 3, 4,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "T:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "T:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 4, 5,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(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 );
- AddDialogData( *entry, m_fX );
+ AddDialogData( *GTK_ENTRY(entry), m_fX );
g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 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, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
- AddDialogData( *entry, m_fY );
+ AddDialogData( *GTK_ENTRY(entry), m_fY );
g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 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, 2, 3,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
- AddDialogData( *entry, m_fZ );
+ AddDialogData( *GTK_ENTRY(entry), m_fZ );
g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 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, 3, 4,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
- AddDialogData( *entry, m_fS );
+ AddDialogData( *GTK_ENTRY(entry), m_fS );
g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 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, 4, 5,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
- AddDialogData( *entry, m_fT );
+ AddDialogData( *GTK_ENTRY(entry), m_fT );
g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
}
}
}
if ( g_pGameDescription->mGameType == "doom3" ) {
- GtkFrame* frame = ui::Frame( "Tesselation" );
- gtk_widget_show( GTK_WIDGET( frame ) );
+ auto frame = ui::Frame( "Tesselation" );
+ frame.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
{
- GtkVBox* vbox3 = ui::VBox( FALSE, 5 );
+ auto vbox3 = ui::VBox( FALSE, 5 );
gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 5 );
- gtk_widget_show( GTK_WIDGET( vbox3 ) );
+ vbox3.show();
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) );
{
- GtkTable* table = ui::Table( 3, 2, FALSE );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = ui::Table( 3, 2, FALSE );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Fixed" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Fixed" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
auto check = ui::CheckButton(GTK_CHECK_BUTTON( gtk_check_button_new() ));
- gtk_widget_show( GTK_WIDGET( check ) );
+ check.show();
gtk_table_attach( table, GTK_WIDGET( check ), 1, 2, 0, 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
g_object_set_data( G_OBJECT( check ), "handler", gint_to_pointer( handler_id ) );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Horizontal" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Horizontal" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
m_horizontalSubdivisionsEntry.connect( entry );
}
{
- auto label = GTK_LABEL( ui::Label( "Vertical" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Vertical" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 2, 3,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 2, 3,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
}
{
- GtkFrame* frame = ui::Frame( "Texturing" );
- gtk_widget_show( GTK_WIDGET( frame ) );
+ auto frame = ui::Frame( "Texturing" );
+ frame.show();
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
{
- GtkVBox* vbox2 = ui::VBox( FALSE, 5 );
- gtk_widget_show( GTK_WIDGET( vbox2 ) );
+ auto vbox2 = ui::VBox( FALSE, 5 );
+ vbox2.show();
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox2 ) );
gtk_container_set_border_width( GTK_CONTAINER( vbox2 ), 5 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Name:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Name:" );
+ label.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( label ), TRUE, TRUE, 0 );
gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkEntry* entry = ui::Entry();
+ auto entry = ui::Entry();
// gtk_editable_set_editable (GTK_ENTRY (entry), false);
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
- AddDialogData( *entry, m_strName );
+ AddDialogData( *GTK_ENTRY(entry), m_strName );
g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
}
{
- GtkTable* table = ui::Table( 5, 4, FALSE );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = ui::Table( 5, 4, FALSE );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Horizontal Shift Step" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Horizontal Shift Step" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 2, 4, 0, 1,
(GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
(GtkAttachOptions)( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Vertical Shift Step" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Vertical Shift Step" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 2, 4, 1, 2,
(GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
(GtkAttachOptions)( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Horizontal Stretch Step" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Horizontal Stretch Step" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 2, 3, 2, 3,
(GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
(GtkAttachOptions)( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkButton* button = ui::Button( "Flip" );
- gtk_widget_show( GTK_WIDGET( button ) );
+ auto button = ui::Button( "Flip" );
+ button.show();
gtk_table_attach( table, GTK_WIDGET( button ), 3, 4, 2, 3,
(GtkAttachOptions)( GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Vertical Stretch Step" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Vertical Stretch Step" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 2, 3, 3, 4,
(GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
(GtkAttachOptions)( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkButton* button = ui::Button( "Flip" );
- gtk_widget_show( GTK_WIDGET( button ) );
+ auto button = ui::Button( "Flip" );
+ button.show();
gtk_table_attach( table, GTK_WIDGET( button ), 3, 4, 3, 4,
(GtkAttachOptions)( GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Rotate Step" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Rotate Step" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 2, 4, 4, 5,
(GtkAttachOptions)( GTK_FILL|GTK_EXPAND ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 0, 1,
(GtkAttachOptions)( GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
g_object_set_data( G_OBJECT( window ), "hshift_adj", (gpointer) adj );
auto spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ spin.show();
gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 0, 1,
(GtkAttachOptions)( 0 ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 1, 2,
(GtkAttachOptions)( GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
g_object_set_data( G_OBJECT( window ), "vshift_adj", (gpointer) adj );
auto spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ spin.show();
gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 1, 2,
(GtkAttachOptions)( 0 ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 2, 3,
(GtkAttachOptions)( GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
g_object_set_data( G_OBJECT( window ), "hscale_adj", (gpointer) adj );
auto spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ spin.show();
gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 2, 3,
(GtkAttachOptions)( 0 ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 3, 4,
(GtkAttachOptions)( GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
g_object_set_data( G_OBJECT( window ), "vscale_adj", (gpointer) adj );
auto spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ spin.show();
gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 3, 4,
(GtkAttachOptions)( 0 ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 4, 5,
(GtkAttachOptions)( GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
g_object_set_data( G_OBJECT( window ), "rotate_adj", (gpointer) adj );
auto spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ spin.show();
gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 4, 5,
(GtkAttachOptions)( 0 ),
(GtkAttachOptions)( 0 ), 0, 0 );
gtk_widget_set_can_focus( spin, false );
}
}
- GtkHBox* hbox2 = ui::HBox( TRUE, 5 );
- gtk_widget_show( GTK_WIDGET( hbox2 ) );
+ auto hbox2 = ui::HBox( TRUE, 5 );
+ hbox2.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox2 ), TRUE, FALSE, 0 );
{
- GtkButton* button = ui::Button( "Auto Cap" );
- gtk_widget_show( GTK_WIDGET( button ) );
+ auto button = ui::Button( "Auto Cap" );
+ button.show();
gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchAutoCap ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
- GtkButton* button = ui::Button( "CAP" );
- gtk_widget_show( GTK_WIDGET( button ) );
+ auto button = ui::Button( "CAP" );
+ button.show();
gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchdetails ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
- GtkButton* button = ui::Button( "Set..." );
- gtk_widget_show( GTK_WIDGET( button ) );
+ auto button = ui::Button( "Set..." );
+ button.show();
gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchreset ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
- GtkButton* button = ui::Button( "Natural" );
- gtk_widget_show( GTK_WIDGET( button ) );
+ auto button = ui::Button( "Natural" );
+ button.show();
gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchnatural ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
}
{
- GtkButton* button = ui::Button( "Fit" );
- gtk_widget_show( GTK_WIDGET( button ) );
+ auto button = ui::Button( "Fit" );
+ button.show();
gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchfit ), 0 );
gtk_widget_set_size_request( GTK_WIDGET( button ), 60, -1 );
GtkTable* table = create_dialog_table( 2, 2, 4, 4 );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Width:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Width:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( ui::Label( "Height:" ) );
- gtk_widget_show( GTK_WIDGET( label ) );
+ auto label = ui::Label( "Height:" );
+ label.show();
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
D_ITEM( 29 );
D_ITEM( 31 ); // MAX_PATCH_SIZE is 32, so we should be able to do 31...
#undef D_ITEM
- gtk_widget_show( GTK_WIDGET( combo ) );
+ combo.show();
gtk_table_attach( table, GTK_WIDGET( combo ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
D_ITEM( 29 );
D_ITEM( 31 ); // MAX_PATCH_SIZE is 32, so we should be able to do 31...
#undef D_ITEM
- gtk_widget_show( GTK_WIDGET( combo ) );
+ combo.show();
gtk_table_attach( table, GTK_WIDGET( combo ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_container_add( GTK_CONTAINER( hbox ), GTK_WIDGET( radio_vbox ) );
{
- GtkTable* table = ui::Table( 5, 2, FALSE );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = ui::Table( 5, 2, FALSE );
+ table.show();
gtk_box_pack_start( GTK_BOX( radio_vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 5 );
gtk_table_set_col_spacings( table, 5 );
{
- GtkImage* image = new_local_image( "cap_bevel.png" );
- gtk_widget_show( GTK_WIDGET( image ) );
+ auto image = new_local_image( "cap_bevel.png" );
+ image.show();
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkImage* image = new_local_image( "cap_endcap.png" );
- gtk_widget_show( GTK_WIDGET( image ) );
+ auto image = new_local_image( "cap_endcap.png" );
+ image.show();
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkImage* image = new_local_image( "cap_ibevel.png" );
- gtk_widget_show( GTK_WIDGET( image ) );
+ auto image = new_local_image( "cap_ibevel.png" );
+ image.show();
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkImage* image = new_local_image( "cap_iendcap.png" );
- gtk_widget_show( GTK_WIDGET( image ) );
+ auto image = new_local_image( "cap_iendcap.png" );
+ image.show();
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 3, 4,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- GtkImage* image = new_local_image( "cap_cylinder.png" );
- gtk_widget_show( GTK_WIDGET( image ) );
+ auto image = new_local_image( "cap_cylinder.png" );
+ image.show();
gtk_table_attach( table, GTK_WIDGET( image ), 0, 1, 4, 5,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
GSList* group = 0;
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Bevel" ));
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( table, button, 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Endcap" ));
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( table, button, 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Inverted Bevel" ));
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( table, button, 1, 2, 2, 3,
(GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Inverted Endcap" ));
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( table, button, 1, 2, 3, 4,
(GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Widget(gtk_radio_button_new_with_label( group, "Cylinder" ));
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( table, button, 1, 2, 4, 5,
(GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ),
(GtkAttachOptions) ( 0 ), 0, 0 );
std::stack<ui::Menu> menuStack;
parent = ui::MenuItem( pPlugIn->getMenuName() );
- gtk_widget_show( parent );
+ parent.show();
gtk_container_add( GTK_CONTAINER( plugin_menu ), parent );
std::size_t nCount = pPlugIn->getCommandCount();
}
item = ui::MenuItem( menuText );
- gtk_widget_show( item );
+ item.show();
gtk_container_add( GTK_CONTAINER( menu ), item );
subMenu = ui::Menu();
g_object_set_data( G_OBJECT( item ),"command", const_cast<gpointer>( static_cast<const void*>( menuCommand ) ) );
g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( plugin_activated ), gint_to_pointer( m_nNextPlugInID ) );
}
- gtk_widget_show( item );
+ item.show();
gtk_container_add( GTK_CONTAINER( menu ), item );
pPlugIn->addMenuID( m_nNextPlugInID++ );
}
void toolbar_insert( GtkToolbar *toolbar, const char* icon, const char* text, const char* tooltip, IToolbarButton::EType type, GCallback handler, gpointer data ){
if (type == IToolbarButton::eSpace) {
- auto it = gtk_separator_tool_item_new();
- gtk_widget_show(GTK_WIDGET(it));
+ auto it = ui::Widget(GTK_WIDGET(gtk_separator_tool_item_new()));
+ it.show();
gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(it));
return;
}
ui::Widget PreferencePages_addPage( ui::Widget notebook, const char* name ){
ui::Widget preflabel = ui::Label( name );
- gtk_widget_show( preflabel );
+ preflabel.show();
ui::Widget pageframe = ui::Frame( name );
gtk_container_set_border_width( GTK_CONTAINER( pageframe ), 4 );
- gtk_widget_show( pageframe );
+ pageframe.show();
ui::Widget vbox = ui::VBox( FALSE, 4 );
- gtk_widget_show( vbox );
+ vbox.show();
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 4 );
gtk_container_add( GTK_CONTAINER( pageframe ), vbox );
ui::Widget mainvbox = ui::VBox( FALSE, 5 );
gtk_container_add( GTK_CONTAINER( dialog ), mainvbox );
gtk_container_set_border_width( GTK_CONTAINER( mainvbox ), 5 );
- gtk_widget_show( mainvbox );
+ mainvbox.show();
{
ui::Widget hbox = ui::HBox( FALSE, 5 );
- gtk_widget_show( hbox );
+ hbox.show();
gtk_box_pack_end( GTK_BOX( mainvbox ), hbox, FALSE, TRUE, 0 );
{
{
ui::Widget hbox = ui::HBox( FALSE, 5 );
gtk_box_pack_start( GTK_BOX( mainvbox ), hbox, TRUE, TRUE, 0 );
- gtk_widget_show( hbox );
+ hbox.show();
{
ui::Widget sc_win = ui::ScrolledWindow();
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( sc_win ), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC );
gtk_box_pack_start( GTK_BOX( hbox ), sc_win, FALSE, FALSE, 0 );
- gtk_widget_show( sc_win );
+ sc_win.show();
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( sc_win ), GTK_SHADOW_IN );
// prefs pages notebook
// hide the notebook tabs since its not supposed to look like a notebook
gtk_notebook_set_show_tabs( GTK_NOTEBOOK( m_notebook ), FALSE );
gtk_box_pack_start( GTK_BOX( hbox ), m_notebook, TRUE, TRUE, 0 );
- gtk_widget_show( m_notebook );
+ m_notebook.show();
{
g_signal_connect( G_OBJECT( selection ), "changed", G_CALLBACK( treeSelection ), this );
}
- gtk_widget_show( view );
+ view.show();
gtk_container_add( GTK_CONTAINER( sc_win ), view );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
{
ui::Widget label = ui::Label( " X " );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( table, label, 0, 1, 0, 1,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( " Y " );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( table, label, 0, 1, 1, 2,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( " Z " );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( table, label, 0, 1, 2, 3,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
auto adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 );
- GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ auto spin = ui::SpinButton( adj, 1, 0 );
+ spin.show();
gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
auto adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 );
- GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ auto spin = ui::SpinButton( adj, 1, 0 );
+ spin.show();
gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
auto adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 );
- GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ auto spin = ui::SpinButton( adj, 1, 0 );
+ spin.show();
gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 2, 3,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
}
- gtk_widget_show( GTK_WIDGET( g_rotate_dialog.window ) );
+ g_rotate_dialog.window.show();
}
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
{
ui::Widget label = ui::Label( " X " );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( table, label, 0, 1, 0, 1,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( " Y " );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( table, label, 0, 1, 1, 2,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( " Z " );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( table, label, 0, 1, 2, 3,
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
{
ui::Widget entry = ui::Entry();
gtk_entry_set_text( GTK_ENTRY( entry ), "1.0" );
- gtk_widget_show( entry );
+ entry.show();
gtk_table_attach( table, entry, 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
{
ui::Widget entry = ui::Entry();
gtk_entry_set_text( GTK_ENTRY( entry ), "1.0" );
- gtk_widget_show( entry );
+ entry.show();
gtk_table_attach( table, entry, 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
{
ui::Widget entry = ui::Entry();
gtk_entry_set_text( GTK_ENTRY( entry ), "1.0" );
- gtk_widget_show( entry );
+ entry.show();
gtk_table_attach( table, entry, 1, 2, 2, 3,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
}
- gtk_widget_show( GTK_WIDGET( g_scale_dialog.window ) );
+ g_scale_dialog.window.show();
}
{
// replaced by only the vbox:
ui::Widget vbox = ui::VBox( FALSE, 5 );
- gtk_widget_show( vbox );
+ vbox.show();
gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( vbox ) );
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
{
ui::Widget hbox2 = ui::HBox( FALSE, 5 );
- gtk_widget_show( hbox2 );
+ hbox2.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox2 ), FALSE, FALSE, 0 );
{
ui::Widget label = ui::Label( "Texture" );
- gtk_widget_show( label );
+ label.show();
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_box_pack_start( GTK_BOX( hbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
m_texture = entry;
m_textureEntry.connect( entry );
{
ui::Widget table = ui::Table( 6, 4, FALSE );
- gtk_widget_show( table );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), FALSE, FALSE, 0 );
gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
}
{
ui::Widget label = ui::Label( "Vertical shift" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
auto spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 );
m_vshiftIncrement.m_spin = spin;
m_vshiftSpinner.connect( spin );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ spin.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Step" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Horizontal stretch" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
auto spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 5 );
m_hscaleIncrement.m_spin = spin;
m_hscaleSpinner.connect( spin );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ spin.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Step" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 2, 3 );
}
{
ui::Widget label = ui::Label( "Vertical stretch" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 3, 4,
(GtkAttachOptions) ( GTK_FILL ),
auto spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 5 );
m_vscaleIncrement.m_spin = spin;
m_vscaleSpinner.connect( spin );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ spin.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 3, 4,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Step" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 3, 4,
(GtkAttachOptions) ( GTK_FILL ),
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 3, 4,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Rotate" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 4, 5,
(GtkAttachOptions) ( GTK_FILL ),
auto spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 );
m_rotateIncrement.m_spin = spin;
m_rotateSpinner.connect( spin );
- gtk_widget_show( GTK_WIDGET( spin ) );
+ spin.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 4, 5,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Step" );
- gtk_widget_show( label );
+ label.show();
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0 );
gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 4, 5,
(GtkAttachOptions) ( GTK_FILL ),
}
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 4, 5,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
{
// match grid button
ui::Widget button = ui::Button( "Match Grid" );
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( GTK_TABLE( table ), button, 2, 4, 5, 6,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
{
ui::Widget frame = ui::Frame( "Texturing" );
- gtk_widget_show( frame );
+ frame.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
{
ui::Widget table = ui::Table( 4, 4, FALSE );
- gtk_widget_show( table );
+ table.show();
gtk_container_add( GTK_CONTAINER( frame ), table );
gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
gtk_container_set_border_width( GTK_CONTAINER( table ), 5 );
{
ui::Widget label = ui::Label( "Brush" );
- 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( "Patch" );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Width" );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget label = ui::Label( "Height" );
- gtk_widget_show( label );
+ label.show();
gtk_table_attach( GTK_TABLE( table ), label, 3, 4, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Button( "Axial" );
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Button( "Fit" );
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Button( "CAP" );
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 3, 4,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Button( "Set..." );
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 3, 4,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Button( "Natural" );
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 3, 4,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget button = ui::Button( "Fit" );
- gtk_widget_show( button );
+ button.show();
gtk_table_attach( GTK_TABLE( table ), button, 3, 4, 3, 4,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget spin = ui::SpinButton( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 );
- gtk_widget_show( spin );
+ spin.show();
gtk_table_attach( GTK_TABLE( table ), spin, 2, 3, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
ui::Widget spin = ui::SpinButton( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 );
- gtk_widget_show( spin );
+ spin.show();
gtk_table_attach( GTK_TABLE( table ), spin, 3, 4, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
if ( !string_empty( g_pGameDescription->getKeyValue( "si_flags" ) ) ) {
{
- GtkFrame* frame = ui::Frame( "Surface Flags" );
- gtk_widget_show( GTK_WIDGET( frame ) );
+ auto frame = ui::Frame( "Surface Flags" );
+ frame.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
{
- GtkVBox* vbox3 = ui::VBox( FALSE, 4 );
+ auto vbox3 = ui::VBox( FALSE, 4 );
//gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4);
- gtk_widget_show( GTK_WIDGET( vbox3 ) );
+ vbox3.show();
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) );
{
- GtkTable* table = ui::Table( 8, 4, FALSE );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = ui::Table( 8, 4, FALSE );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 0 );
gtk_table_set_col_spacings( table, 0 );
{
for ( int r = 0; r != 8; ++r )
{
- GtkCheckButton* check = ui::CheckButton( getSurfaceFlagName( c * 8 + r ) );
- gtk_widget_show( GTK_WIDGET( check ) );
+ auto check = ui::CheckButton( getSurfaceFlagName( c * 8 + r ) );
+ check.show();
gtk_table_attach( table, GTK_WIDGET( check ), c, c + 1, r, r + 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
}
{
- GtkFrame* frame = ui::Frame( "Content Flags" );
- gtk_widget_show( GTK_WIDGET( frame ) );
+ auto frame = ui::Frame( "Content Flags" );
+ frame.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
{
- GtkVBox* vbox3 = ui::VBox( FALSE, 4 );
+ auto vbox3 = ui::VBox( FALSE, 4 );
//gtk_container_set_border_width(GTK_CONTAINER(vbox3), 4);
- gtk_widget_show( GTK_WIDGET( vbox3 ) );
+ vbox3.show();
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) );
{
- GtkTable* table = ui::Table( 8, 4, FALSE );
- gtk_widget_show( GTK_WIDGET( table ) );
+ auto table = ui::Table( 8, 4, FALSE );
+ table.show();
gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
gtk_table_set_row_spacings( table, 0 );
gtk_table_set_col_spacings( table, 0 );
{
for ( int r = 0; r != 8; ++r )
{
- GtkCheckButton* check = ui::CheckButton( getContentFlagName( c * 8 + r ) );
- gtk_widget_show( GTK_WIDGET( check ) );
+ auto check = ui::CheckButton( getContentFlagName( c * 8 + r ) );
+ check.show();
gtk_table_attach( table, GTK_WIDGET( check ), c, c + 1, r, r + 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
}
{
- GtkFrame* frame = ui::Frame( "Value" );
- gtk_widget_show( GTK_WIDGET( frame ) );
+ auto frame = ui::Frame( "Value" );
+ frame.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), TRUE, TRUE, 0 );
{
- GtkVBox* vbox3 = ui::VBox( FALSE, 4 );
+ auto vbox3 = ui::VBox( FALSE, 4 );
gtk_container_set_border_width( GTK_CONTAINER( vbox3 ), 4 );
- gtk_widget_show( GTK_WIDGET( vbox3 ) );
+ vbox3.show();
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) );
{
auto entry = ui::Entry();
- gtk_widget_show( GTK_WIDGET( entry ) );
+ entry.show();
gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
m_valueEntryWidget = entry;
m_valueEntry.connect( entry );
if ( g_bp_globals.m_texdefTypeId == TEXDEFTYPEID_BRUSHPRIMITIVES ) {
// Shamus: Textool goodies...
ui::Widget frame = ui::Frame( "Textool" );
- gtk_widget_show( frame );
+ frame.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), FALSE, FALSE, 0 );
{
//Prolly should make this a member or global var, so the SI can draw on it...
gtk_widget_set_events( TexTool::g_textoolWin, GDK_DESTROY | GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK );
gtk_widget_set_can_focus( TexTool::g_textoolWin, true );
// <-- end stuff...
- gtk_widget_show( TexTool::g_textoolWin );
+ TexTool::g_textoolWin.show();
gtk_widget_set_size_request( TexTool::g_textoolWin, -1, 240 ); //Yeah!
gtk_container_add( GTK_CONTAINER( frame ), TexTool::g_textoolWin );
}
{
ui::Widget hbox = ui::HBox( FALSE, 5 );
- gtk_widget_show( hbox );
+ hbox.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, FALSE, 0 );
// Checkboxes go here... (Flip X/Y)
ui::Widget flipX = ui::CheckButton( "Flip X axis" );
ui::Widget flipY = ui::CheckButton( "Flip Y axis" );
- gtk_widget_show( flipX );
- gtk_widget_show( flipY );
+ flipX.show();
+ flipY.show();
gtk_box_pack_start( GTK_BOX( hbox ), flipX, FALSE, FALSE, 0 );
gtk_box_pack_start( GTK_BOX( hbox ), flipY, FALSE, FALSE, 0 );
BuildStoreAssignedTags( textureBrowser->m_assigned_store, textureBrowser->shader.c_str(), textureBrowser );
BuildStoreAvailableTags( textureBrowser->m_available_store, textureBrowser->m_assigned_store, textureBrowser->m_all_tags, textureBrowser );
textureBrowser->m_heightChanged = true;
- gtk_widget_show( textureBrowser->m_tag_frame );
+ textureBrowser->m_tag_frame.show();
process_gui();
ui::Widget frame_table;
ui::Widget vbox = ui::VBox( FALSE, 0 );
gtk_table_attach( GTK_TABLE( table ), vbox, 0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
- gtk_widget_show( vbox );
+ vbox.show();
ui::Widget menu_bar;
gtk_menu_shell_append( GTK_MENU_SHELL( menu_bar ), tools_item );
gtk_table_attach( GTK_TABLE( table ), menu_bar, 0, 3, 0, 1, GTK_FILL, GTK_SHRINK, 0, 0 );
- gtk_widget_show( menu_bar );
+ menu_bar.show();
}
{ // Texture TreeView
g_TextureBrowser.m_scr_win_tree = ui::ScrolledWindow();
// vertical only scrolling for treeview
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tree ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
- gtk_widget_show( g_TextureBrowser.m_scr_win_tree );
+ g_TextureBrowser.m_scr_win_tree.show();
TextureBrowser_createTreeViewTree();
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tree ), GTK_WIDGET( g_TextureBrowser.m_treeViewTree ) );
- gtk_widget_show( GTK_WIDGET( g_TextureBrowser.m_treeViewTree ) );
+ g_TextureBrowser.m_treeViewTree.show();
}
{ // gl_widget scrollbar
ui::Widget w = ui::Widget(gtk_vscrollbar_new( ui::Adjustment( 0,0,0,1,1,0 ) ));
gtk_table_attach( GTK_TABLE( table ), w, 2, 3, 1, 2, GTK_SHRINK, GTK_FILL, 0, 0 );
- gtk_widget_show( w );
+ w.show();
g_TextureBrowser.m_texture_scroll = w;
GtkAdjustment *vadjustment = gtk_range_get_adjustment( GTK_RANGE( g_TextureBrowser.m_texture_scroll ) );
gtk_widget_set_can_focus( g_TextureBrowser.m_gl_widget, true );
gtk_table_attach_defaults( GTK_TABLE( table ), g_TextureBrowser.m_gl_widget, 1, 2, 1, 2 );
- gtk_widget_show( g_TextureBrowser.m_gl_widget );
+ g_TextureBrowser.m_gl_widget.show();
g_TextureBrowser.m_sizeHandler = g_signal_connect( G_OBJECT( g_TextureBrowser.m_gl_widget ), "size_allocate", G_CALLBACK( TextureBrowser_size_allocate ), &g_TextureBrowser );
g_TextureBrowser.m_exposeHandler = g_signal_connect( G_OBJECT( g_TextureBrowser.m_gl_widget ), "expose_event", G_CALLBACK( TextureBrowser_expose ), &g_TextureBrowser );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE );
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tags ), GTK_WIDGET( g_TextureBrowser.m_treeViewTags ) );
- gtk_widget_show( GTK_WIDGET( g_TextureBrowser.m_treeViewTags ) );
+ g_TextureBrowser.m_treeViewTags.show();
}
{ // Texture/Tag notebook
TextureBrowser_constructTagNotebook();
gtk_table_attach( GTK_TABLE( table ), g_TextureBrowser.m_tag_frame, 1, 3, 2, 3, GTK_FILL, GTK_SHRINK, 0, 0 );
- gtk_widget_show( frame_table );
+ frame_table.show();
gtk_container_add( GTK_CONTAINER( g_TextureBrowser.m_tag_frame ), frame_table );
}
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", TAG_COLUMN}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( g_TextureBrowser.m_assigned_tree ), column );
- gtk_widget_show( g_TextureBrowser.m_assigned_tree );
+ g_TextureBrowser.m_assigned_tree.show();
- gtk_widget_show( scrolled_win );
+ scrolled_win.show();
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), GTK_WIDGET( g_TextureBrowser.m_assigned_tree ) );
gtk_table_attach( GTK_TABLE( frame_table ), scrolled_win, 0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", TAG_COLUMN}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( g_TextureBrowser.m_available_tree ), column );
- gtk_widget_show( g_TextureBrowser.m_available_tree );
+ g_TextureBrowser.m_available_tree.show();
- gtk_widget_show( scrolled_win );
+ scrolled_win.show();
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), GTK_WIDGET( g_TextureBrowser.m_available_tree ) );
gtk_table_attach( GTK_TABLE( frame_table ), scrolled_win, 2, 3, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
g_signal_connect( G_OBJECT( m_btn_left ), "clicked", G_CALLBACK( TextureBrowser_assignTags ), NULL );
g_signal_connect( G_OBJECT( m_btn_right ), "clicked", G_CALLBACK( TextureBrowser_removeTags ), NULL );
- gtk_widget_show( m_btn_left );
- gtk_widget_show( m_btn_right );
- gtk_widget_show( m_arrow_left );
- gtk_widget_show( m_arrow_right );
+ m_btn_left.show();
+ m_btn_right.show();
+ m_arrow_left.show();
+ m_arrow_right.show();
}
{ // tag fram labels
ui::Widget m_lbl_assigned = ui::Label( "Assigned" );
gtk_table_attach( GTK_TABLE( frame_table ), m_lbl_assigned, 0, 1, 0, 1, GTK_EXPAND, GTK_SHRINK, 0, 0 );
gtk_table_attach( GTK_TABLE( frame_table ), m_lbl_unassigned, 2, 3, 0, 1, GTK_EXPAND, GTK_SHRINK, 0, 0 );
- gtk_widget_show( m_lbl_assigned );
- gtk_widget_show( m_lbl_unassigned );
+ m_lbl_assigned.show();
+ m_lbl_unassigned.show();
}
}
else { // no tag support, show the texture tree only