FLTK 1.3.0
Fl_Progress.H
1 //
2 // "$Id: Fl_Progress.H 8306 2011-01-24 17:04:22Z matt $"
3 //
4 // Progress bar widget definitions.
5 //
6 // Copyright 2000-2010 by Michael Sweet.
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Library General Public
10 // License as published by the Free Software Foundation; either
11 // version 2 of the License, or (at your option) any later version.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Library General Public License for more details.
17 //
18 // You should have received a copy of the GNU Library General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 // USA.
22 //
23 // Please report all bugs and problems on the following page:
24 //
25 // http://www.fltk.org/str.php
26 //
27 
28 /* \file
29  Fl_Progress widget . */
30 
31 #ifndef _Fl_Progress_H_
32 # define _Fl_Progress_H_
33 
34 //
35 // Include necessary headers.
36 //
37 
38 #include "Fl_Widget.H"
39 
40 
41 //
42 // Progress class...
43 //
47 class FL_EXPORT Fl_Progress : public Fl_Widget {
48 
49  float value_,
50  minimum_,
51  maximum_;
52 
53  protected:
54 
55  virtual void draw();
56 
57  public:
58 
59  Fl_Progress(int x, int y, int w, int h, const char *l = 0);
60 
62  void maximum(float v) { maximum_ = v; redraw(); }
64  float maximum() const { return (maximum_); }
65 
67  void minimum(float v) { minimum_ = v; redraw(); }
69  float minimum() const { return (minimum_); }
70 
72  void value(float v) { value_ = v; redraw(); }
74  float value() const { return (value_); }
75 };
76 
77 #endif // !_Fl_Progress_H_
78 
79 //
80 // End of "$Id: Fl_Progress.H 8306 2011-01-24 17:04:22Z matt $".
81 //