void ScrollPane::mouseWheelUpCB( MouseEvent &mouseEvent ) { if(!mouseEvent.isConsumed()) { pChildVScroll->wheelScrollUp(mouseEvent.getMouseWheelChange()); } }
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(); } }
void ScrollArea::mouseWheelMovedDown(MouseEvent& mouseEvent) { if (mouseEvent.isConsumed()) { return; } setVerticalScrollAmount(getVerticalScrollAmount() + getChildrenArea().height / 8); mouseEvent.consume(); }
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(); }
void onDoubleClickSignal(MouseEvent& ev) { m_console.println(String(L"DoubleClick signal received") + (ev.isConsumed() ? L" (consumed)": L"")); }