Flu_Progress.h 1.4 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. public:
  22. //! Normal FLTK widget constructor
  23. Flu_Progress( int x, int y, int w, int h, const char *l = 0 );
  24. //! Default destructor
  25. ~Flu_Progress();
  26. //! Override of Fl_Valuator::value() which forces a redraw only if the new value causes the integral percent to change
  27. int value( float v );
  28. //! Pass-through of Fl_Valuator::value()
  29. inline float value() const
  30. { return Fl_Valuator::value(); }
  31. protected:
  32. void draw();
  33. };
  34. #endif