FLTK
Fl_Progress.H
1 //
2 // Progress bar widget definitions.
3 //
4 // Copyright 2000-2010 by Michael Sweet.
5 //
6 // This library is free software. Distribution and use rights are outlined in
7 // the file "COPYING" which should have been included with this file. If this
8 // file is missing or damaged, see the license at:
9 //
10 // https://www.fltk.org/COPYING.php
11 //
12 // Please see the following page on how to report bugs and issues:
13 //
14 // https://www.fltk.org/bugs.php
15 //
16 
17 /* \file
18  Fl_Progress widget . */
19 
20 #ifndef _Fl_Progress_H_
21 # define _Fl_Progress_H_
22 
23 //
24 // Include necessary headers.
25 //
26 
27 #include "Fl_Widget.H"
28 
29 
30 //
31 // Progress class...
32 //
36 class FL_EXPORT Fl_Progress : public Fl_Widget {
37 
38  float value_,
39  minimum_,
40  maximum_;
41 
42  protected:
43 
44  virtual void draw();
45 
46  public:
47 
48  Fl_Progress(int x, int y, int w, int h, const char *l = 0);
49 
51  void maximum(float v) { maximum_ = v; redraw(); }
53  float maximum() const { return (maximum_); }
54 
56  void minimum(float v) { minimum_ = v; redraw(); }
58  float minimum() const { return (minimum_); }
59 
61  void value(float v) { value_ = v; redraw(); }
63  float value() const { return (value_); }
64 };
65 
66 #endif // !_Fl_Progress_H_
Fl_Widget is the base class for all widgets in FLTK.
Definition: Fl_Widget.H:85
void redraw()
Schedules the drawing of the widget.
Definition: Fl.cxx:1480
virtual void draw()=0
Draws the widget.
void value(float v)
Sets the current value in the progress widget.
Definition: Fl_Progress.H:61
float value() const
Gets the current value in the progress widget.
Definition: Fl_Progress.H:63
Fl_Widget, Fl_Label classes .
float maximum() const
Gets the maximum value in the progress widget.
Definition: Fl_Progress.H:53
float minimum() const
Gets the minimum value in the progress widget.
Definition: Fl_Progress.H:58
void minimum(float v)
Sets the minimum value in the progress widget.
Definition: Fl_Progress.H:56
Displays a progress bar for the user.
Definition: Fl_Progress.H:36
void maximum(float v)
Sets the maximum value in the progress widget.
Definition: Fl_Progress.H:51