| 687 | } |
| 688 | |
| 689 | void ToolBarGrabber::OnMouse(wxMouseEvent &event) |
| 690 | { |
| 691 | int prevState = mState; |
| 692 | |
| 693 | // Handle highlighting the image if the mouse is over it |
| 694 | |
| 695 | if (event.Entering()) |
| 696 | mState = 1; |
| 697 | else if (event.Leaving()) |
| 698 | mState = 0; |
| 699 | else { |
| 700 | wxSize clientSize = GetClientSize(); |
| 701 | |
| 702 | if (event.m_x >= 0 && event.m_y >= 0 && |
| 703 | event.m_x < clientSize.x && event.m_y < clientSize.y) |
| 704 | mState = 1; |
| 705 | else |
| 706 | mState = 0; |
| 707 | } |
| 708 | |
| 709 | if (event.ButtonDown()) |
| 710 | mOwnerToolBar->StartMoving(); |
| 711 | |
| 712 | if (mState != prevState) |
| 713 | Refresh(false); |
| 714 | } |
| 715 | |
| 716 | void ToolBarGrabber::OnPaint(wxPaintEvent & WXUNUSED(event)) |
| 717 | { |
nothing calls this directly
no test coverage detected