#if wxABI_VERSION >= 20801
void OnRightDown(wxMouseEvent& event);
+ void OnMiddleDown(wxMouseEvent& event);
void OnChar(wxKeyEvent& event);
virtual void SetFocus();
+ void FireMouseEvent(wxEventType eventType, wxPoint position);
#endif
virtual void SetDropTarget( wxDropTarget *dropTarget );
BEGIN_EVENT_TABLE(wxListCtrl, wxControl)
EVT_LEFT_DOWN(wxListCtrl::OnLeftDown)
EVT_LEFT_DCLICK(wxListCtrl::OnDblClick)
+ EVT_MIDDLE_DOWN(wxListCtrl::OnMiddleDown)
EVT_RIGHT_DOWN(wxListCtrl::OnRightDown)
EVT_CHAR(wxListCtrl::OnChar)
END_EVENT_TABLE()
#if wxABI_VERSION >= 20801
void wxListCtrl::OnRightDown(wxMouseEvent& event)
{
- wxListEvent le( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, GetId() );
+ FireMouseEvent(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition());
+ event.Skip();
+}
+
+void wxListCtrl::OnMiddleDown(wxMouseEvent& event)
+{
+ FireMouseEvent(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, event.GetPosition());
+ event.Skip();
+}
+
+void wxListCtrl::FireMouseEvent(wxEventType eventType, wxPoint position)
+{
+ wxListEvent le( eventType, GetId() );
le.SetEventObject(this);
- le.m_pointDrag = event.GetPosition();
+ le.m_pointDrag = position;
le.m_itemIndex = -1;
int flags;
- long item = HitTest(event.GetPosition(), flags);
+ long item = HitTest(position, flags);
if (flags & wxLIST_HITTEST_ONITEM)
{
le.m_itemIndex = item;
}
GetEventHandler()->ProcessEvent(le);
}
-
- event.Skip();
}
void wxListCtrl::OnChar(wxKeyEvent& event)
*wxListCtrl*SetFocus*;
*wxListCtrl*OnChar*;
*wxListCtrl*OnRightDown*;
+ *wxListCtrl*OnMiddleDown*;
+ *wxListCtrl*FireMouseEvent*;
};
# symbols available since the beginning of this branch are only given