FLTK 1.4.0
Loading...
Searching...
No Matches
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//
36class FL_EXPORT Fl_Progress : public Fl_Widget {
37
38 float value_,
39 minimum_,
40 maximum_;
41
42 protected:
43
44 void draw() FL_OVERRIDE;
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 and Fl_Label classes.
Displays a progress bar for the user.
Definition Fl_Progress.H:36
float maximum() const
Gets the maximum value in the progress widget.
Definition Fl_Progress.H:53
float value() const
Gets the current value in the progress widget.
Definition Fl_Progress.H:63
void minimum(float v)
Sets the minimum value in the progress widget.
Definition Fl_Progress.H:56
float minimum() const
Gets the minimum value in the progress widget.
Definition Fl_Progress.H:58
void value(float v)
Sets the current value in the progress widget.
Definition Fl_Progress.H:61
void maximum(float v)
Sets the maximum value in the progress widget.
Definition Fl_Progress.H:51
Fl_Widget is the base class for all widgets in FLTK.
Definition Fl_Widget.H:104
virtual void draw()=0
Draws the widget.
void redraw()
Schedules the drawing of the widget.
Definition Fl.cxx:1586
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46