Fl_Value_Slider.H 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // "$Id: Fl_Value_Slider.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
  3. //
  4. // Value slider header file for the Fast Light Tool Kit (FLTK).
  5. //
  6. // Copyright 1998-2010 by Bill Spitzak and others.
  7. //
  8. // This library is free software. Distribution and use rights are outlined in
  9. // the file "COPYING" which should have been included with this file. If this
  10. // file is missing or damaged, see the license at:
  11. //
  12. // http://www.fltk.org/COPYING.php
  13. //
  14. // Please report all bugs and problems on the following page:
  15. //
  16. // http://www.fltk.org/str.php
  17. //
  18. /* \file
  19. Fl_Value_Slider widget . */
  20. #ifndef Fl_Value_Slider_H
  21. #define Fl_Value_Slider_H
  22. #include "Fl_Slider.H"
  23. /**
  24. The Fl_Value_Slider widget is a Fl_Slider widget
  25. with a box displaying the current value.
  26. <P ALIGN=CENTER>\image html value_slider.png
  27. \image latex value_slider.png "Fl_Value_Slider" width=4cm
  28. */
  29. class FL_EXPORT Fl_Value_Slider : public Fl_Slider {
  30. Fl_Font textfont_;
  31. Fl_Fontsize textsize_;
  32. Fl_Color textcolor_;
  33. protected:
  34. void draw();
  35. public:
  36. int handle(int);
  37. Fl_Value_Slider(int x,int y,int w,int h, const char *l = 0);
  38. /** Gets the typeface of the text in the value box. */
  39. Fl_Font textfont() const {return textfont_;}
  40. /** Sets the typeface of the text in the value box. */
  41. void textfont(Fl_Font s) {textfont_ = s;}
  42. /** Gets the size of the text in the value box. */
  43. Fl_Fontsize textsize() const {return textsize_;}
  44. /** Sets the size of the text in the value box. */
  45. void textsize(Fl_Fontsize s) {textsize_ = s;}
  46. /** Gets the color of the text in the value box. */
  47. Fl_Color textcolor() const {return textcolor_;}
  48. /** Sets the color of the text in the value box. */
  49. void textcolor(Fl_Color s) {textcolor_ = s;}
  50. DECLARE_CLASS_CHEAP_RTTI_2(Fl_Value_Slider, Fl_Slider)
  51. };
  52. #endif
  53. //
  54. // End of "$Id: Fl_Value_Slider.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
  55. //