1 //
2 // "$Id$"
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 
19 /* \file
20    Fl_Value_Slider widget . */
21 
22 #ifndef Fl_Value_Slider_H
23 #define Fl_Value_Slider_H
24 
25 #include "Fl_Slider.H"
26 
27 /**
28   The Fl_Value_Slider widget is a Fl_Slider widget
29   with a box displaying the current value.
30   <P ALIGN=CENTER>\image html value_slider.png
31   \image latex  value_slider.png "Fl_Value_Slider" width=4cm
32 */
33 class FL_EXPORT Fl_Value_Slider : public Fl_Slider {
34     Fl_Font textfont_;
35     Fl_Fontsize textsize_;
36     Fl_Color textcolor_;
37 protected:
38     void draw();
39 public:
40     int handle(int);
41     Fl_Value_Slider(int x,int y,int w,int h, const char *l = 0);
42     /**    Gets the typeface of the text in the value box.  */
textfont()43     Fl_Font textfont() const {return textfont_;}
44     /**    Sets the typeface of the text in the value box.  */
textfont(Fl_Font s)45     void textfont(Fl_Font s) {textfont_ = s;}
46     /**    Gets the size of the text in the value box.  */
textsize()47     Fl_Fontsize textsize() const {return textsize_;}
48     /**    Sets the size of the text in the value box.  */
textsize(Fl_Fontsize s)49     void textsize(Fl_Fontsize s) {textsize_ = s;}
50     /**    Gets the color of the text in the value box.  */
textcolor()51     Fl_Color textcolor() const {return textcolor_;}
52     /**    Sets the color of the text in the value box.  */
textcolor(Fl_Color s)53     void textcolor(Fl_Color s) {textcolor_ = s;}
54 };
55 
56 #endif
57 
58 //
59 // End of "$Id$".
60 //
61