예제 #1
0
	void ScrollPane::mouseWheelUpCB( MouseEvent &mouseEvent )
	{
		if(!mouseEvent.isConsumed())
		{
			pChildVScroll->wheelScrollUp(mouseEvent.getMouseWheelChange());
		}
	}
예제 #2
0
    void TabbedArea::mousePressed(MouseEvent& mouseEvent)
    {
        if (mouseEvent.isConsumed())
        {
            return;
        }

        if (mouseEvent.getButton() == MouseEvent::LEFT)
        {
            Widget* widget = mTabContainer->getWidgetAt(mouseEvent.getX(), mouseEvent.getY());
            Tab* tab = dynamic_cast<Tab*>(widget);

            if (tab != NULL)
            {
                setSelectedTab(tab);
            }
        }

        // Request focus only if the source of the event
        // is not focusble. If the source of the event
        // is focused we don't want to steal the focus.
        if (!mouseEvent.getSource()->isFocusable())
        {
            requestFocus();
        }
    }
예제 #3
0
    void ScrollArea::mouseWheelMovedDown(MouseEvent& mouseEvent)
    {
        if (mouseEvent.isConsumed())
        {
            return;
        }

        setVerticalScrollAmount(getVerticalScrollAmount() + getChildrenArea().height / 8);

        mouseEvent.consume();
    }
예제 #4
0
    void Window::mouseDragged(MouseEvent& mouseEvent)
    {
        if (mouseEvent.isConsumed() || mouseEvent.getSource() != this)
        {
            return;
        }

        if (isMovable() && mMoved)
        {
            setPosition(mouseEvent.getX() - mDragOffsetX + getX(),
                        mouseEvent.getY() - mDragOffsetY + getY());
        }

        mouseEvent.consume();
    }
예제 #5
0
파일: Events.cpp 프로젝트: Jmos/vaca
  void onDoubleClickSignal(MouseEvent& ev)
  {
    m_console.println(String(L"DoubleClick signal received") +
		      (ev.isConsumed() ? L" (consumed)": L""));
  }