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