- const wxPoint &pos, const wxSize &size,
- int n, const wxString choices[],
- long style, const wxValidator& validator, const wxString &name )
+ const wxPoint &pos, const wxSize &size,
+ int n, const wxString choices[],
+ long style, const wxValidator& validator,
+ const wxString &name )
+{
+ if (!PreCreation( parent, pos, size ) ||
+ !CreateBase( parent, id, pos, size, style, validator, name ))
+ {
+ wxFAIL_MSG( wxT("wxChoice creation failed") );
+ return false;
+ }
+
+ if ( IsSorted() )
+ {
+ // if our m_strings != NULL, Append() will check for it and insert
+ // items in the correct order
+ m_strings = new wxGtkCollatedArrayString;
+ }
+
+#ifdef __WXGTK3__
+ m_widget = gtk_combo_box_text_new();
+#else
+ m_widget = gtk_combo_box_new_text();
+#endif
+ g_object_ref(m_widget);
+
+ Append(n, choices);
+
+ m_parent->DoAddChild( this );
+
+ PostCreation(size);
+
+ g_signal_connect_after (m_widget, "changed",
+ G_CALLBACK (gtk_choice_changed_callback), this);
+
+ return true;
+}
+
+wxChoice::~wxChoice()
+{
+ delete m_strings;
+}
+
+void wxChoice::SendSelectionChangedEvent(wxEventType evt_type)