Пример #1
0
void axScrollBar::OnMouseLeftUp(const axPoint& pos)
{
	if(IsGrabbed())
	{
		UnGrabMouse();
	}
}
Пример #2
0
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();
}
Пример #3
0
	/// @brief Performs grab logic
	void Widget::Grab (void)
	{
		if (mState->mGrabbed != 0) return;

		mState->mGrabbed = mState->mSignaled;

		IssueEvent(IsGrabbed() ? eGrab : eGrabPart);
	}
Пример #4
0
	/// @brief Performs drop logic
	void Widget::Drop (void)
	{
		if (0 == mState->mGrabbed) return;

		IssueEvent(IsGrabbed() ? eDrop : eDropPart);

		mState->mGrabbed = 0;
	}
Пример #5
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();
	}
}
Пример #6
0
void axToggle::OnMouseEnter()
{
	if (!IsGrabbed())
	{
        if(_selected)
        {
            _currentColor = &_info.selected_hover;
        }
        else
        {
            _currentColor = &_info.hover;
        }
		
		_nCurrentImg = axTOG_HOVER;
		Update();
	}
}
Пример #7
0
void axToggle::OnMouseLeave()
{
	if (!IsGrabbed())
	{
		if (_selected)
		{
			_currentColor = &_info.selected;
			_nCurrentImg = axTOG_SELECTED;
		}
		else
		{
			_currentColor = &_info.normal;
			_nCurrentImg = axTOG_NORMAL;
		}
	}

	Update();
}