+GtkEditable *wxTextCtrl::GetEditable() const
+{
+ wxCHECK_MSG( IsSingleLine(), NULL, "shouldn't be called for multiline" );
+
+ return GTK_EDITABLE(m_text);
+}
+
+GtkEntry *wxTextCtrl::GetEntry() const
+{
+ return GTK_ENTRY(m_text);
+}
+
+int wxTextCtrl::GTKIMFilterKeypress(GdkEventKey* event) const
+{
+#if GTK_CHECK_VERSION(2, 22, 0)
+ if ( gtk_check_version(2, 12, 0) == 0 )
+ {
+ if ( IsSingleLine() )
+ {
+ return wxTextEntry::GTKIMFilterKeypress(event);
+ }
+ else
+ {
+ return gtk_text_view_im_context_filter_keypress(
+ GTK_TEXT_VIEW(m_text),
+ event
+ );
+ }
+ }
+#else // GTK+ < 2.22
+ wxUnusedVar(event);
+#endif // GTK+ 2.22+
+
+ return FALSE;
+}
+
+// ----------------------------------------------------------------------------
+// flags handling
+// ----------------------------------------------------------------------------
+
+void wxTextCtrl::GTKSetEditable()
+{
+ gboolean editable = !HasFlag(wxTE_READONLY);
+ if ( IsSingleLine() )
+ gtk_editable_set_editable(GTK_EDITABLE(m_text), editable);
+ else
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(m_text), editable);
+}
+
+void wxTextCtrl::GTKSetVisibility()
+{
+ wxCHECK_RET( IsSingleLine(),
+ "wxTE_PASSWORD is for single line text controls only" );
+
+ gtk_entry_set_visibility(GTK_ENTRY(m_text), !HasFlag(wxTE_PASSWORD));
+}
+
+void wxTextCtrl::GTKSetActivatesDefault()
+{
+ wxCHECK_RET( IsSingleLine(),
+ "wxTE_PROCESS_ENTER is for single line text controls only" );