Go to the source code of this file.
|
#define | GSLC_TYPEX_GAUGE |
|
#define | gslc_ElemXGaugeCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, nMin_, nMax_, nVal_, colFrame_, colFill_, colGauge_, bVert_) |
| Create a Gauge Element in Flash. More...
|
|
|
gslc_tsElemRef * | gslc_ElemXGaugeCreate (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXGauge *pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge, bool bVert) |
| Create a Gauge Element. More...
|
|
void | gslc_ElemXGaugeSetStyle (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teXGaugeStyle nType) |
| Configure the style of a Gauge element. More...
|
|
void | gslc_ElemXGaugeSetIndicator (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor colGauge, uint16_t nIndicLen, uint16_t nIndicTip, bool bIndicFill) |
| Configure the appearance of the Gauge indicator. More...
|
|
void | gslc_ElemXGaugeSetTicks (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor colTick, uint16_t nTickCnt, uint16_t nTickLen) |
| Configure the appearance of the Gauge ticks. More...
|
|
void | gslc_ElemXGaugeUpdate (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int16_t nVal) |
| Update a Gauge element's current value. More...
|
|
void | gslc_ElemXGaugeSetFlip (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bFlip) |
| Set a Gauge element's fill direction. More...
|
|
bool | gslc_ElemXGaugeDraw (void *pvGui, void *pvElemRef, gslc_teRedrawType eRedraw) |
| Draw a gauge element on the screen. More...
|
|
bool | gslc_ElemXGaugeDrawProgressBar (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teRedrawType eRedraw) |
| Helper function to draw a gauge with style: progress bar. More...
|
|
#define gslc_ElemXGaugeCreate_P |
( |
|
pGui, |
|
|
|
nElemId, |
|
|
|
nPage, |
|
|
|
nX, |
|
|
|
nY, |
|
|
|
nW, |
|
|
|
nH, |
|
|
|
nMin_, |
|
|
|
nMax_, |
|
|
|
nVal_, |
|
|
|
colFrame_, |
|
|
|
colFill_, |
|
|
|
colGauge_, |
|
|
|
bVert_ |
|
) |
| |
Create a Gauge Element in Flash.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nElemId | Unique element ID to assign |
[in] | nPage | Page ID to attach element to |
[in] | nX | X coordinate of element |
[in] | nY | Y coordinate of element |
[in] | nW | Width of element |
[in] | nH | Height of element |
[in] | nMin_ | Minimum value of gauge for nVal comparison |
[in] | nMax_ | Maximum value of gauge for nVal comparison |
[in] | nVal_ | Starting value of gauge |
[in] | colFrame_ | Color for the gauge frame |
[in] | colFill_ | Color for the gauge background fill |
[in] | colGauge_ | Color for the gauge indicator |
[in] | bVert_ | Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal) |
- Returns
- none
Gauge drawing style.
Enumerator |
---|
GSLCX_GAUGE_STYLE_PROG_BAR |
Progress bar.
|
GSLCX_GAUGE_STYLE_RADIAL |
Radial indicator.
|
GSLCX_GAUGE_STYLE_RAMP |
Ramp indicator.
|
Create a Gauge Element.
- Draws a gauge element that represents a proportion (nVal) between nMin and nMax.
- Support gauge sub-types:
- GSLC_TYPEX_GAUGE_PROG_BAR: Horizontal or vertical box with filled region
- GSLC_TYPEX_GAUGE_RADIAL: Radial / compass indicator
- Default appearance is a horizontal progress bar, but can be changed with gslc_ElemXGaugeSetStyle())
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nElemId | Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen) |
[in] | nPage | Page ID to attach element to |
[in] | pXData | Ptr to extended element data structure |
[in] | rElem | Rectangle coordinates defining gauge size |
[in] | nMin | Minimum value of gauge for nVal comparison |
[in] | nMax | Maximum value of gauge for nVal comparison |
[in] | nVal | Starting value of gauge |
[in] | colGauge | Color for the gauge indicator |
[in] | bVert | Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal) |
- Returns
- Pointer to Element reference or NULL if failure
bool gslc_ElemXGaugeDraw |
( |
void * |
pvGui, |
|
|
void * |
pvElemRef, |
|
|
gslc_teRedrawType |
eRedraw |
|
) |
| |
Draw a gauge element on the screen.
- Parameters
-
[in] | pvGui | Void ptr to GUI (typecast to gslc_tsGui*) |
[in] | pvElemRef | Void ptr to Element reference (typecast to gslc_tsElemRef*) |
[in] | eRedraw | Redraw mode |
- Returns
- true if success, false otherwise
Helper function to draw a gauge with style: progress bar.
- Parameters
-
[in] | pGui | Ptr to GUI |
[in] | pElemRef | Ptr to Element reference |
[in] | eRedraw | Redraw status |
- Returns
- true if success, false otherwise
Set a Gauge element's fill direction.
- Setting bFlip reverses the default fill direction
- Default fill direction for horizontal gauges: left-to-right
- Default fill direction for vertical gauges: bottom-to-top
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bFlip | If set, reverse direction of fill from default |
- Returns
- none
Configure the appearance of the Gauge indicator.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | colGauge | Color of the indicator |
[in] | nIndicLen | Length of the indicator |
[in] | nIndicTip | Size of the indicator tip |
[in] | bIndicFill | Fill in the indicator if true |
- Returns
- none
Configure the style of a Gauge element.
- This function is used to select between one of several gauge types (eg. progress bar, radial dial, etc.)
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nType | Gauge style enumeration |
- Returns
- none
Configure the appearance of the Gauge ticks.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | colTick | Color of the gauge ticks |
[in] | nTickCnt | Number of ticks to draw around / along gauge |
[in] | nTickLen | Length of the tick marks to draw |
- Returns
- none
Update a Gauge element's current value.
- Note that min & max values are assigned in create()
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nVal | New value to show in gauge |
- Returns
- none