FLTK
Fl_Value_Slider.H
1 //
2 // Value slider header file for the Fast Light Tool Kit (FLTK).
3 //
4 // Copyright 1998-2010 by Bill Spitzak and others.
5 //
6 // This library is free software. Distribution and use rights are outlined in
7 // the file "COPYING" which should have been included with this file. If this
8 // file is missing or damaged, see the license at:
9 //
10 // https://www.fltk.org/COPYING.php
11 //
12 // Please see the following page on how to report bugs and issues:
13 //
14 // https://www.fltk.org/bugs.php
15 //
16 
17 /* \file
18  Fl_Value_Slider widget . */
19 
20 #ifndef Fl_Value_Slider_H
21 #define Fl_Value_Slider_H
22 
23 #include "Fl_Slider.H"
24 
31 class FL_EXPORT Fl_Value_Slider : public Fl_Slider {
32  Fl_Font textfont_;
33  Fl_Fontsize textsize_;
34  Fl_Color textcolor_;
35 protected:
36  void draw();
37 public:
38  int handle(int);
39  Fl_Value_Slider(int x,int y,int w,int h, const char *l = 0);
41  Fl_Font textfont() const {return textfont_;}
43  void textfont(Fl_Font s) {textfont_ = s;}
45  Fl_Fontsize textsize() const {return textsize_;}
47  void textsize(Fl_Fontsize s) {textsize_ = s;}
49  Fl_Color textcolor() const {return textcolor_;}
51  void textcolor(Fl_Color s) {textcolor_ = s;}
52 };
53 
54 #endif
void textfont(Fl_Font s)
Sets the typeface of the text in the value box.
Definition: Fl_Value_Slider.H:43
Fl_Color textcolor() const
Gets the color of the text in the value box.
Definition: Fl_Value_Slider.H:49
The Fl_Value_Slider widget is a Fl_Slider widget with a box displaying the current value...
Definition: Fl_Value_Slider.H:31
void textcolor(Fl_Color s)
Sets the color of the text in the value box.
Definition: Fl_Value_Slider.H:51
Fl_Fontsize textsize() const
Gets the size of the text in the value box.
Definition: Fl_Value_Slider.H:45
The Fl_Slider widget contains a sliding knob inside a box.
Definition: Fl_Slider.H:59
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:1014
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:1042
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:985
void textsize(Fl_Fontsize s)
Sets the size of the text in the value box.
Definition: Fl_Value_Slider.H:47
Fl_Font textfont() const
Gets the typeface of the text in the value box.
Definition: Fl_Value_Slider.H:41
void draw()
Draws the widget.
Definition: Fl_Slider.cxx:211