-bool wxChoice::Create(wxWindow *parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- int n, const wxString choices[],
- long style,
- const wxValidator& validator,
- const wxString& name)
+#include "wx/mac/uma.h"
+
+extern MenuHandle NewUniqueMenu() ;
+
+IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems)
+
+
+wxChoice::~wxChoice()
+{
+ if ( HasClientObjectData() )
+ {
+ unsigned int i, max = GetCount();
+
+ for ( i = 0; i < max; ++i )
+ delete GetClientObject( i );
+ }
+
+ // DeleteMenu( m_macPopUpMenuId ) ;
+ // DisposeMenu( m_macPopUpMenuHandle ) ;
+}
+
+bool wxChoice::Create(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style,
+ const wxValidator& validator,
+ const wxString& name )
+{
+ return Create(
+ parent, id, pos, size, 0, NULL,
+ style, validator, name );
+
+ Append( choices );
+
+ if ( !choices.empty() )
+ SetSelection( 0 );
+}
+
+bool wxChoice::Create(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ int n,
+ const wxString choices[],
+ long style,
+ const wxValidator& validator,
+ const wxString& name )