-#ifdef __WXGTK13__
- /* a multi-line edit control: create a vertical scrollbar by default and
- horizontal if requested */
- bool bHasHScrollbar = (style & wxHSCROLL) != 0;
-#else
- bool bHasHScrollbar = FALSE;
-#endif
+#ifdef __WXGTK20__
+ // Create view
+ m_text = gtk_text_view_new();
+
+ buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(m_text) );
+
+ // create scrolled window
+ m_widget = gtk_scrolled_window_new( NULL, NULL );
+ gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( m_widget ),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
+
+ // Insert view into scrolled window
+ gtk_container_add( GTK_CONTAINER(m_widget), m_text );
+
+ // Global settings which can be overridden by tags, I guess.
+ if (HasFlag( wxHSCROLL ))
+ gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_NONE );
+ else
+ gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_WORD );