Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_ProgressBar.h

00001 /*
00002  * $Id: Fl_ProgressBar.h,v 1.7 2003/04/01 00:59:55 parshin Exp $
00003  *
00004  * Extended Fast Light Toolkit (EFLTK)
00005  * Copyright (C) 2002-2003 by EDE-Team
00006  * WWW: http://www.sourceforge.net/projects/ede
00007  *
00008  * Fast Light Toolkit (FLTK)
00009  * Copyright (C) 1998-2003 by Bill Spitzak and others.
00010  * WWW: http://www.fltk.org
00011  *
00012  * This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00013  * version 2. See COPYING for details.
00014  *
00015  * Author : Mikko Lahteenmaki
00016  * Email  : mikko@fltk.net
00017  *
00018  * Please report all bugs and problems to "efltk-bugs@fltk.net"
00019  *
00020  */
00021 
00022 #ifndef _FL_PROGRESSBAR_H_
00023 #define _FL_PROGRESSBAR_H_
00024 
00025 #include "Fl_Widget.h"
00026 #include "Fl.h"
00027 #include "fl_draw.h"
00028 
00030 class FL_API Fl_ProgressBar : public Fl_Widget
00031 {
00032 public:
00033     static Fl_Named_Style* default_style;
00034 
00036     Fl_ProgressBar(int x, int y, int w, int h, const char *lbl = 0);
00037 
00039     Fl_ProgressBar(const char* l = 0,int layout_size=30,Fl_Align layout_al=FL_ALIGN_TOP,int label_w=100);
00040 
00041     void range(float min, float max, float step = 1)  { mMin = min; mMax = max; mStep = step; };
00042 
00043     float minimum() { return mMin; }
00044     float maximum() { return mMax; }
00045     void minimum(float nm) { mMin = nm; };
00046     void maximum(float nm) { mMax = nm; };
00047 
00048     void step(float step) { mPresent += step; redraw(); };
00049     float step()      { return mStep; }
00050 
00051     void  value(float v) { mPresent = v; redraw(); }
00052     float value() const  { return mPresent; }
00053 
00054     void showtext(bool st) { mShowPct = st; }
00055     bool showtext()    { return mShowPct; }
00056 
00057     virtual void draw();
00058 
00059 protected:
00060     float mMin, mMax;
00061     float mPresent, mStep;
00062     bool mShowPct;
00063 };
00064 
00065 #endif

Generated on Thu Jul 31 15:33:44 2003 for eFLTK by doxygen1.2.15