void ListBox::mouseWheelEvent(Tempest::MouseEvent &e) { if( !rect().contains(e.x+x(), e.y+y()) ){ e.ignore(); return; } dropListEnabled = false; std::shared_ptr<ListDelegate> d = listDelegate; if( d && d->size() ){ Layout& l = layout(); Widget* view = (l.widgets().size()==0 ? nullptr : l.widgets()[0]); if( e.delta < 0 ){ if( selected+1<d->size() ) d->onItemViewSelected(selected+1,view); else e.ignore(); } else if( e.delta > 0 ){ if( selected>0 ) d->onItemViewSelected(selected-1,view); else e.ignore(); } } dropListEnabled = true; }
void LineEdit::mouseDownEvent(Tempest::MouseEvent &e) { if(!editable){ e.ignore(); return; } sp = e.pos(); ep = e.pos(); updateSel(); update(); #ifdef __ANDROID__ if( editable ) AndroidAPI::toggleSoftInput(); #endif }
void ScroolWidget::mouseWheelEvent(Tempest::MouseEvent &e) { if( !rect().contains(e.x+x(), e.y+y()) || !sb.isVisible() ){ e.ignore(); return; } if( orientation()==Tempest::Vertical ) sb.setValue(sb.value() - e.delta); }
void ScroolWidget::mouseMoveEvent(Tempest::MouseEvent &e) { e.ignore(); }
void CommandsPanel::mouseDown(Tempest::MouseEvent &e) { e.accept(); }
void mouseDragEvent(Tempest::MouseEvent &e){ if( (e.pos()-ppress).manhattanLength()>15 ) closeRq = 0; }
void mouseDownEvent(Tempest::MouseEvent &e){ closeRq = 1; ppress = e.pos(); }
void DesertStrikeScenario::TranscurentPanel::mouseDownEvent(Tempest::MouseEvent &e) { e.accept(); }
void ProgressBar::mouseMoveEvent(Tempest::MouseEvent &e) { e.accept(); }