2001-08-11 18:49:51 +04:00
|
|
|
//
|
2005-02-25 00:55:12 +03:00
|
|
|
// "$Id$"
|
2001-08-11 18:49:51 +04:00
|
|
|
//
|
|
|
|
// Progress bar widget definitions.
|
|
|
|
//
|
2010-11-29 00:06:39 +03:00
|
|
|
// Copyright 2000-2010 by Michael Sweet.
|
2001-08-11 18:49:51 +04:00
|
|
|
//
|
2011-07-19 08:49:30 +04:00
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
|
|
// file is missing or damaged, see the license at:
|
|
|
|
//
|
|
|
|
// http://www.fltk.org/COPYING.php
|
2001-08-11 18:49:51 +04:00
|
|
|
//
|
2005-04-16 04:13:17 +04:00
|
|
|
// Please report all bugs and problems on the following page:
|
|
|
|
//
|
|
|
|
// http://www.fltk.org/str.php
|
2001-08-11 18:49:51 +04:00
|
|
|
//
|
|
|
|
|
2008-10-15 17:46:06 +04:00
|
|
|
/* \file
|
2008-09-16 11:26:22 +04:00
|
|
|
Fl_Progress widget . */
|
|
|
|
|
2001-08-11 18:49:51 +04:00
|
|
|
#ifndef _Fl_Progress_H_
|
|
|
|
# define _Fl_Progress_H_
|
|
|
|
|
|
|
|
//
|
|
|
|
// Include necessary headers.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "Fl_Widget.H"
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Progress class...
|
|
|
|
//
|
2008-09-15 04:27:28 +04:00
|
|
|
/**
|
|
|
|
Displays a progress bar for the user.
|
|
|
|
*/
|
2011-01-24 20:04:22 +03:00
|
|
|
class FL_EXPORT Fl_Progress : public Fl_Widget {
|
|
|
|
|
2001-08-11 18:49:51 +04:00
|
|
|
float value_,
|
2002-04-19 00:37:29 +04:00
|
|
|
minimum_,
|
|
|
|
maximum_;
|
2001-08-11 18:49:51 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2002-08-14 20:49:38 +04:00
|
|
|
virtual void draw();
|
2001-08-11 18:49:51 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2002-08-14 20:49:38 +04:00
|
|
|
Fl_Progress(int x, int y, int w, int h, const char *l = 0);
|
2001-08-11 18:49:51 +04:00
|
|
|
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Sets the maximum value in the progress widget. */
|
2001-08-11 18:49:51 +04:00
|
|
|
void maximum(float v) { maximum_ = v; redraw(); }
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Gets the maximum value in the progress widget. */
|
2001-08-11 18:49:51 +04:00
|
|
|
float maximum() const { return (maximum_); }
|
|
|
|
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Sets the minimum value in the progress widget. */
|
2001-08-11 18:49:51 +04:00
|
|
|
void minimum(float v) { minimum_ = v; redraw(); }
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Gets the minimum value in the progress widget. */
|
2001-08-11 18:49:51 +04:00
|
|
|
float minimum() const { return (minimum_); }
|
|
|
|
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Sets the current value in the progress widget. */
|
2001-08-11 18:49:51 +04:00
|
|
|
void value(float v) { value_ = v; redraw(); }
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Gets the current value in the progress widget. */
|
2001-08-11 18:49:51 +04:00
|
|
|
float value() const { return (value_); }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // !_Fl_Progress_H_
|
|
|
|
|
|
|
|
//
|
2005-02-25 00:55:12 +03:00
|
|
|
// End of "$Id$".
|
2001-08-11 18:49:51 +04:00
|
|
|
//
|