Fl_Gauge V0.0.6
Copyright 2004 Michael Pearce
Document Started: 3 August 2004
Last Updated: 6 August 2004
class Fl_Gauge
Class Hierarchy
Fl_Widget
|
+----Fl_Gauge
Include Files
#include <Fl_Gauge.H>
Description
This widget draws a round gauge dial that operates over 270 degrees.
Features Include:
Min and Max values can be set
Red-Line limit setable, displayed and can beep or call a callback function.
All Colours changeable.
Secondary value as text display, or can be used to show primary value.
Odometer display value possible.
Methods
The constructor creates the plotting area using the position, size, and label.
The destructor - does nothing.
The first form returns the color of the dial.
The second form sets the color of the dial.
The first form returns the font number used.
The second form sets the font used.
Uses the standard FL_FONT system.
The first form returns the font size used.
The second form sets the font size used.
The first form returns the frame color.
The Second form sets the frame color.
Sets the callback to use for the greenzone.
The first form returns the Green Zone color.
The second form sets the Green Zone color.
The first form returns the currnet green zone end position.
The Second form sets the green zone end position.
The first form return the current green zone mode.
The Second form sets the green zone mode.
Options are:
FL_GAUGE_GZ_OFF - Turn greenzone OFF
FL_GAUGE_GZ_ON - Display the green zone
FL_GAUGE_GZ_BEEP - Display and Beep if OUT of zone
FL_GAUGE_GZ_CBIN - Display and use callback if IN zone
FL_GAUGE_GZ_CBOUT - Display and use callback if OUT of zone
The first form returns the current green zone start position.
The Second form sets the green zone start position.
The first form returns the maximum displayable value.
The second form sets the maximum displayable value
The first form returns the minimum displayable value.
The second form sets the minimum displayable value
The first for returns the odometer text color.
The second form sets the odometer text color.
Decrements the odometer by the odoinc size.
The first form returns the odometer value
The second form sets the odometer value
The first form returns the odometer mode.
The second form sets the odometer mode.
The options are:
FL_GAUGE_ODO_OFF - OFF
FL_GAUGE_ODO_ON - ON
Sets or reads the odometer format code %0r.0clf
If r and c are zero then the current settings are returned.
returns 1 for values read or 0 for values set.
Increments the odometer by the odoinc size.
The first form returns the odometer increment size.
The second form sets the odometer increment size.
Sets or reads the dials text format code %0r.0clf
If r and c are zero then the current settings are returned.
returns 1 for values read or 0 for values set.
The first form returns the pointer color.
The second form sets the pointer color.
Set the callback for the red line alert mode.
The first form returns the Red-Line color.
The second form sets the Red-Line color.
The first form return the current red line mode.
The Second form sets the red line mode.
Options are:
FL_GAUGE_RL_OFF - Turn red line OFF
FL_GAUGE_RL_ON - Display the red line
FL_GAUGE_RL_BEEP - Display and Beep if OUT of zone
FL_GAUGE_RL_CBIN - Display and use callback if IN zone
FL_GAUGE_RL_CBOUT - Display and use callback if OUT of zone
The first form returns the starting position of the red-line range.
The second form sets the starting position of teh red-line range.
The first form returns the size of the major step markings
The second form sets the size of the major step markings
The first form returns the size of the minor step markings.
The second form sets the size of the minor step markings.
The first form returns the scales/text color.
The second form sets the scales/text color.
The first form returns the type of gauge drawn.
The second form sets the type of gauge drawn.
Possible values are:
FL_GAUGE_ROUND - Standard 270 degree round gauge
FL_GAUGE_SQUARE - 180 degree Square outline gauge*
FL_GAUGE_LINEAR - Linear (Vertical) gauge*
FL_GAUGE_DIGITAL - Digital segments gauge*
*These are not yet implimented but are possible future additions.
The first for returns the second values text color.
The second form sets the second values text color.
The first form returns the secondary value mode.
The second form sets the secondary value mode.
The options are:
FL_GAUGE_V2_NONE - Not Displayed
FL_GAUGE_V2_ON - Displayed as secondary value
FL_GAUGE_V2_V1 - Displayed as primary value
FL_GAUGE_V2_TRIP - Displayed and works like trip counter - linked to odometer.
Sets or reads the secondary value format code %0r.0clf
If r and c are zero then the current settings are returned.
returns 1 for values read or 0 for values set.
The first form returns the current value of the gauge.
The second form sets the value for the gauge.
The first form returns the secondary value.
The second for sets the secondary value.
Returns the version string of the widget.
Future plans
Following are possible future additions - ideas and comments welcome.
Add values around dial.
Add other styles of dials - e.g. Square 90 Degree, Linear, Digital etc
Known Problems
STILL ALPHA - Will have missing features!!
Please let me know of any bugs you may find.
All content Copyright 2004 Michael Pearce All Rights Reserved.
Email: mike AT kiwacan DOT co DOT nz
Web: http://www.kiwacan.co.nz/fltk/fltk.html