Example #1
0
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;
  }
Example #2
0
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
  }
Example #3
0
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);
  }
Example #4
0
void ScroolWidget::mouseMoveEvent(Tempest::MouseEvent &e) {
  e.ignore();
  }
Example #5
0
void CommandsPanel::mouseDown(Tempest::MouseEvent &e) {
  e.accept();
  }
Example #6
0
 void mouseDragEvent(Tempest::MouseEvent &e){
   if( (e.pos()-ppress).manhattanLength()>15 )
     closeRq = 0;
   }
Example #7
0
 void mouseDownEvent(Tempest::MouseEvent &e){
   closeRq = 1;
   ppress = e.pos();
   }
Example #8
0
void DesertStrikeScenario::TranscurentPanel::mouseDownEvent(Tempest::MouseEvent &e) {
  e.accept();
  }
Example #9
0
void ProgressBar::mouseMoveEvent(Tempest::MouseEvent &e) {
  e.accept();
  }