void axScrollBar::OnMouseLeftUp(const axPoint& pos) { if(IsGrabbed()) { UnGrabMouse(); } }
void wxHtmlHelpFrame::OnCloseWindow(wxCloseEvent& evt) { if (!IsIconized()) { GetSize(& (m_HtmlHelpWin->GetCfgData().w), &(m_HtmlHelpWin->GetCfgData().h)); GetPosition(& (m_HtmlHelpWin->GetCfgData().x), & (m_HtmlHelpWin->GetCfgData().y)); } #ifdef __WXGTK__ if (IsGrabbed()) { RemoveGrab(); } #endif if (m_HtmlHelpWin->GetSplitterWindow() && m_HtmlHelpWin->GetCfgData().navig_on) m_HtmlHelpWin->GetCfgData().sashpos = m_HtmlHelpWin->GetSplitterWindow()->GetSashPosition(); if (m_helpController && wxDynamicCast(m_helpController, wxHtmlHelpController)) { ((wxHtmlHelpController*) m_helpController)->OnCloseFrame(evt); } evt.Skip(); }
/// @brief Performs grab logic void Widget::Grab (void) { if (mState->mGrabbed != 0) return; mState->mGrabbed = mState->mSignaled; IssueEvent(IsGrabbed() ? eGrab : eGrabPart); }
/// @brief Performs drop logic void Widget::Drop (void) { if (0 == mState->mGrabbed) return; IssueEvent(IsGrabbed() ? eDrop : eDropPart); mState->mGrabbed = 0; }
void axToggle::OnMouseLeftUp(const axPoint& pos) { if (IsGrabbed()) { UnGrabMouse(); // If mouse release if still on the toggle. if (IsMouseHoverWindow()) { // Only invert selection on toggle_on_left_up. if (!IsFlag(Flags::CLICK_ON_LEFT_DOWN, _flags)) { _selected = !_selected; } if (_selected) { _currentColor = &_info.selected_hover; } else { _currentColor = &_info.hover; } _nCurrentImg = axTOG_HOVER; // If toggle on left up. if (!IsFlag(Flags::CLICK_ON_LEFT_DOWN, _flags)) { PushEvent(Events::BUTTON_CLICK, new Msg(this, _selected, _msg)); } } else { if (_selected) { _currentColor = &_info.selected; _nCurrentImg = axTOG_SELECTED; } else { _currentColor = &_info.normal; _nCurrentImg = axTOG_NORMAL; } } Update(); } }
void axToggle::OnMouseEnter() { if (!IsGrabbed()) { if(_selected) { _currentColor = &_info.selected_hover; } else { _currentColor = &_info.hover; } _nCurrentImg = axTOG_HOVER; Update(); } }
void axToggle::OnMouseLeave() { if (!IsGrabbed()) { if (_selected) { _currentColor = &_info.selected; _nCurrentImg = axTOG_SELECTED; } else { _currentColor = &_info.normal; _nCurrentImg = axTOG_NORMAL; } } Update(); }