Algorithmic Solutions > LEDA > LEDA Guide > Windows and Panels > Panel Items > Example Progress Indicator

Example Progress Indicator

The following program uses a slider item to visualize the increasing value of a counter.

On the right there is a screenshot of the program.

Picture of Convex Hull
#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;
}

See also:

Windows and Panels

Panel Items


Manual Pages:

Manual Page Windows




Please send any suggestions, comments or questions to leda@algorithmic-solutions.com
© Copyright 2001-2003, Algorithmic Solutions Software GmbH