void wxRichTextStyleListBox::OnLeftDoubleClick(wxMouseEvent& event) { wxVListBox::OnLeftDown(event); int item = VirtualHitTest(event.GetPosition().y); if (item != wxNOT_FOUND && !GetApplyOnSelection()) ApplyStyle(item); }
bool ContentBoxCtrol::PhysicalCoordsToCell(wxPoint& pos, wxHtmlCell*& cell) const { int n = VirtualHitTest(pos.y); if ( n == wxNOT_FOUND ) return false; // convert mouse coordinates to coords relative to item's wxHtmlCell: pos -= GetRootCellCoords(n); CacheItem(n); cell = m_cache->Get(n); return true; }
void wxVListBox::OnLeftDClick(wxMouseEvent& eventMouse) { int item = VirtualHitTest(eventMouse.GetPosition().y); if ( item != wxNOT_FOUND ) { // if item double-clicked was not yet selected, then treat // this event as a left-click instead if ( item == m_current ) { wxCommandEvent event(wxEVT_LISTBOX_DCLICK, GetId()); InitEvent(event, item); (void)GetEventHandler()->ProcessEvent(event); } else { OnLeftDown(eventMouse); } } }
void wxVListBox::OnLeftDown(wxMouseEvent& event) { SetFocus(); int item = VirtualHitTest(event.GetPosition().y); if ( item != wxNOT_FOUND ) { int flags = 0; if ( event.ShiftDown() ) flags |= ItemClick_Shift; // under Mac Apple-click is used in the same way as Ctrl-click // elsewhere #ifdef __WXMAC__ if ( event.MetaDown() ) #else if ( event.ControlDown() ) #endif flags |= ItemClick_Ctrl; DoHandleItemClick(item, flags); } }