// For compilers that support precompilation, includes "wx.h".
#include "wx/choice.h"
+#include "wx/menu.h"
#include "wx/mac/uma.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
#endif
+short nextMenuId = 100 ; // wxMenu takes the lower ids
+
+wxChoice::~wxChoice()
+{
+ // DeleteMenu( m_macPopUpMenuId ) ;
+ DisposeMenu( m_macPopUpMenuHandle ) ;
+}
+
bool wxChoice::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
- int n, const wxString choices[],
- long style,
+ int n, const wxString choices[],
+ long style,
const wxValidator& validator,
const wxString& name)
{
MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
+ m_macPopUpMenuHandle = NewMenu( 1 , "\pPopUp Menu" ) ;
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , -12345 , 0 ,
kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
SetControlMaximum( m_macControl , Number()) ;
}
+void wxChoice::Append(const wxString &item, void *client_data)
+{
+}
+
+void *wxChoice::GetClientData(int index) const
+{
+ return NULL;
+}
+
void wxChoice::Delete(int n)
{
::DeleteMenuItem( m_macPopUpMenuHandle , n + 1) ;