#include "iselection.h"
-#include <gtk/gtk.h>
#include <uilib/uilib.h>
+#include <gtk/gtk.h>
#include "string/string.h"
#include "scenelib.h"
void RedrawEntityList();
typedef FreeCaller<RedrawEntityList> RedrawEntityListCaller;
-typedef struct _GtkTreeView GtkTreeView;
class EntityList
{
void EntityList_SetShown( bool shown ){
- widget_set_visible( GTK_WIDGET( getEntityList().m_window ), shown );
+ widget_set_visible( getEntityList().m_window, shown );
}
void EntityList_toggleShown(){
void EntityList_constructWindow( ui::Window main_window ){
ASSERT_TRUE( !getEntityList().m_window );
- ui::Window window = ui::Window(create_persistent_floating_window( "Entity List", main_window ));
+ auto window = ui::Window(create_persistent_floating_window( "Entity List", main_window ));
window.add_accel_group(global_accel);
getEntityList().m_window = window;
{
- GtkScrolledWindow* scr = create_scrolled_window( GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
- gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( scr ) );
+ auto scr = create_scrolled_window( ui::Policy::AUTOMATIC, ui::Policy::AUTOMATIC );
+ window.add(scr);
{
ui::Widget view = ui::TreeView();
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
- gtk_widget_show( view );
- gtk_container_add( GTK_CONTAINER( scr ), view );
+ view.show();
+ scr.add(view);
getEntityList().m_tree_view = GTK_TREE_VIEW( view );
}
}