GUIslice
0.16.0
Embedded GUI in C
|
#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XRadial.h"
#include <stdio.h>
#include <math.h>
Functions | |
gslc_tsElemRef * | gslc_ElemXRadialCreate (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXRadial *pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge) |
Create a Radial Gauge Element. More... | |
void | gslc_ElemXRadialSetIndicator (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_ElemXRadialSetTicks (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_ElemXRadialSetVal (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int16_t nVal) |
Update a Gauge element's current value. More... | |
void | gslc_ElemXRadialSetFlip (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bFlip) |
Set a Gauge element's rotation direction. More... | |
bool | gslc_ElemXRadialDraw (void *pvGui, void *pvElemRef, gslc_teRedrawType eRedraw) |
Draw a gauge element on the screen. More... | |
void | gslc_ElemXRadialDrawRadialHelp (gslc_tsGui *pGui, int16_t nX, int16_t nY, uint16_t nArrowLen, uint16_t nArrowSz, int16_t n64Ang, bool bFill, gslc_tsColor colFrame) |
bool | gslc_ElemXRadialDrawRadial (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teRedrawType eRedraw) |
Helper function to draw a gauge with style: radial. More... | |
Variables | |
const char GSLC_PMEM | ERRSTR_NULL [] |
const char GSLC_PMEM | ERRSTR_PXD_NULL [] |
gslc_tsElemRef* gslc_ElemXRadialCreate | ( | gslc_tsGui * | pGui, |
int16_t | nElemId, | ||
int16_t | nPage, | ||
gslc_tsXRadial * | pXData, | ||
gslc_tsRect | rElem, | ||
int16_t | nMin, | ||
int16_t | nMax, | ||
int16_t | nVal, | ||
gslc_tsColor | colGauge | ||
) |
Create a Radial Gauge Element.
[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 |
bool gslc_ElemXRadialDraw | ( | void * | pvGui, |
void * | pvElemRef, | ||
gslc_teRedrawType | eRedraw | ||
) |
Draw a gauge element on the screen.
[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 |
bool gslc_ElemXRadialDrawRadial | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_teRedrawType | eRedraw | ||
) |
Helper function to draw a gauge with style: radial.
[in] | pGui | Ptr to GUI |
[in] | pElemRef | Ptr to Element reference |
[in] | eRedraw | Redraw status |
void gslc_ElemXRadialDrawRadialHelp | ( | gslc_tsGui * | pGui, |
int16_t | nX, | ||
int16_t | nY, | ||
uint16_t | nArrowLen, | ||
uint16_t | nArrowSz, | ||
int16_t | n64Ang, | ||
bool | bFill, | ||
gslc_tsColor | colFrame | ||
) |
void gslc_ElemXRadialSetFlip | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
bool | bFlip | ||
) |
Set a Gauge element's rotation direction.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bFlip | If set, reverse direction of rotation from default |
void gslc_ElemXRadialSetIndicator | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_tsColor | colGauge, | ||
uint16_t | nIndicLen, | ||
uint16_t | nIndicTip, | ||
bool | bIndicFill | ||
) |
Configure the appearance of the Gauge indicator.
[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 |
void gslc_ElemXRadialSetTicks | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_tsColor | colTick, | ||
uint16_t | nTickCnt, | ||
uint16_t | nTickLen | ||
) |
Configure the appearance of the Gauge ticks.
[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 |
void gslc_ElemXRadialSetVal | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
int16_t | nVal | ||
) |
Update a Gauge element's current value.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nVal | New value to show in gauge |
const char GSLC_PMEM ERRSTR_NULL[] |
const char GSLC_PMEM ERRSTR_PXD_NULL[] |