FLTK: Fl_Progress.H Source File

FLTK

Fl_Progress.H
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 //
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
53 void maximum(float v) { maximum_ = v; redraw(); }
55 float maximum() const { return (maximum_); }
56
58 void minimum(float v) { minimum_ = v; redraw(); }
60 float minimum() const { return (minimum_); }
61
63 void value(float v) { value_ = v; redraw(); }
65 float value() const { return (value_); }
66 };
67
68 #endif // !_Fl_Progress_H_
69
70 //
71 // End of "$Id$".
72 //
Fl_Widget.H
Fl_Widget, Fl_Label classes .
Fl_Progress::maximum
void maximum(float v)
Sets the maximum value in the progress widget.
Definition: Fl_Progress.H:53
Fl_Progress
Displays a progress bar for the user.
Definition: Fl_Progress.H:38
Fl_Progress::minimum
float minimum() const
Gets the minimum value in the progress widget.
Definition: Fl_Progress.H:60
Fl_Widget::redraw
void redraw()
Schedules the drawing of the widget.
Definition: Fl.cxx:1782
Fl_Widget
Fl_Widget is the base class for all widgets in FLTK.
Definition: Fl_Widget.H:101
Fl_Progress::value
void value(float v)
Sets the current value in the progress widget.
Definition: Fl_Progress.H:63
Fl_Progress::value
float value() const
Gets the current value in the progress widget.
Definition: Fl_Progress.H:65
Fl_Progress::minimum
void minimum(float v)
Sets the minimum value in the progress widget.
Definition: Fl_Progress.H:58
Fl_Widget::draw
virtual void draw()=0
Draws the widget.
Fl_Progress::maximum
float maximum() const
Gets the maximum value in the progress widget.
Definition: Fl_Progress.H:55
- © 1998-2016 by Bill Spitzak and others.