FLTK 1.4.5: Fl_Value_Output.H Source File

FLTK 1.4.5

Loading...
Searching...
No Matches
Fl_Value_Output.H
1//
2// Value output header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2022 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_Output widget . */
19
20#ifndef Fl_Value_Output_H
21#define Fl_Value_Output_H
22
23#ifndef Fl_Valuator_H
24#include "Fl_Valuator.H"
25#endif
26
39 class FL_EXPORT Fl_Value_Output : public Fl_Valuator {
40 Fl_Font textfont_;
41 Fl_Fontsize textsize_;
42 uchar soft_;
43 Fl_Color textcolor_;
44
45protected:
46 void draw() FL_OVERRIDE;
47
48public:
49 int handle(int) FL_OVERRIDE;
50 Fl_Value_Output(int x,int y,int w,int h,const char *l=0);
51
58 void soft(uchar s) {soft_ = s;}
65 uchar soft() const {return soft_;}
66
68 Fl_Font textfont() const {return textfont_;}
70 void textfont(Fl_Font s) {textfont_ = s;}
72 Fl_Fontsize textsize() const {return textsize_;}
73 void textsize(Fl_Fontsize s) {textsize_ = s;}
75 Fl_Color textcolor() const {return textcolor_;}
77 void textcolor(Fl_Color s) {textcolor_ = s;}
78};
79
80#endif
Fl_Font
int Fl_Font
A font number is an index into the internal font table.
Definition Enumerations.H:1063
Fl_Color
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition Enumerations.H:1120
Fl_Fontsize
int Fl_Fontsize
Size of a font in pixels.
Definition Enumerations.H:1092
Fl_Valuator::Fl_Valuator
Fl_Valuator(int X, int Y, int W, int H, const char *L)
Creates a new Fl_Valuator widget using the given position, size, and label string.
Definition Fl_Valuator.cxx:26
Fl_Value_Output::textfont
Fl_Font textfont() const
Gets the typeface of the text in the value box.
Definition Fl_Value_Output.H:68
Fl_Value_Output::handle
int handle(int) FL_OVERRIDE
Handles the specified event.
Definition Fl_Value_Output.cxx:44
Fl_Value_Output::textcolor
void textcolor(Fl_Color s)
Gets the color of the text in the value box.
Definition Fl_Value_Output.H:77
Fl_Value_Output::textsize
Fl_Fontsize textsize() const
Gets the size of the text in the value box.
Definition Fl_Value_Output.H:72
Fl_Value_Output::textfont
void textfont(Fl_Font s)
Sets the typeface of the text in the value box.
Definition Fl_Value_Output.H:70
Fl_Value_Output::textcolor
Fl_Color textcolor() const
Sets the color of the text in the value box.
Definition Fl_Value_Output.H:75
Fl_Value_Output::Fl_Value_Output
Fl_Value_Output(int x, int y, int w, int h, const char *l=0)
Creates a new Fl_Value_Output widget using the given position, size, and label string.
Definition Fl_Value_Output.cxx:85
Fl_Value_Output::soft
void soft(uchar s)
If "soft" is turned on, the user is allowed to drag the value outside the range.
Definition Fl_Value_Output.H:58
Fl_Value_Output::soft
uchar soft() const
If "soft" is turned on, the user is allowed to drag the value outside the range.
Definition Fl_Value_Output.H:65
Fl_Value_Output::draw
void draw() FL_OVERRIDE
Draws the widget.
Definition Fl_Value_Output.cxx:25
Fl_Widget::x
void x(int v)
Internal use only.
Definition Fl_Widget.H:150
Fl_Widget::w
void w(int v)
Internal use only.
Definition Fl_Widget.H:154
Fl_Widget::y
void y(int v)
Internal use only.
Definition Fl_Widget.H:152
Fl_Widget::h
void h(int v)
Internal use only.
Definition Fl_Widget.H:156
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
uchar
unsigned char uchar
unsigned char
Definition fl_types.h:30