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