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:
|
|
|
|
//
|
2020-07-01 19:03:10 +03:00
|
|
|
// https://www.fltk.org/COPYING.php
|
2001-08-11 18:49:51 +04:00
|
|
|
//
|
2020-07-01 19:03:10 +03:00
|
|
|
// Please see the following page on how to report bugs and issues:
|
2005-04-16 04:13:17 +04:00
|
|
|
//
|
2020-07-01 19:03:10 +03:00
|
|
|
// https://www.fltk.org/bugs.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 {
|
2020-07-01 19:03:10 +03:00
|
|
|
|
|
|
|
float value_,
|
|
|
|
minimum_,
|
|
|
|
maximum_;
|
2001-08-11 18:49:51 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2022-12-30 21:14:36 +03:00
|
|
|
void draw() FL_OVERRIDE;
|
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. */
|
2020-07-01 19:03:10 +03:00
|
|
|
void maximum(float v) { maximum_ = v; redraw(); }
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Gets the maximum value in the progress widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
float maximum() const { return (maximum_); }
|
2001-08-11 18:49:51 +04:00
|
|
|
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Sets the minimum value in the progress widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
void minimum(float v) { minimum_ = v; redraw(); }
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Gets the minimum value in the progress widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
float minimum() const { return (minimum_); }
|
2001-08-11 18:49:51 +04:00
|
|
|
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Sets the current value in the progress widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
void value(float v) { value_ = v; redraw(); }
|
2008-09-15 04:27:28 +04:00
|
|
|
/** Gets the current value in the progress widget. */
|
2020-07-01 19:03:10 +03:00
|
|
|
float value() const { return (value_); }
|
2001-08-11 18:49:51 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // !_Fl_Progress_H_
|