]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/combobox.cpp
make sure wxNativeFontInfo is defined
[wxWidgets.git] / src / gtk / combobox.cpp
index fe74ecbd95c4831f84e7f2c3319ce46f085ccbab..23f4becc49755e90ab41da9374a2566234b29be9 100644 (file)
@@ -64,8 +64,6 @@ gtkcombobox_popupshown_callback(GObject *WXUNUSED(gobject),
 // wxComboBox
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxChoice)
-
 BEGIN_EVENT_TABLE(wxComboBox, wxChoice)
     EVT_CHAR(wxComboBox::OnChar)
 
@@ -118,7 +116,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
     }
 
     if (HasFlag(wxCB_SORT))
-        m_strings = new wxSortedArrayString();
+        m_strings = new wxGtkCollatedArrayString();
 
     GTKCreateComboBoxWidget();
 
@@ -276,6 +274,14 @@ wxComboBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
     return GetDefaultAttributesFromGTKWidget(gtk_combo_box_entry_new, true);
 }
 
+void wxComboBox::SetValue(const wxString& value)
+{
+    if ( HasFlag(wxCB_READONLY) )
+        SetStringSelection(value);
+    else
+        wxTextEntry::SetValue(value);
+}
+
 // ----------------------------------------------------------------------------
 // standard event handling
 // ----------------------------------------------------------------------------
@@ -352,19 +358,11 @@ void wxComboBox::OnUpdateSelectAll(wxUpdateUIEvent& event)
 
 void wxComboBox::Popup()
 {
-    gtk_combo_box_popup( GTK_COMBO_BOX(m_widget) );
-
-    wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_DROPDOWN, GetId() );
-    event.SetEventObject( this );
-    HandleWindowEvent( event );
+     gtk_combo_box_popup( GTK_COMBO_BOX(m_widget) );
 }
 
 void wxComboBox::Dismiss()
 {
     gtk_combo_box_popdown( GTK_COMBO_BOX(m_widget) );
-
-    wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_CLOSEUP, GetId() );
-    event.SetEventObject( this );
-    HandleWindowEvent( event );
 }
 #endif // wxUSE_COMBOBOX