- printf( "\n" );
-#endif
-
- return tmp;
-}
-
-void wxComboBox::SetValue( const wxString& value )
-{
- wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
-
- GtkWidget *entry = GTK_COMBO(m_widget)->entry;
- wxString tmp = wxT("");
- if (!value.IsNull()) tmp = value;
- gtk_entry_set_text( GTK_ENTRY(entry), wxGTK_CONV( tmp ) );
-}
-
-void wxComboBox::Copy()
-{
- wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
-
- GtkWidget *entry = GTK_COMBO(m_widget)->entry;
- gtk_editable_copy_clipboard( GTK_EDITABLE(entry) DUMMY_CLIPBOARD_ARG );
-}
-
-void wxComboBox::Cut()
-{
- wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
-
- GtkWidget *entry = GTK_COMBO(m_widget)->entry;
- gtk_editable_cut_clipboard( GTK_EDITABLE(entry) DUMMY_CLIPBOARD_ARG );
-}
-
-void wxComboBox::Paste()
-{
- wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
-
- GtkWidget *entry = GTK_COMBO(m_widget)->entry;
- gtk_editable_paste_clipboard( GTK_EDITABLE(entry) DUMMY_CLIPBOARD_ARG);
-}
-
-void wxComboBox::SetInsertionPoint( long pos )
-{
- wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
-
- GtkWidget *entry = GTK_COMBO(m_widget)->entry;
- gtk_entry_set_position( GTK_ENTRY(entry), (int)pos );
-}
-
-void wxComboBox::SetInsertionPointEnd()
-{
- wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
-
- SetInsertionPoint( -1 );
-}
-
-long wxComboBox::GetInsertionPoint() const
-{
- return (long) GET_EDITABLE_POS( GTK_COMBO(m_widget)->entry );
-}
-
-long wxComboBox::GetLastPosition() const
-{
- GtkWidget *entry = GTK_COMBO(m_widget)->entry;
- int pos = GTK_ENTRY(entry)->text_length;
- return (long) pos-1;
-}
-
-void wxComboBox::Replace( long from, long to, const wxString& value )
-{
- wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
-
- GtkWidget *entry = GTK_COMBO(m_widget)->entry;
- gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to );
- if (value.IsNull()) return;
- gint pos = (gint)to;
-
-#if wxUSE_UNICODE
- wxCharBuffer buffer = wxConvUTF8.cWX2MB( value );
- gtk_editable_insert_text( GTK_EDITABLE(entry), (const char*) buffer, strlen( (const char*) buffer ), &pos );
-#else
- gtk_editable_insert_text( GTK_EDITABLE(entry), value.c_str(), value.Length(), &pos );