void ContentBoxCtrol::OnLeftDown(wxMouseEvent& event) { wxPoint pos = event.GetPosition(); wxHtmlCell *cell; if ( !PhysicalCoordsToCell(pos, cell) ) { event.Skip(); //continue processing the event return; } SetFocus(); int item = HitTest(event.GetPosition()); if ( item != wxNOT_FOUND ) { int flags = 0; if ( event.ShiftDown() ) flags |= ItemClick_Shift; if ( event.ControlDown() ) flags |= ItemClick_Ctrl; DoHandleItemClick(item, flags); } wxHtmlWindowMouseHelper::HandleMouseClick(cell, pos, event); }
void ContentBoxCtrol::OnInternalIdle() { wxVScrolledWindow::OnInternalIdle(); if ( wxHtmlWindowMouseHelper::DidMouseMove() ) { wxPoint pos = ScreenToClient(wxGetMousePosition()); wxHtmlCell *cell; if ( !PhysicalCoordsToCell(pos, cell) ) return; wxHtmlWindowMouseHelper::HandleIdle(cell, pos); } }
void wxHtmlListBox::OnLeftDown(wxMouseEvent& event) { wxPoint pos = event.GetPosition(); wxHtmlCell *cell; if ( !PhysicalCoordsToCell(pos, cell) ) { event.Skip(); return; } if ( !wxHtmlWindowMouseHelper::HandleMouseClick(cell, pos, event) ) { // no link was clicked, so let the listbox code handle the click (e.g. // by selecting another item in the list): event.Skip(); } }