MCPcopy Create free account
hub / github.com/audacity/audacity / OnMouse

Method OnMouse

src/widgets/ExpandingToolBar.cpp:689–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

687}
688
689void 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
716void ToolBarGrabber::OnPaint(wxPaintEvent & WXUNUSED(event))
717{

Callers

nothing calls this directly

Calls 4

StartMovingMethod · 0.80
FinishMovingMethod · 0.80
UpdateMovingMethod · 0.80
SkipMethod · 0.80

Tested by

no test coverage detected