static char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Split patches cols,Split patches rows,Turn edge";
// globals
-GtkWidget *g_pRadiantWnd = NULL;
+ui::Widget g_pRadiantWnd;
static const char *PLUGIN_ABOUT = "bobToolz for SDRadiant\n"
"by digibob (digibob@splashdamage.com)\n"
"MarsMattel, RR2DO2\n";
extern "C" const char* QERPlug_Init( void* hApp, void* pMainWidget ) {
- g_pRadiantWnd = (GtkWidget*)pMainWidget;
+ g_pRadiantWnd = ui::Widget::from(pMainWidget);
return "bobToolz for GTKradiant";
}
EMessageBoxReturn DoDoorsBox( DoorRS* rs ){
GtkWidget *hbox;
- GtkWidget *textFrontBackTex, *textTrimTex;
GtkWidget *checkScaleMainH, *checkScaleMainV, *checkScaleTrimH, *checkScaleTrimV;
- GtkWidget *comboMain, *comboTrim;
GtkWidget *radioNS, *radioEW;
GSList *radioOrientation;
TwinWidget tw1, tw2;
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
- textFrontBackTex = ui::Entry( 512 );
+ auto textFrontBackTex = ui::Entry( 512 );
gtk_entry_set_text( GTK_ENTRY( textFrontBackTex ), rs->mainTexture );
gtk_box_pack_start( GTK_BOX( hbox ), textFrontBackTex, FALSE, FALSE, 0 );
gtk_widget_show( textFrontBackTex );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
- textTrimTex = ui::Entry( 512 );
+ auto textTrimTex = ui::Entry( 512 );
gtk_box_pack_start( GTK_BOX( hbox ), textTrimTex, FALSE, FALSE, 0 );
gtk_widget_show( textTrimTex );
// djbob: lists added
- comboMain = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(listMainTextures));
+ auto comboMain = ui::ComboBox(GTK_COMBO_BOX(gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(listMainTextures))));
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(comboMain), 0);
gtk_box_pack_start( GTK_BOX( hbox ), comboMain, FALSE, FALSE, 0 );
gtk_widget_show( comboMain );
tw1.one = textFrontBackTex;
- tw1.two = GTK_COMBO_BOX(comboMain);
+ tw1.two = comboMain;
auto buttonSetMain = ui::Button( "Set As Main Texture" );
buttonSetMain.connect( "clicked", G_CALLBACK( dialog_button_callback_settex ), &tw1 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
gtk_widget_show( hbox );
- comboTrim = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(listTrimTextures));
+ auto comboTrim = ui::ComboBox(GTK_COMBO_BOX(gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(listTrimTextures))));
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(comboMain), 0);
gtk_box_pack_start( GTK_BOX( hbox ), comboTrim, FALSE, FALSE, 0 );
gtk_widget_show( comboTrim );
tw2.one = textTrimTex;
- tw2.two = GTK_COMBO_BOX(comboTrim);
+ tw2.two = comboTrim;
auto buttonSetTrim = ui::Button( "Set As Trim Texture" );
buttonSetTrim.connect( "clicked", G_CALLBACK( dialog_button_callback_settex ), &tw2 );