/////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/combobxc.cpp
+// Name: src/osx/carbon/combobxc.cpp
// Purpose: wxComboBox class using HIView ComboBox
// Author: Stefan Csomor
// Modified by:
#endif
#endif
-IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
-
#if TARGET_API_MAC_OSX
#define USE_HICOMBOBOX 1 //use hi combobox define
#else
// delete the controls now, don't leave them alive even though they would
// still be eventually deleted by our parent - but it will be too late, the
// user code expects them to be gone now
- if (m_text != NULL) {
- delete m_text;
- m_text = NULL;
- }
- if (m_choice != NULL) {
- delete m_choice;
- m_choice = NULL;
- }
+ wxDELETE( m_text );
+ wxDELETE( m_choice );
}
m_text = NULL;
m_choice = NULL;
#if USE_HICOMBOBOX
- m_macIsUserPane = false;
+ DontCreatePeer();
#endif
if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style ,
wxDefaultValidator, name) )
{
m_text = new wxComboBoxText( this );
}
- else if ( ( m_text != NULL ) && !editable )
+ else if ( !editable )
{
- delete m_text;
- m_text = NULL;
+ wxDELETE(m_text);
}
int currentX, currentY;
#endif
}
-wxInt32 wxComboBox::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) )
+bool wxComboBox::OSXHandleClicked( double timestampsec )
{
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
event.SetInt(GetSelection());
event.SetEventObject(this);
event.SetString(GetStringSelection());
ProcessCommand(event);
- return noErr;
+ return true;
}