Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

progressbar.h

Go to the documentation of this file.
00001 /*
00002         ClanGUI, copyrights by various people. Have a look in the CREDITS file.
00003         
00004         This sourcecode is distributed using the Library GNU Public Licence,
00005         version 2 or (at your option) any later version. Please read LICENSE
00006         for details.
00007 */
00008 
00010 
00011 #ifndef header_progressbar
00012 #define header_progressbar
00013 
00014 #include "component.h"
00015 
00016 class CL_ComponentOptions;
00017 class CL_Rect;
00018 
00019 class CL_ProgressBar : public CL_Component
00020 //: ProgressBar component
00021 {
00023 public:
00024         CL_ProgressBar(
00025                 const CL_ComponentOptions &options,
00026                 CL_Component *parent,
00027                 CL_StyleManager *style = NULL);
00028 
00029         CL_ProgressBar(
00030                 const CL_Rect &pos,
00031                 int steps,
00032                 CL_Component *parent,
00033                 CL_StyleManager *style = NULL);
00034 
00035         virtual ~CL_ProgressBar();
00036 
00038 public:
00039         int get_steps() const;
00040         //: Returns the total number of steps.
00041 
00042         int get_progress() const;
00043         //: Returns the current amount of progress.
00044 
00045         float get_percentage() const;
00046         //: Returns the current amount of progress in percentage.
00047 
00049 public:
00050         void set_steps(int total_steps);
00051         //: Sets the total number of steps to total_steps. 
00052 
00053         void set_progress(int progress);
00054         //: Sets the current amount of progress of the total number of steps. 
00055 
00056         void increase(int steps = 1);
00057         //: Progresses the bar with steps.
00058 
00059         void reset();
00060         //: Reset the progress bar. The progress bar `rewinds'. 
00061 
00063 public:
00064 
00066 private:
00067         CL_ProgressBar(const CL_ProgressBar &copy) : CL_Component(NULL, NULL) { return; } // disallow copy construction.
00068         class CL_ProgressBar_Generic *impl;
00069 };
00070 
00071 #endif

Generated at Wed Apr 4 19:54:02 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001