| #include <LEDA/graphics/panel.h>
using namespace leda;
int main()
{
  int count=0;
  panel P(100,80);
  P.set_item_width(100);
  P.int_item("progress ",count,0,1000);
  P.display(window::center,window::center);
  for (;;) {
    count=0;
    
    while (count<1000) {
      P.redraw_panel();
      P.flush();
      leda_wait(0.02);
      count++;
    }
    if (P.read_mouse()==MOUSE_BUTTON(3)) break;
  }
  
  P.screenshot("progress");
  return 0;
} |