static const 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
-ui::Widget g_pRadiantWnd;
+ui::Widget g_pRadiantWnd{ui::null};
static const char *PLUGIN_ABOUT = "bobToolz for SDRadiant\n"
"by digibob (digibob@splashdamage.com)\n"
---------------------------------*/
typedef struct {
- ui::Widget cbTexChange;
- ui::Widget editTexOld, editTexNew;
+ ui::Widget cbTexChange{ui::null};
+ ui::Widget editTexOld{ui::null}, editTexNew{ui::null};
- ui::Widget cbScaleHor, cbScaleVert;
- ui::Widget editScaleHor, editScaleVert;
+ ui::Widget cbScaleHor{ui::null}, cbScaleVert{ui::null};
+ ui::Widget editScaleHor{ui::null}, editScaleVert{ui::null};
- ui::Widget cbShiftHor, cbShiftVert;
- ui::Widget editShiftHor, editShiftVert;
+ ui::Widget cbShiftHor{ui::null}, cbShiftVert{ui::null};
+ ui::Widget editShiftHor{ui::null}, editShiftVert{ui::null};
- ui::Widget cbRotation;
- ui::Widget editRotation;
+ ui::Widget cbRotation{ui::null};
+ ui::Widget editRotation{ui::null};
}dlg_texReset_t;
dlg_texReset_t dlgTexReset;
*/
EMessageBoxReturn DoMessageBox( const char* lpText, const char* lpCaption, EMessageBoxType type ){
- ui::Widget w, vbox, hbox;
+ ui::Widget w{ui::null};
EMessageBoxReturn ret;
int loop = 1;
g_object_set_data( G_OBJECT( window ), "ret", &ret );
gtk_widget_realize( window );
- vbox = ui::VBox( FALSE, 10 );
+ auto vbox = ui::VBox( FALSE, 10 );
window.add(vbox);
gtk_widget_show( vbox );
gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 );
gtk_widget_show( w );
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
}
EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){
- ui::Widget w, hbox;
-
- ui::Entry text1, text2, text3;
- ui::Widget check1, check2;
+ ui::Widget w{ui::null};
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ---- hbox ----
- text1 = ui::Entry( 256 );
+ auto text1 = ui::Entry( 256 );
gtk_entry_set_text( text1, "25" );
gtk_box_pack_start( GTK_BOX( hbox ), text1, FALSE, FALSE, 2 );
gtk_widget_show( text1 );
// ---- hbox ----
- text2 = ui::Entry( 256 );
+ auto text2 = ui::Entry( 256 );
gtk_entry_set_text( text2, "3" );
gtk_box_pack_start( GTK_BOX( hbox ), text2, FALSE, FALSE, 2 );
gtk_widget_show( text2 );
// ---- hbox ----
- text3 = ui::Entry( 256 );
+ auto text3 = ui::Entry( 256 );
gtk_entry_set_text( text3, "-800" );
gtk_box_pack_start( GTK_BOX( hbox ), text3, FALSE, FALSE, 2 );
gtk_widget_show( text3 );
gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
gtk_widget_show( w );
- check1 = ui::CheckButton( "No Dynamic Update" );
+ auto check1 = ui::CheckButton( "No Dynamic Update" );
gtk_box_pack_start( GTK_BOX( vbox ), check1, FALSE, FALSE, 0 );
gtk_widget_show( check1 );
- check2 = ui::CheckButton( "Show Bounding Lines" );
+ auto check2 = ui::CheckButton( "Show Bounding Lines" );
gtk_box_pack_start( GTK_BOX( vbox ), check2, FALSE, FALSE, 0 );
gtk_widget_show( check2 );
}
EMessageBoxReturn DoCTFColourChangeBox(){
- ui::Widget w, hbox;
+ ui::Widget w{ui::null};
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, TRUE, TRUE, 0 );
gtk_widget_show( hbox );
EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){
Str texSelected;
- ui::Widget w, hbox;
+ ui::Widget w{ui::null};
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){
Str texSelected;
- ui::Widget w, hbox;
+ ui::Widget w{ui::null};
- ui::Widget radiusX, radiusY;
- ui::Widget angleStart, angleEnd;
- ui::Widget heightStart, heightEnd;
- ui::Widget numPoints;
+ ui::Widget radiusX{ui::null}, radiusY{ui::null};
+ ui::Widget angleStart{ui::null}, angleEnd{ui::null};
+ ui::Widget heightStart{ui::null}, heightEnd{ui::null};
+ ui::Widget numPoints{ui::null};
EMessageBoxReturn ret;
int loop = 1;
// ---- vbox ----
- hbox = ui::HBox( FALSE, 10 );
+ auto hbox = ui::HBox( FALSE, 10 );
gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 2 );
gtk_widget_show( hbox );
// ailmanki
// add a simple input for the MakeChain thing..
EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){
- ui::Widget w;
- ui::Entry textlinkNum, textlinkName;
+ ui::Widget w{ui::null};
+ ui::Entry textlinkNum{ui::null}, textlinkName{ui::null};
EMessageBoxReturn ret;
int loop = 1;
gtk_widget_show( label1 );
gtk_box_pack_start( GTK_BOX( vbox2 ), label1, FALSE, FALSE, 0 );
- auto scrolledwindow1 = ui::ScrolledWindow();
+ auto scrolledwindow1 = ui::ScrolledWindow(ui::New);
gtk_widget_set_name( scrolledwindow1, "scrolledwindow1" );
scrolledwindow1.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), scrolledwindow1, TRUE, TRUE, 0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scrolledwindow1 ), GTK_SHADOW_IN );
- auto t_materialist = ui::TreeView();
+ auto t_materialist = ui::TreeView(ui::New);
gtk_widget_set_name( t_materialist, "t_materialist" );
t_materialist.show();
scrolledwindow1.add(t_materialist);
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( t_materialist ), FALSE );
gtk_tree_view_set_enable_search( GTK_TREE_VIEW( t_materialist ), FALSE );
- ed_materialname = ui::Entry();
+ ed_materialname = ui::Entry(ui::New);
gtk_widget_set_name( ed_materialname, "ed_materialname" );
gtk_widget_show( ed_materialname );
gtk_box_pack_start( GTK_BOX( vbox2 ), ed_materialname, FALSE, FALSE, 0 );
GtkTreeViewColumn* col = gtk_tree_view_column_new();
gtk_tree_view_column_set_title( col, "materials" );
gtk_tree_view_append_column( GTK_TREE_VIEW( lookup_widget( wnd, "t_materialist" ) ), col );
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW( lookup_widget( wnd, "t_materialist" ) ), -1, "", renderer, "text", 0, NULL );
// list store
(GtkAttachOptions) ( 0 ), 0, 0 );
polyscheck.connect( "toggled", G_CALLBACK( OnPoly ), NULL );
- auto zlist = ui::ComboBoxText();
+ auto zlist = ui::ComboBoxText(ui::New);
gtk_widget_show( zlist );
gtk_box_pack_start( GTK_BOX( vbox2 ), zlist, TRUE, FALSE, 0 );
dlg.add(vbox);
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
- entry = ui::Entry();
+ entry = ui::Entry(ui::New);
gtk_widget_show( entry );
gtk_editable_set_editable( GTK_EDITABLE( entry ), FALSE );
gtk_box_pack_start( GTK_BOX( vbox ), entry, FALSE, FALSE, 0 );
}
}
-ui::AccelGroup global_accel = ui::AccelGroup();
+ui::AccelGroup global_accel{ui::New};
GClosure* global_accel_group_add_accelerator( Accelerator accelerator, const Callback& callback ){
if ( !global_accel_enabled() ) {
auto hbox = ui::HBox( FALSE, 0 );
gtk_widget_show( GTK_WIDGET( hbox ) );
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
gtk_entry_set_has_frame( entry, FALSE );
gtk_widget_show( GTK_WIDGET( entry ) );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
// browse button
- auto button = ui::Button();
+ auto button = ui::Button(ui::New);
button_set_icon( button, "ellipsis.bmp" );
gtk_widget_show( GTK_WIDGET( button ) );
gtk_box_pack_end( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
auto item = ui::MenuItem( mnemonic, true );
item.show();
- auto sub_menu = ui::Menu();
+ auto sub_menu = ui::Menu(ui::New);
gtk_menu_item_set_submenu( item, sub_menu );
return item;
gtk_window_deiconify( parentWindow );
}
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
window.add_accel_group( accel );
auto vbox = create_dialog_vbox( 8, 8 );
PanedState g_vpaned2 = { 0.5f, -1, };
ui::HPaned create_split_views( ui::Widget topleft, ui::Widget topright, ui::Widget botleft, ui::Widget botright ){
- auto hsplit = ui::HPaned();
+ auto hsplit = ui::HPaned(ui::New);
hsplit.show();
hsplit.connect( "size_allocate", G_CALLBACK( hpaned_allocate ), &g_hpaned );
hsplit.connect( "notify::position", G_CALLBACK( paned_position ), &g_hpaned );
{
- auto vsplit = ui::VPaned();
+ auto vsplit = ui::VPaned(ui::New);
gtk_paned_add1( GTK_PANED( hsplit ), GTK_WIDGET( vsplit ) );
gtk_widget_show( GTK_WIDGET( vsplit ) );
gtk_paned_add2( GTK_PANED( vsplit ), GTK_WIDGET( create_framed_widget( topright ) ) );
}
{
- auto vsplit = ui::VPaned();
+ auto vsplit = ui::VPaned(ui::New);
gtk_paned_add2( GTK_PANED( hsplit ), GTK_WIDGET( vsplit ) );
gtk_widget_show( GTK_WIDGET( vsplit ) );
ui::ScrolledWindow create_scrolled_window( ui::Policy hscrollbar_policy, ui::Policy vscrollbar_policy, int border ){
- auto scr = ui::ScrolledWindow();
+ auto scr = ui::ScrolledWindow(ui::New);
gtk_widget_show( GTK_WIDGET( scr ) );
gtk_scrolled_window_set_policy( scr, (GtkPolicyType) hscrollbar_policy, (GtkPolicyType) vscrollbar_policy );
gtk_scrolled_window_set_shadow_type( scr, GTK_SHADOW_IN );
}
}
- Widget root;
+ Widget root{ui::null};
#define IMPL(T, F) template<> _IMPL(T, F)
#define _IMPL(T, F) struct verify<T *> { using self = T; static self test(self it) { return self(F(it)); } }
IMPL(Widget, GTK_WIDGET);
- Widget::Widget() : Widget(nullptr)
+ Widget::Widget(ui::New_t) : Widget(nullptr)
{}
alert_response IWidget::alert(std::string text, std::string title, alert_type type, alert_icon icon)
IMPL(Button, GTK_BUTTON);
- Button::Button() : Button(GTK_BUTTON(gtk_button_new()))
+ Button::Button(ui::New_t) : Button(GTK_BUTTON(gtk_button_new()))
{}
Button::Button(const char *label) : Button(GTK_BUTTON(gtk_button_new_with_label(label)))
IMPL(CheckButton, GTK_CHECK_BUTTON);
- CheckButton::CheckButton() : CheckButton(GTK_CHECK_BUTTON(gtk_check_button_new()))
+ CheckButton::CheckButton(ui::New_t) : CheckButton(GTK_CHECK_BUTTON(gtk_check_button_new()))
{}
CheckButton::CheckButton(const char *label) : CheckButton(GTK_CHECK_BUTTON(gtk_check_button_new_with_label(label)))
IMPL(MenuItem, GTK_MENU_ITEM);
- MenuItem::MenuItem() : MenuItem(GTK_MENU_ITEM(gtk_menu_item_new()))
+ MenuItem::MenuItem(ui::New_t) : MenuItem(GTK_MENU_ITEM(gtk_menu_item_new()))
{}
MenuItem::MenuItem(const char *label, bool mnemonic) : MenuItem(
IMPL(TearoffMenuItem, GTK_TEAROFF_MENU_ITEM);
- TearoffMenuItem::TearoffMenuItem() : TearoffMenuItem(GTK_TEAROFF_MENU_ITEM(gtk_tearoff_menu_item_new()))
+ TearoffMenuItem::TearoffMenuItem(ui::New_t) : TearoffMenuItem(GTK_TEAROFF_MENU_ITEM(gtk_tearoff_menu_item_new()))
{}
IMPL(ComboBoxText, GTK_COMBO_BOX_TEXT);
- ComboBoxText::ComboBoxText() : ComboBoxText(GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new()))
+ ComboBoxText::ComboBoxText(ui::New_t) : ComboBoxText(GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new()))
{}
IMPL(ScrolledWindow, GTK_SCROLLED_WINDOW);
- ScrolledWindow::ScrolledWindow() : ScrolledWindow(GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(nullptr, nullptr)))
+ ScrolledWindow::ScrolledWindow(ui::New_t) : ScrolledWindow(GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(nullptr, nullptr)))
{}
void IScrolledWindow::overflow(Policy x, Policy y)
IMPL(HPaned, GTK_HPANED);
- HPaned::HPaned() : HPaned(GTK_HPANED(gtk_hpaned_new()))
+ HPaned::HPaned(ui::New_t) : HPaned(GTK_HPANED(gtk_hpaned_new()))
{}
IMPL(VPaned, GTK_VPANED);
- VPaned::VPaned() : VPaned(GTK_VPANED(gtk_vpaned_new()))
+ VPaned::VPaned(ui::New_t) : VPaned(GTK_VPANED(gtk_vpaned_new()))
{}
IMPL(Menu, GTK_MENU);
- Menu::Menu() : Menu(GTK_MENU(gtk_menu_new()))
+ Menu::Menu(ui::New_t) : Menu(GTK_MENU(gtk_menu_new()))
{}
IMPL(Table, GTK_TABLE);
IMPL(TextView, GTK_TEXT_VIEW);
- TextView::TextView() : TextView(GTK_TEXT_VIEW(gtk_text_view_new()))
+ TextView::TextView(ui::New_t) : TextView(GTK_TEXT_VIEW(gtk_text_view_new()))
{}
void ITextView::text(char const *str)
gtk_text_buffer_set_text(buffer, str, -1);
}
- TreeView::TreeView() : TreeView(GTK_TREE_VIEW(gtk_tree_view_new()))
+ TreeView::TreeView(ui::New_t) : TreeView(GTK_TREE_VIEW(gtk_tree_view_new()))
{}
TreeView::TreeView(TreeModel model) : TreeView(GTK_TREE_VIEW(gtk_tree_view_new_with_model(model)))
IMPL(Image, GTK_IMAGE);
- Image::Image() : Image(GTK_IMAGE(gtk_image_new()))
+ Image::Image(ui::New_t) : Image(GTK_IMAGE(gtk_image_new()))
{}
IMPL(Entry, GTK_ENTRY);
- Entry::Entry() : Entry(GTK_ENTRY(gtk_entry_new()))
+ Entry::Entry(ui::New_t) : Entry(GTK_ENTRY(gtk_entry_new()))
{}
- Entry::Entry(std::size_t max_length) : Entry()
+ Entry::Entry(std::size_t max_length) : Entry(ui::New)
{
gtk_entry_set_max_length(this, static_cast<gint>(max_length));
}
IMPL(CellRendererText, GTK_CELL_RENDERER_TEXT);
- CellRendererText::CellRendererText() : CellRendererText(GTK_CELL_RENDERER_TEXT(gtk_cell_renderer_text_new()))
+ CellRendererText::CellRendererText(ui::New_t) : CellRendererText(GTK_CELL_RENDERER_TEXT(gtk_cell_renderer_text_new()))
{}
IMPL(TreeViewColumn, GTK_TREE_VIEW_COLUMN);
IMPL(AccelGroup, GTK_ACCEL_GROUP);
- AccelGroup::AccelGroup() : AccelGroup(GTK_ACCEL_GROUP(gtk_accel_group_new()))
+ AccelGroup::AccelGroup(ui::New_t) : AccelGroup(GTK_ACCEL_GROUP(gtk_accel_group_new()))
{}
IMPL(ListStore, GTK_LIST_STORE);
// IMPL(TreePath, GTK_TREE_PATH);
- TreePath::TreePath() : TreePath(gtk_tree_path_new())
+ TreePath::TreePath(ui::New_t) : TreePath(gtk_tree_path_new())
{}
TreePath::TreePath(const char *path) : TreePath(gtk_tree_path_new_from_string(path))
}
extern struct Null {} null;
+ extern struct New_t {} New;
class Object :
public details::Convertible<Object, _GtkObject *, details::Convert::Explicit>,
using native = T *; \
explicit name(native h) : super(reinterpret_cast<super::native>(h)) {} \
explicit name(Null n) : name((native) nullptr) {} \
+ explicit name(New_t); \
static name from(void *ptr) { return name((native) ptr); } \
ctors \
}; \
);
WRAP(Editable, Object, _GtkEditable, (),
- explicit Editable();
,
void editable(bool value);
);
};
WRAP(Widget, Object, _GtkWidget, (),
- explicit Widget();
,
alert_response alert(
std::string text,
);
WRAP(Button, Bin, _GtkButton, (),
- explicit Button();
explicit Button(const char *label);
,
);
);
WRAP(CheckButton, ToggleButton, _GtkCheckButton, (),
- explicit CheckButton();
explicit CheckButton(const char *label);
,
);
);
WRAP(MenuItem, Item, _GtkMenuItem, (),
- explicit MenuItem();
explicit MenuItem(const char *label, bool mnemonic = false);
,
);
);
WRAP(TearoffMenuItem, MenuItem, _GtkTearoffMenuItem, (),
- explicit TearoffMenuItem();
,
);
);
WRAP(ComboBoxText, ComboBox, _GtkComboBoxText, (),
- explicit ComboBoxText();
,
);
);
WRAP(ScrolledWindow, Bin, _GtkScrolledWindow, (),
- explicit ScrolledWindow();
,
void overflow(Policy x, Policy y);
);
);
WRAP(HPaned, Paned, _GtkHPaned, (),
- explicit HPaned();
,
);
WRAP(VPaned, Paned, _GtkVPaned, (),
- explicit VPaned();
,
);
);
WRAP(Menu, MenuShell, _GtkMenu, (),
- explicit Menu();
,
);
);
WRAP(TextView, Container, _GtkTextView, (),
- explicit TextView();
,
void text(char const *str);
);
class TreeModel;
WRAP(TreeView, Widget, _GtkTreeView, (),
- explicit TreeView();
TreeView(TreeModel model);
,
);
);
WRAP(Image, Widget, _GtkImage, (),
- explicit Image();
,
);
WRAP(Entry, Widget, _GtkEntry, (IEditable, ICellEditable),
- explicit Entry();
explicit Entry(std::size_t max_length);
,
char const *text();
);
WRAP(CellRendererText, CellRenderer, _GtkCellRendererText, (),
- explicit CellRendererText();
,
);
);
WRAP(AccelGroup, Object, _GtkAccelGroup, (),
- explicit AccelGroup();
,
);
// GBoxed
WRAP(TreePath, Object, _GtkTreePath, (),
- explicit TreePath();
explicit TreePath(const char *path);
,
);
ui::Window BuildMenuDialog_construct( ModalDialog& modal, ProjectList& projectList ){
ui::Window window = MainFrame_getWindow().create_dialog_window("Build Menu", G_CALLBACK(dialog_delete_callback ), &modal, -1, 400 );
- ui::Widget buildView;
+ ui::Widget buildView{ui::null};
{
auto table1 = create_dialog_table( 2, 2, 4, 4, 4 );
ui::Widget view = ui::TreeView( ui::TreeModel(GTK_TREE_MODEL( store ) ));
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
object_set_boolean_property( G_OBJECT( renderer ), "editable", TRUE );
renderer.connect("edited", G_CALLBACK( project_cell_edited ), &projectList );
ui::Widget view = ui::TreeView(ui::TreeModel( GTK_TREE_MODEL( store ) ));
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
object_set_boolean_property( G_OBJECT( renderer ), "editable", TRUE );
renderer.connect( "edited", G_CALLBACK( commands_cell_edited ), store );
return accelerator_window_key_press(widget, event, dialogptr);
}, &dialog);
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
window.add_accel_group( accel );
auto hbox = create_dialog_hbox( 4, 4 );
gtk_tree_view_set_enable_search( GTK_TREE_VIEW( view ), false ); // annoying
{
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Command", renderer, {{"text", 0}, {"weight-set", 2}, {"weight", 3}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
{
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Key", renderer, {{"text", 1}, {"weight-set", 2}, {"weight", 3}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
GtkButton* clearbutton = create_dialog_button( "Clear", (GCallback) accelerator_clear_button_clicked, &dialog );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( clearbutton ), FALSE, FALSE, 0 );
- ui::Widget spacer = ui::Image();
+ ui::Widget spacer = ui::Image(ui::New);
spacer.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( spacer ), TRUE, TRUE, 0 );
}
gboolean destroy_set_null( ui::Window widget, ui::Widget* p ){
- *p = ui::Widget();
+ *p = ui::Widget{ui::null};
return FALSE;
}
WidgetFocusPrinter g_consoleWidgetFocusPrinter( "console" );
ui::Widget Console_constructWindow( ui::Window toplevel ){
- auto scr = ui::ScrolledWindow();
+ auto scr = ui::ScrolledWindow(ui::New);
scr.overflow(ui::Policy::AUTOMATIC, ui::Policy::AUTOMATIC);
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
scr.show();
{
- auto text = ui::TextView();
+ auto text = ui::TextView(ui::New);
gtk_widget_set_size_request( text, 0, -1 ); // allow shrinking
gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( text ), GTK_WRAP_WORD );
gtk_text_view_set_editable( GTK_TEXT_VIEW( text ), FALSE );
ui::Entry DialogEntry_new(){
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_widget_set_size_request( GTK_WIDGET( entry ), 64, -1 );
return entry;
auto alignment = ui::Alignment( 0.0, 0.5, 0.0, 0.0 );
alignment.show();
{
- auto combo = ui::ComboBoxText();
+ auto combo = ui::ComboBoxText(ui::New);
for ( StringArrayRange::Iterator i = values.first; i != values.last; ++i )
{
#include "groupdialog.h"
ui::Entry numeric_entry_new(){
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
entry.dimensions(64, -1);
return entry;
BooleanAttribute( const char* key ) :
m_key( key ),
m_check( ui::null ){
- auto check = ui::CheckButton();
+ auto check = ui::CheckButton(ui::New);
check.show();
m_check = check;
m_key( key ),
m_entry( ui::null ),
m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
entry.dimensions(50, -1);
m_combo( 0 ),
m_nonModal( ApplyCaller( *this ) ),
m_type( type ){
- auto combo = ui::ComboBoxText();
+ auto combo = ui::ComboBoxText(ui::New);
for ( ListAttributeType::const_iterator i = type.begin(); i != type.end(); ++i )
{
namespace
{
-ui::Widget g_entity_split1;
-ui::Widget g_entity_split2;
+ui::Widget g_entity_split1{ui::null};
+ui::Widget g_entity_split2{ui::null};
int g_entitysplit1_position;
int g_entitysplit2_position;
bool g_entityInspector_windowConstructed = false;
GtkTreeView* g_entityClassList;
-ui::TextView g_entityClassComment;
+ui::TextView g_entityClassComment{ui::null};
GtkCheckButton* g_entitySpawnflagsCheck[MAX_FLAGS];
-ui::Entry g_entityKeyEntry;
-ui::Entry g_entityValueEntry;
+ui::Entry g_entityKeyEntry{ui::null};
+ui::Entry g_entityValueEntry{ui::null};
ui::ListStore g_entlist_store{ui::null};
ui::ListStore g_entprops_store{ui::null};
vbox.connect( "destroy", G_CALLBACK( EntityInspector_destroyWindow ), 0 );
{
- ui::Widget split1 = ui::VPaned();
+ ui::Widget split1 = ui::VPaned(ui::New);
gtk_box_pack_start( GTK_BOX( vbox ), split1, TRUE, TRUE, 0 );
split1.show();
g_entity_split1 = split1;
{
- ui::Widget split2 = ui::VPaned();
+ ui::Widget split2 = ui::VPaned(ui::New);
gtk_paned_add1( GTK_PANED( split1 ), split2 );
split2.show();
{
// class list
- auto scr = ui::ScrolledWindow();
+ auto scr = ui::ScrolledWindow(ui::New);
scr.show();
gtk_paned_add1( GTK_PANED( split2 ), scr );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
view.connect( "key_press_event", G_CALLBACK( EntityClassList_keypress ), 0 );
{
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Key", renderer, {{"text", 0}} );
gtk_tree_view_append_column( view, column );
}
}
{
- auto scr = ui::ScrolledWindow();
+ auto scr = ui::ScrolledWindow(ui::New);
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 );
{
- auto text = ui::TextView();
+ auto text = ui::TextView(ui::New);
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 );
}
{
- ui::Widget split2 = ui::VPaned();
+ ui::Widget split2 = ui::VPaned(ui::New);
gtk_paned_add2( GTK_PANED( split1 ), split2 );
split2.show();
{
// key/value list
- auto scr = ui::ScrolledWindow();
+ auto scr = ui::ScrolledWindow(ui::New);
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_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
{
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", 0}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
{
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", 1}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
gtk_table_set_col_spacings( table, 5 );
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
}
{
- auto scr = ui::ScrolledWindow();
+ auto scr = ui::ScrolledWindow(ui::New);
scr.show();
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC );
window.add(scr);
{
- ui::Widget view = ui::TreeView();
+ ui::Widget view = ui::TreeView(ui::New);
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = gtk_tree_view_column_new();
gtk_tree_view_column_pack_start( column, renderer, TRUE );
gtk_tree_view_column_set_cell_data_func( column, renderer, entitylist_treeviewcolumn_celldatafunc, 0, 0 );
ui::Window CDbgDlg::BuildDialog(){
auto window = MainFrame_getWindow().create_floating_window("Q3Map debug window" );
- auto scr = ui::ScrolledWindow();
+ auto scr = ui::ScrolledWindow(ui::New);
scr.show();
window.add(scr);
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC );
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
{
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", 0}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
}
ui::Window FindTextureDialog::BuildDialog(){
- ui::Widget vbox, hbox, table, label;
- ui::Widget button;
+ ui::Widget vbox{ui::null}, hbox{ui::null}, table{ui::null}, label{ui::null};
+ ui::Widget button{ui::null};
ui::Entry entry{ui::null};
auto dlg = ui::Window(create_floating_window( "Find / Replace Texture(s)", m_parent ));
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
- entry = ui::Entry();
+ entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
AddDialogData( *GTK_ENTRY(entry), m_strFind );
GlobalTextureEntryCompletion::instance().connect( entry );
- entry = ui::Entry();
+ entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
class GroupDlg
{
public:
-ui::Widget m_pNotebook;
-ui::Window m_window;
+ui::Widget m_pNotebook{ui::null};
+ui::Window m_window{ui::null};
GroupDlg();
void Create( ui::Window parent );
struct GameCombo
{
- ui::ComboBoxText game_select;
- ui::Entry fsgame_entry;
+ ui::ComboBoxText game_select{ui::null};
+ ui::Entry fsgame_entry{ui::null};
};
gboolean OnSelchangeComboWhatgame( ui::Widget widget, GameCombo* combo ){
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
}
{
- dialog.game_combo.game_select = ui::ComboBoxText();
+ dialog.game_combo.game_select = ui::ComboBoxText(ui::New);
gtk_combo_box_text_append_text( dialog.game_combo.game_select, globalGameComboConfiguration().basegame );
if ( globalGameComboConfiguration().known[0] != '\0' ) {
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table2, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
- auto combo = ui::ComboBoxText();
+ auto combo = ui::ComboBoxText(ui::New);
gtk_combo_box_text_append_text( combo, globalMappingMode().sp_mapping_mode );
gtk_combo_box_text_append_text( combo, globalMappingMode().mp_mapping_mode );
auto window = MainFrame_getWindow().create_dialog_window("Arbitrary sides", G_CALLBACK(dialog_delete_callback ), &dialog );
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
window.add_accel_group( accel );
{
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), FALSE, FALSE, 0 );
sides_entry = entry;
auto sc_extensions = create_scrolled_window( ui::Policy::AUTOMATIC, ui::Policy::ALWAYS, 4 );
frame.add(sc_extensions);
{
- auto text_extensions = ui::TextView();
+ auto text_extensions = ui::TextView(ui::New);
gtk_text_view_set_editable( GTK_TEXT_VIEW( text_extensions ), FALSE );
sc_extensions.add(text_extensions);
text_extensions.text(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)));
ModalDialog dialog;
ModalDialogButton ok_button( dialog, eIDOK );
ModalDialogButton cancel_button( dialog, eIDCANCEL );
- ui::Entry x;
- ui::Entry y;
+ ui::Entry x{ui::null};
+ ui::Entry y{ui::null};
auto window = MainFrame_getWindow().create_modal_dialog_window("Patch texture layout", dialog );
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
window.add_accel_group( accel );
{
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
x = entry;
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
// Text Editor dialog
// master window widget
-static ui::Widget text_editor;
-static ui::Widget text_widget; // slave, text widget from the gtk editor
+static ui::Widget text_editor{ui::null};
+static ui::Widget text_widget{ui::null}; // slave, text widget from the gtk editor
static gint editor_delete( ui::Widget widget, gpointer data ){
if ( widget.alert( "Close the shader editor ?", "Radiant", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::NO ) {
}
static void CreateGtkTextEditor(){
- ui::Widget vbox, hbox, button, text;
-
auto dlg = ui::Window( ui::window_type::TOP );
dlg.connect( "delete_event",
G_CALLBACK( editor_delete ), 0 );
gtk_window_set_default_size( GTK_WINDOW( dlg ), 600, 300 );
- vbox = ui::VBox( FALSE, 5 );
+ auto vbox = ui::VBox( FALSE, 5 );
vbox.show();
dlg.add(vbox);
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
- auto scr = ui::ScrolledWindow();
+ auto scr = ui::ScrolledWindow(ui::New);
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();
+ auto text = ui::TextView(ui::New);
scr.add(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 );
+ auto hbox = ui::HBox( FALSE, 5 );
hbox.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
- button = ui::Button( "Close" );
+ auto button = ui::Button( "Close" );
button.show();
gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
button.connect( "clicked",
EMessageBoxReturn DoLightIntensityDlg( int *intensity ){
ModalDialog dialog;
- ui::Entry intensity_entry;
+ ui::Entry intensity_entry{ui::null};
ModalDialogButton ok_button( dialog, eIDOK );
ModalDialogButton cancel_button( dialog, eIDCANCEL );
ui::Window window = MainFrame_getWindow().create_modal_dialog_window("Light intensity", dialog, -1, -1 );
- auto accel_group = ui::AccelGroup();
+ auto accel_group = ui::AccelGroup(ui::New);
window.add_accel_group( accel_group );
{
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
auto window = MainFrame_getWindow().create_modal_dialog_window(title, dialog, -1, -1 );
- auto accel_group = ui::AccelGroup();
+ auto accel_group = ui::AccelGroup(ui::New);
window.add_accel_group( accel_group );
{
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
auto window = MainFrame_getWindow().create_modal_dialog_window(title, dialog, -1, -1 );
- auto accel_group = ui::AccelGroup();
+ auto accel_group = ui::AccelGroup(ui::New);
window.add_accel_group( accel_group );
{
// File dialog
bool color_dialog( ui::Widget parent, Vector3& color, const char* title ){
- ui::Widget dlg;
GdkColor clr = { 0, guint16(color[0] * 65535), guint16(color[1] * 65535), guint16(color[2] * 65535) };
ModalDialog dialog;
- dlg = ui::Widget(gtk_color_selection_dialog_new( title ));
+ auto dlg = ui::Widget(gtk_color_selection_dialog_new( title ));
gtk_color_selection_set_current_color( GTK_COLOR_SELECTION( gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG( dlg )) ), &clr );
dlg.connect( "delete_event", G_CALLBACK( dialog_delete_callback ), &dialog );
GtkWidget *ok_button, *cancel_button;
}
-ui::Widget g_page_console;
+ui::Widget g_page_console{ui::null};
void Console_ToggleShow(){
GroupDialog_showPage( g_page_console );
}
-ui::Widget g_page_entity;
+ui::Widget g_page_entity{ui::null};
void EntityInspector_ToggleShow(){
GroupDialog_showPage( g_page_entity );
}
-ui::Widget g_toggle_z_item;
-ui::Widget g_toggle_console_item;
-ui::Widget g_toggle_entity_item;
-ui::Widget g_toggle_entitylist_item;
+ui::Widget g_toggle_z_item{ui::null};
+ui::Widget g_toggle_console_item{ui::null};
+ui::Widget g_toggle_entity_item{ui::null};
+ui::Widget g_toggle_entitylist_item{ui::null};
ui::MenuItem create_view_menu( MainFrame::EViewStyle style ){
// View menu
std::vector<ui::Widget> g_floating_windows;
-MainFrame::MainFrame() : m_window( 0 ), m_idleRedrawStatusText( RedrawStatusTextCaller( *this ) ){
+MainFrame::MainFrame() : m_idleRedrawStatusText( RedrawStatusTextCaller( *this ) ){
m_pXYWnd = 0;
m_pCamWnd = 0;
m_pZWnd = 0;
m_pXZWnd = 0;
m_pActiveXY = 0;
- for ( int n = 0; n < c_count_status; n++ )
- {
- m_pStatusLabel[n] = ui::Label(ui::null);
+ for (auto &n : m_pStatusLabel) {
+ n = ui::Label{ui::null};
}
m_bSleeping = false;
}
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( plugin_toolbar ), FALSE, FALSE, 0 );
- ui::Widget main_statusbar = create_main_statusbar( m_pStatusLabel );
+ ui::Widget main_statusbar = create_main_statusbar(reinterpret_cast<ui::Widget *>(m_pStatusLabel));
gtk_box_pack_end( GTK_BOX( vbox ), main_statusbar, FALSE, TRUE, 2 );
GroupDialog_constructWindow( window );
if ( CurrentStyle() == eRegular || CurrentStyle() == eRegularLeft ) {
{
- ui::Widget vsplit = ui::VPaned();
+ ui::Widget vsplit = ui::VPaned(ui::New);
m_vSplit = vsplit;
gtk_box_pack_start( GTK_BOX( vbox ), vsplit, TRUE, TRUE, 0 );
vsplit.show();
gtk_paned_pack2( GTK_PANED( vsplit ), console_window, FALSE, TRUE );
{
- ui::Widget hsplit = ui::HPaned();
+ ui::Widget hsplit = ui::HPaned(ui::New);
hsplit.show();
m_hSplit = hsplit;
gtk_paned_add1( GTK_PANED( vsplit ), hsplit );
ui::Widget xy_window = ui::Widget(GTK_WIDGET( create_framed_widget( m_pXYWnd->GetWidget() ) ));
{
- ui::Widget vsplit2 = ui::VPaned();
+ ui::Widget vsplit2 = ui::VPaned(ui::New);
vsplit2.show();
m_vSplit2 = vsplit2;
MainFrame();
~MainFrame();
-ui::Window m_window;
+ui::Window m_window{ui::null};
CopiedString m_command_status;
CopiedString m_position_status;
void SaveWindowInfo();
void Shutdown();
-ui::Widget m_vSplit;
-ui::Widget m_hSplit;
-ui::Widget m_vSplit2;
+ui::Widget m_vSplit{ui::null};
+ui::Widget m_hSplit{ui::null};
+ui::Widget m_vSplit2{ui::null};
XYWnd* m_pXYWnd;
XYWnd* m_pYZWnd;
bool m_bSleeping;
-ui::Widget m_pStatusLabel[c_count_status];
+void *m_pStatusLabel[c_count_status];
EViewStyle m_nCurrentStyle;
void DoMapInfo(){
ModalDialog dialog;
- ui::Entry brushes_entry;
- ui::Entry entities_entry;
+ ui::Entry brushes_entry{ui::null};
+ ui::Entry entities_entry{ui::null};
ui::ListStore EntityBreakdownWalker{ui::null};
ui::Window window = MainFrame_getWindow().create_dialog_window("Map Info", G_CALLBACK(dialog_delete_callback ), &dialog );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
brushes_entry = entry;
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
gtk_tree_view_set_headers_clickable( GTK_TREE_VIEW( view ), TRUE );
{
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Entity", renderer, {{"text", 0}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
gtk_tree_view_column_set_sort_column_id( column, 0 );
}
{
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Count", renderer, {{"text", 1}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
gtk_tree_view_column_set_sort_column_id( column, 1 );
void DoFind(){
ModalDialog dialog;
- ui::Entry entity;
- ui::Entry brush;
+ ui::Entry entity{ui::null};
+ ui::Entry brush{ui::null};
ui::Window window = MainFrame_getWindow().create_dialog_window("Find Brush", G_CALLBACK(dialog_delete_callback ), &dialog );
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
window.add_accel_group( accel );
{
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
entity = entry;
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- auto combo = ui::ComboBoxText();
+ auto combo = ui::ComboBoxText(ui::New);
combo.connect( "changed", G_CALLBACK( OnSelchangeComboColRow ), this );
AddDialogData( *GTK_COMBO_BOX(combo), m_nRow );
}
{
- auto combo = ui::ComboBoxText();
+ auto combo = ui::ComboBoxText(ui::New);
combo.connect( "changed", G_CALLBACK( OnSelchangeComboColRow ), this );
AddDialogData( *GTK_COMBO_BOX(combo), m_nCol );
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 2, 3,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 3, 4,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
entry.connect( "key_press_event", G_CALLBACK( OnDialogKey ), 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 4, 5,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions)( 0 ), 0, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 2, 3,
(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
// gtk_editable_set_editable (GTK_ENTRY (entry), false);
entry.show();
gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 0, 1,
(GtkAttachOptions)( GTK_FILL ),
gtk_widget_set_can_focus( spin, false );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 1, 2,
(GtkAttachOptions)( GTK_FILL ),
gtk_widget_set_can_focus( spin, false );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 2, 3,
(GtkAttachOptions)( GTK_FILL ),
gtk_widget_set_can_focus( spin, false );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 3, 4,
(GtkAttachOptions)( GTK_FILL ),
gtk_widget_set_can_focus( spin, false );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 4, 5,
(GtkAttachOptions)( GTK_FILL ),
ui::Window window = MainFrame_getWindow().create_dialog_window("Patch density", G_CALLBACK(dialog_delete_callback ), &dialog );
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
window.add_accel_group( accel );
{
}
{
- auto combo = ui::ComboBoxText();
+ auto combo = ui::ComboBoxText(ui::New);
#define D_ITEM( x ) if ( x >= mincols && ( !maxcols || x <= maxcols ) ) gtk_combo_box_text_append_text( combo, # x )
D_ITEM( 3 );
D_ITEM( 5 );
width = combo;
}
{
- auto combo = ui::ComboBoxText();
+ auto combo = ui::ComboBoxText(ui::New);
#define D_ITEM( x ) if ( x >= minrows && ( !maxrows || x <= maxrows ) ) gtk_combo_box_text_append_text( combo, # x )
D_ITEM( 3 );
D_ITEM( 5 );
ModalDialog dialog;
ModalDialogButton ok_button( dialog, eIDOK );
ModalDialogButton cancel_button( dialog, eIDCANCEL );
- ui::Widget bevel;
- ui::Widget ibevel;
- ui::Widget endcap;
- ui::Widget iendcap;
- ui::Widget cylinder;
+ ui::Widget bevel{ui::null};
+ ui::Widget ibevel{ui::null};
+ ui::Widget endcap{ui::null};
+ ui::Widget iendcap{ui::null};
+ ui::Widget cylinder{ui::null};
ui::Window window = MainFrame_getWindow().create_modal_dialog_window( "Cap", dialog );
- auto accel_group = ui::AccelGroup();
+ auto accel_group = ui::AccelGroup(ui::New);
window.add_accel_group( accel_group );
{
#include <stack>
void PlugInMenu_Add( ui::Menu plugin_menu, IPlugIn* pPlugIn ){
- ui::Widget item, parent;
+ ui::Widget item{ui::null}, parent{ui::null};
ui::Menu menu{ui::null}, subMenu{ui::null};
const char *menuText, *menuCommand;
std::stack<ui::Menu> menuStack;
std::size_t nCount = pPlugIn->getCommandCount();
if ( nCount > 0 ) {
- menu = ui::Menu();
+ menu = ui::Menu(ui::New);
if ( g_Layout_enableDetachableMenus.m_value ) {
menu_tearoff( menu );
}
item.show();
menu.add(item);
- subMenu = ui::Menu();
+ subMenu = ui::Menu(ui::New);
gtk_menu_item_set_submenu( GTK_MENU_ITEM( item ), subMenu );
menuStack.push( menu );
menu = subMenu;
GtkTreeModel* model;
GtkTreeIter selected;
if ( gtk_tree_selection_get_selected( selection, &model, &selected ) ) {
- ui::Widget prefpage;
+ ui::Widget prefpage{ui::null};
gtk_tree_model_get( model, &selected, 1, (gpointer*)&prefpage, -1 );
dlg->showPrefPage( prefpage );
}
hbox.show();
{
- auto sc_win = ui::ScrolledWindow();
+ auto sc_win = ui::ScrolledWindow(ui::New);
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 );
sc_win.show();
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
{
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Preferences", renderer, {{"text", 0}} );
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
}
public:
-ui::Widget m_notebook;
+ui::Widget m_notebook{ui::null};
virtual ~PrefsDlg(){
g_string_free( m_rc_path, true );
if ( !g_rotate_dialog.window ) {
g_rotate_dialog.window = MainFrame_getWindow().create_dialog_window("Arbitrary rotation", G_CALLBACK(rotatedlg_delete ), &g_rotate_dialog );
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
g_rotate_dialog.window.add_accel_group( accel );
{
struct ScaleDialog
{
- ui::Entry x;
- ui::Entry y;
- ui::Entry z;
+ ui::Entry x{ui::null};
+ ui::Entry y{ui::null};
+ ui::Entry z{ui::null};
ui::Window window{ui::null};
};
if ( !g_scale_dialog.window ) {
g_scale_dialog.window = MainFrame_getWindow().create_dialog_window("Arbitrary scale", G_CALLBACK(scaledlg_delete ), &g_scale_dialog );
- auto accel = ui::AccelGroup();
+ auto accel = ui::AccelGroup(ui::New);
g_scale_dialog.window.add_accel_group( accel );
{
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.text("1.0");
entry.show();
gtk_table_attach( table, entry, 1, 2, 0, 1,
g_scale_dialog.x = entry;
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.text("1.0");
entry.show();
gtk_table_attach( table, entry, 1, 2, 1, 2,
g_scale_dialog.y = entry;
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.text("1.0");
entry.show();
gtk_table_attach( table, entry, 1, 2, 2, 3,
Increment m_hscaleIncrement;
Increment m_vscaleIncrement;
Increment m_rotateIncrement;
-ui::Entry m_texture;
+ui::Entry m_texture{ui::null};
SurfaceInspector() :
m_textureEntry( ApplyShaderCaller( *this ), UpdateCaller( *this ) ),
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_box_pack_start( GTK_BOX( hbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
m_texture = entry;
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 2, 3 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 3, 4,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
}
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 4, 5,
(GtkAttachOptions) ( GTK_FILL ),
frame.add(vbox3);
{
- auto entry = ui::Entry();
+ auto entry = ui::Entry(ui::New);
entry.show();
gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
m_valueEntryWidget = entry;
ui::Window m_parent{ui::null};
ui::GLArea m_gl_widget{ui::null};
-ui::Widget m_texture_scroll;
-ui::Widget m_treeViewTree;
-ui::Widget m_treeViewTags;
+ui::Widget m_texture_scroll{ui::null};
+ui::Widget m_treeViewTree{ui::null};
+ui::Widget m_treeViewTags{ui::null};
ui::Frame m_tag_frame{ui::null};
ui::ListStore m_assigned_store{ui::null};
ui::ListStore m_available_store{ui::null};
-ui::Widget m_assigned_tree;
-ui::Widget m_available_tree;
-ui::Widget m_scr_win_tree;
-ui::Widget m_scr_win_tags;
-ui::Widget m_tag_notebook;
+ui::Widget m_assigned_tree{ui::null};
+ui::Widget m_available_tree{ui::null};
+ui::Widget m_scr_win_tree{ui::null};
+ui::Widget m_scr_win_tags{ui::null};
+ui::Widget m_tag_notebook{ui::null};
ui::Button m_search_button{ui::null};
-ui::Widget m_shader_info_item;
+ui::Widget m_shader_info_item{ui::null};
std::set<CopiedString> m_all_tags;
ui::ListStore m_all_tags_list{ui::null};
void TextureBrowser_SetHideUnused( TextureBrowser& textureBrowser, bool hideUnused );
-ui::Widget g_page_textures;
+ui::Widget g_page_textures{ui::null};
void TextureBrowser_toggleShow(){
GroupDialog_showPage( g_page_textures );
}
void TextureBrowser_createTreeViewTree(){
- g_TextureBrowser.m_treeViewTree = ui::TreeView();
+ g_TextureBrowser.m_treeViewTree = ui::TreeView(ui::New);
gtk_tree_view_set_enable_search( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), FALSE );
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), FALSE );
g_TextureBrowser.m_treeViewTree.connect( "row-activated", (GCallback) TreeView_onRowActivated, NULL );
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), -1, "", renderer, "text", 0, NULL );
TextureBrowser_constructTreeStore();
void TextureBrowser_deleteTag();
void TextureBrowser_createContextMenu( ui::Widget treeview, GdkEventButton *event ){
- ui::Widget menu = ui::Menu();
+ ui::Widget menu = ui::Menu(ui::New);
ui::Widget menuitem = ui::MenuItem( "Add tag" );
menuitem.connect( "activate", (GCallback)TextureBrowser_addTag, treeview );
}
void TextureBrowser_createTreeViewTags(){
- g_TextureBrowser.m_treeViewTags = ui::TreeView();
+ g_TextureBrowser.m_treeViewTags = ui::TreeView(ui::New);
gtk_tree_view_set_enable_search( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), FALSE );
g_TextureBrowser.m_treeViewTags.connect( "button-press-event", (GCallback)TreeViewTags_onButtonPressed, NULL );
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), FALSE );
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), -1, "", renderer, "text", 0, NULL );
TextureBrowser_constructTreeStoreTags();
void TextureBrowser_constructSearchButton(){
ui::Widget image = ui::Widget(gtk_image_new_from_stock( GTK_STOCK_FIND, GTK_ICON_SIZE_SMALL_TOOLBAR ));
- g_TextureBrowser.m_search_button = ui::Button();
+ g_TextureBrowser.m_search_button = ui::Button(ui::New);
g_TextureBrowser.m_search_button.connect( "clicked", G_CALLBACK( TextureBrowser_searchTags ), NULL );
gtk_widget_set_tooltip_text(g_TextureBrowser.m_search_button, "Search with selected tags");
g_TextureBrowser.m_search_button.add(image);
g_TextureBrowser.m_parent = toplevel;
ui::Widget table = ui::Table( 3, 3, FALSE );
- ui::Widget frame_table;
+ ui::Widget frame_table{ui::null};
ui::Widget vbox = ui::VBox( FALSE, 0 );
gtk_table_attach( GTK_TABLE( table ), vbox, 0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
vbox.show();
- ui::Widget menu_bar;
+ ui::Widget menu_bar{ui::null};
{ // menu bar
menu_bar = ui::Widget(gtk_menu_bar_new());
- auto menu_view = ui::Menu();
+ auto menu_view = ui::Menu(ui::New);
auto view_item = TextureBrowser_constructViewMenu( menu_view );
gtk_menu_item_set_submenu( GTK_MENU_ITEM( view_item ), menu_view );
gtk_menu_shell_append( GTK_MENU_SHELL( menu_bar ), view_item );
- auto menu_tools = ui::Menu();
+ auto menu_tools = ui::Menu(ui::New);
auto tools_item = TextureBrowser_constructToolsMenu( menu_tools );
gtk_menu_item_set_submenu( GTK_MENU_ITEM( tools_item ), menu_tools );
gtk_menu_shell_append( GTK_MENU_SHELL( menu_bar ), tools_item );
menu_bar.show();
}
{ // Texture TreeView
- g_TextureBrowser.m_scr_win_tree = ui::ScrolledWindow();
+ g_TextureBrowser.m_scr_win_tree = ui::ScrolledWindow(ui::New);
gtk_container_set_border_width( GTK_CONTAINER( g_TextureBrowser.m_scr_win_tree ), 0 );
// vertical only scrolling for treeview
TextureBrowser_buildTagList();
}
{ // tag menu bar
- auto menu_tags = ui::Menu();
+ auto menu_tags = ui::Menu(ui::New);
auto tags_item = TextureBrowser_constructTagsMenu( menu_tags );
gtk_menu_item_set_submenu( GTK_MENU_ITEM( tags_item ), menu_tags );
gtk_menu_shell_append( GTK_MENU_SHELL( menu_bar ), tags_item );
}
{ // Tag TreeView
- g_TextureBrowser.m_scr_win_tags = ui::ScrolledWindow();
+ g_TextureBrowser.m_scr_win_tags = ui::ScrolledWindow(ui::New);
gtk_container_set_border_width( GTK_CONTAINER( g_TextureBrowser.m_scr_win_tags ), 0 );
// vertical only scrolling for treeview
g_TextureBrowser.m_tag_frame.add(frame_table);
}
{ // assigned tag list
- ui::Widget scrolled_win = ui::ScrolledWindow();
+ ui::Widget scrolled_win = ui::ScrolledWindow(ui::New);
gtk_container_set_border_width( GTK_CONTAINER( scrolled_win ), 0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolled_win ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
GtkTreeSortable* sortable = GTK_TREE_SORTABLE( g_TextureBrowser.m_assigned_store );
gtk_tree_sortable_set_sort_column_id( sortable, TAG_COLUMN, GTK_SORT_ASCENDING );
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
g_TextureBrowser.m_assigned_tree = ui::TreeView(ui::TreeModel( GTK_TREE_MODEL( g_TextureBrowser.m_assigned_store ) ));
g_TextureBrowser.m_assigned_store.unref();
gtk_table_attach( GTK_TABLE( frame_table ), scrolled_win, 0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
}
{ // available tag list
- ui::Widget scrolled_win = ui::ScrolledWindow();
+ ui::Widget scrolled_win = ui::ScrolledWindow(ui::New);
gtk_container_set_border_width( GTK_CONTAINER( scrolled_win ), 0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolled_win ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
GtkTreeSortable* sortable = GTK_TREE_SORTABLE( g_TextureBrowser.m_available_store );
gtk_tree_sortable_set_sort_column_id( sortable, TAG_COLUMN, GTK_SORT_ASCENDING );
- auto renderer = ui::CellRendererText();
+ auto renderer = ui::CellRendererText(ui::New);
g_TextureBrowser.m_available_tree = ui::TreeView(ui::TreeModel( GTK_TREE_MODEL( g_TextureBrowser.m_available_store ) ));
g_TextureBrowser.m_available_store.unref();
gtk_table_attach( GTK_TABLE( frame_table ), scrolled_win, 2, 3, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
}
{ // tag arrow buttons
- auto m_btn_left = ui::Button();
- auto m_btn_right = ui::Button();
+ auto m_btn_left = ui::Button(ui::New);
+ auto m_btn_right = ui::Button(ui::New);
auto m_arrow_left = ui::Widget(gtk_arrow_new( GTK_ARROW_LEFT, GTK_SHADOW_OUT ));
auto m_arrow_right = ui::Widget(gtk_arrow_new( GTK_ARROW_RIGHT, GTK_SHADOW_OUT ));
m_btn_left.add(m_arrow_left);
ASSERT_MESSAGE( tree_model != 0, "RUNTIME ERROR" );
GraphTreeNode* graph = GRAPH_TREE_MODEL( tree_model )->m_graph;
- GtkTreePath* path = ui::TreePath();
+ GtkTreePath* path = ui::TreePath(ui::New);
for ( GraphTreeNode* node = ( *graph_iterator_read_tree_iter( iter ) ).second; node != graph; node = node->m_parent )
{
item.show();
m_stack.back().first.add(item);
- auto submenu = ui::Menu();
+ auto submenu = ui::Menu(ui::New);
gtk_menu_item_set_submenu( item, GTK_WIDGET( submenu ) );
m_stack.push_back( MenuPair( submenu, name ) );
}
if ( !m_mnuDrop ) { // first time, load it up
- auto menu = m_mnuDrop = ui::Menu();
+ auto menu = m_mnuDrop = ui::Menu(ui::New);
EntityClassMenuInserter inserter( menu );
GlobalEntityClassManager().forEach( inserter );