- Corrected default button size handling for different themes.
- Corrected splitter sash size and look for different themes.
- Fixed keyboard input for dead-keys.
+- Added support for wxTE_LINEWRAP (Mart Raudsepp)
wxMac:
// 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 ) || HasFlag( wxTE_DONTWRAP ))
+ // translate wx wrapping style to GTK+
+ if ( HasFlag( wxTE_DONTWRAP ) )
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 );
+ else if ( HasFlag( wxTE_LINEWRAP ) )
+ gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_CHAR );
+ else // HasFlag(wxTE_WORDWRAP) always true as wxTE_WORDWRAP == 0
+ gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_WORD_CHAR );
if (!HasFlag(wxNO_BORDER))
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(m_widget), GTK_SHADOW_IN );
gtk_widget_add_events( GTK_WIDGET(m_text), GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK );
GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
-#else
+#else // GTK+ 1
// create our control ...
m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
GTK_FILL,
(GtkAttachOptions)(GTK_EXPAND | GTK_FILL | GTK_SHRINK),
0, 0);
-#endif
+#endif // GTK+ 2/1
}
else
{
// 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 ) || HasFlag( wxTE_DONTWRAP ))
+ // translate wx wrapping style to GTK+
+ if ( HasFlag( wxTE_DONTWRAP ) )
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 );
+ else if ( HasFlag( wxTE_LINEWRAP ) )
+ gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_CHAR );
+ else // HasFlag(wxTE_WORDWRAP) always true as wxTE_WORDWRAP == 0
+ gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW( m_text ), GTK_WRAP_WORD_CHAR );
if (!HasFlag(wxNO_BORDER))
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(m_widget), GTK_SHADOW_IN );
gtk_widget_add_events( GTK_WIDGET(m_text), GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK );
GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
-#else
+#else // GTK+ 1
// create our control ...
m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
GTK_FILL,
(GtkAttachOptions)(GTK_EXPAND | GTK_FILL | GTK_SHRINK),
0, 0);
-#endif
+#endif // GTK+ 2/1
}
else
{