Added support for wxEVT_COMBOBOX_DROPDOWN and wxEVT_COMBOBOX_CLOSEUP events to wxOSX/Cocoa.
Backport of r75783. Closes #15762. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -632,6 +632,8 @@ wxMSW:
|
|||||||
wxOSX:
|
wxOSX:
|
||||||
|
|
||||||
- Fix incorrect joystick detection in configure (Lauri Nurmi).
|
- Fix incorrect joystick detection in configure (Lauri Nurmi).
|
||||||
|
- Add support for wxEVT_COMBOBOX_DROPDOWN and wxEVT_COMBOBOX_CLOSEUP
|
||||||
|
events to wxOSX/Cocoa (Igor Korot).
|
||||||
|
|
||||||
|
|
||||||
3.0.0: (released 2013-11-11)
|
3.0.0: (released 2013-11-11)
|
||||||
|
@@ -60,14 +60,14 @@
|
|||||||
@event{EVT_COMBOBOX_DROPDOWN(id, func)}
|
@event{EVT_COMBOBOX_DROPDOWN(id, func)}
|
||||||
Process a @c wxEVT_COMBOBOX_DROPDOWN event, which is generated
|
Process a @c wxEVT_COMBOBOX_DROPDOWN event, which is generated
|
||||||
when the list box part of the combo box is shown (drops down).
|
when the list box part of the combo box is shown (drops down).
|
||||||
Notice that this event is currently only supported by wxMSW and
|
Notice that this event is only supported by wxMSW, wxGTK with GTK+
|
||||||
wxGTK with GTK+ 2.10 or later.
|
2.10 or later, and wxOSX/Cocoa.
|
||||||
@event{EVT_COMBOBOX_CLOSEUP(id, func)}
|
@event{EVT_COMBOBOX_CLOSEUP(id, func)}
|
||||||
Process a @c wxEVT_COMBOBOX_CLOSEUP event, which is generated
|
Process a @c wxEVT_COMBOBOX_CLOSEUP event, which is generated
|
||||||
when the list box of the combo box disappears (closes up). This
|
when the list box of the combo box disappears (closes up). This
|
||||||
event is only generated for the same platforms as
|
event is only generated for the same platforms as
|
||||||
@c wxEVT_COMBOBOX_DROPDOWN above. Also note that only wxMSW
|
@c wxEVT_COMBOBOX_DROPDOWN above. Also note that only wxMSW and
|
||||||
supports adding or deleting items in this event.
|
wxOSX/Cocoa support adding or deleting items in this event.
|
||||||
@endEventTable
|
@endEventTable
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
|
@@ -90,6 +90,38 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)comboBoxWillPopUp:(NSNotification *)notification
|
||||||
|
{
|
||||||
|
wxUnusedVar(notification);
|
||||||
|
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
|
||||||
|
if( impl && impl->ShouldSendEvents() )
|
||||||
|
{
|
||||||
|
wxComboBox* wxpeer = static_cast<wxComboBox*>(impl->GetWXPeer());
|
||||||
|
if( wxpeer )
|
||||||
|
{
|
||||||
|
wxCommandEvent event(wxEVT_COMBOBOX_DROPDOWN, wxpeer->GetId());
|
||||||
|
event.SetEventObject( wxpeer );
|
||||||
|
wxpeer->GetEventHandler()->ProcessEvent( event );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)comboBoxWillDismiss:(NSNotification *)notification
|
||||||
|
{
|
||||||
|
wxUnusedVar(notification);
|
||||||
|
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
|
||||||
|
if( impl && impl->ShouldSendEvents() )
|
||||||
|
{
|
||||||
|
wxComboBox* wxpeer = static_cast<wxComboBox*>(impl->GetWXPeer());
|
||||||
|
if( wxpeer )
|
||||||
|
{
|
||||||
|
wxCommandEvent event(wxEVT_COMBOBOX_CLOSEUP, wxpeer->GetId());
|
||||||
|
event.SetEventObject( wxpeer );
|
||||||
|
wxpeer->GetEventHandler()->ProcessEvent( event );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)comboBoxSelectionDidChange:(NSNotification *)notification
|
- (void)comboBoxSelectionDidChange:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
wxUnusedVar(notification);
|
wxUnusedVar(notification);
|
||||||
|
Reference in New Issue
Block a user