Flu_Progress.H 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // $Id: Flu_Progress.h,v 1.6 2004/04/10 22:10:56 jbryan Exp $
  2. /***************************************************************
  3. * FLU - FLTK Utility Widgets
  4. * Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University
  5. *
  6. * This file and its content is protected by a software license.
  7. * You should have received a copy of this license with this file.
  8. * If not, please contact the Ohio Supercomputer Center immediately:
  9. * Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212
  10. *
  11. ***************************************************************/
  12. #ifndef _FLU_PROGRESS_H
  13. #define _FLU_PROGRESS_H
  14. #include <FL/Fl_Valuator.H>
  15. #include <FL/Fl_Input.H>
  16. #include <FL/Fl_Group.H>
  17. #include "FLU/Flu_Enumerations.H"
  18. //! This class provides a simple progress widget similar to the way Fl_Slider is used for progress, except it is just for progress reporting and displays the progress value inside the widget
  19. class FLU_EXPORT Flu_Progress : public Fl_Valuator
  20. {
  21. DECLARE_CLASS_CHEAP_RTTI_2(Flu_Progress, Fl_Valuator)
  22. public:
  23. //! Normal FLTK widget constructor
  24. Flu_Progress( int x, int y, int w, int h, const char *l = 0 );
  25. //! Default destructor
  26. ~Flu_Progress();
  27. //! Override of Fl_Valuator::value() which forces a redraw only if the new value causes the integral percent to change
  28. int value( float v );
  29. //! Pass-through of Fl_Valuator::value()
  30. inline float value() const
  31. { return Fl_Valuator::value(); }
  32. protected:
  33. void draw();
  34. };
  35. #endif