Skip to content
Snippets Groups Projects
partiviewc.cc 25.1 KiB
Newer Older
  struct stuff *st = (struct stuff *)vst;
  if(st) {
    clock_tick( st->clk );
    specks_set_timestep( ppui.st );
void parti_set_running( struct stuff *st, int on ) {
  if(clock_running(st->clk) != on) {
    if(on) Fl::add_idle( pp_stepper, st );
    else Fl::remove_idle( pp_stepper, st );
    if(st->clk) st->clk->walltimed = 1;
    clock_set_running(st->clk, on);
  }
  ppui.runstop[0]->value( on && clock_fwd(st->clk) < 0 );
  ppui.runstop[1]->value( on && clock_fwd(st->clk) > 0 );
slevy's avatar
 
slevy committed
}

void parti_set_fwd( struct stuff *st, int fwd ) {
  int fwdbtn = (fwd > 0);
  ppui.runstop[!fwdbtn]->value(0);
  ppui.runstop[fwdbtn]->value( clock_running( st->clk ) );
}

} /* end extern "C" */