GTK_TABLE(gtk_table_new(rows, columns, homogenous)))
{ }
+ TextView::TextView() : TextView(GTK_TEXT_VIEW(gtk_text_view_new()))
+ { }
+
TreePath::TreePath() : TreePath(gtk_tree_path_new())
{ }
using ui_scrolledwindow = struct _GtkScrolledWindow;
using ui_spinbutton = struct _GtkSpinButton;
using ui_table = struct _GtkTable;
+using ui_textview = struct _GtkTextView;
using ui_treemodel = struct _GtkTreeModel;
using ui_treepath = struct _GtkTreePath;
using ui_treeview = struct _GtkTreeView;
Table(std::size_t rows, std::size_t columns, bool homogenous);
);
+ WRAP(TextView, Widget, ui_textview,
+ TextView();
+ );
+
WRAP(TreeModel, Widget, ui_treemodel,);
WRAP(TreePath, Object, ui_treepath,
gtk_widget_show( scr );
{
- ui::Widget text = ui::Widget(gtk_text_view_new());
+ ui::Widget text = ui::TextView();
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 );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
{
- GtkTextView* text = GTK_TEXT_VIEW( gtk_text_view_new() );
+ GtkTextView* 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 );
GtkScrolledWindow* sc_extensions = create_scrolled_window( GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS, 4 );
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( sc_extensions ) );
{
- ui::Widget text_extensions = ui::Widget(gtk_text_view_new());
+ ui::Widget text_extensions = ui::TextView();
gtk_text_view_set_editable( GTK_TEXT_VIEW( text_extensions ), FALSE );
gtk_container_add( GTK_CONTAINER( sc_extensions ), text_extensions );
GtkTextBuffer* buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( text_extensions ) );
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::Widget(gtk_text_view_new());
+ text = ui::TextView();
gtk_container_add( GTK_CONTAINER( scr ), text );
gtk_widget_show( text );
g_object_set_data( G_OBJECT( dlg ), "text", (gpointer) text );