GUIslice
0.16.0
Embedded GUI in C
|
Functions | |
gslc_tsElemRef * | gslc_ElemXRingGaugeCreate (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXRingGauge *pXData, gslc_tsRect rElem, char *pStrBuf, uint8_t nStrBufMax, int16_t nFontId) |
Create an XRingGauge element. More... | |
bool | gslc_ElemXRingGaugeDraw (void *pvGui, void *pvElemRef, gslc_teRedrawType eRedraw) |
Draw the template element on the screen. More... | |
void | gslc_ElemXRingGaugeSetVal (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int16_t nVal) |
Set an Ring Gauge current indicator value. More... | |
void | gslc_ElemXRingGaugeSetValRange (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int16_t nValMin, int16_t nValMax) |
Defines the range of values that may be passed into SetVal(), used to scale the input to SetVal(). More... | |
void | gslc_ElemXRingGaugeSetAngleRange (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int16_t nStart, int16_t nRange, bool bClockwise) |
Defines the angular range of the gauge, including both the active and inactive regions. More... | |
void | gslc_ElemXRingGaugeSetThickness (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int8_t nThickness) |
Defines the thickness of the ring arcs. More... | |
void | gslc_ElemXRingGaugeSetColorActiveFlat (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor colActive) |
Defines the color of the active region to be a flat (constant) color. More... | |
void | gslc_ElemXRingGaugeSetColorActiveGradient (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor colStart, gslc_tsColor colEnd) |
Defines the color of the active region to be a gradient using two color stops. More... | |
void | gslc_ElemXRingGaugeSetColorInactive (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor colInactive) |
Defines the color of the inactive region to be a flat (constant) color. More... | |
void | gslc_ElemXRingGaugeSetQuality (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, uint16_t nSegments) |
Sets the quality of the ring drawing by defining the number of segments that are used when rendering a 360 degree gauge.The larger the number, the more segments are used and the smoother the curve. More... | |
Variables | |
const char GSLC_PMEM | ERRSTR_NULL [] |
const char GSLC_PMEM | ERRSTR_PXD_NULL [] |
gslc_tsElemRef* gslc_ElemXRingGaugeCreate | ( | gslc_tsGui * | pGui, |
int16_t | nElemId, | ||
int16_t | nPage, | ||
gslc_tsXRingGauge * | pXData, | ||
gslc_tsRect | rElem, | ||
char * | pStrBuf, | ||
uint8_t | nStrBufMax, | ||
int16_t | nFontId | ||
) |
Create an XRingGauge 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 | The square box that bounds the ring element. If a rectangular region is provided, then the ring control will be centered in the long axis. |
[in] | pStrBuf | String buffer to use for gauge inner text |
[in] | nStrBufMax | Maximum length of string buffer (pStrBuf) |
[in] | nFontId | Font ID to use for text display |
bool gslc_ElemXRingGaugeDraw | ( | void * | pvGui, |
void * | pvElemRef, | ||
gslc_teRedrawType | eRedraw | ||
) |
Draw the template 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 |
void gslc_ElemXRingGaugeSetAngleRange | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
int16_t | nStart, | ||
int16_t | nRange, | ||
bool | bClockwise | ||
) |
Defines the angular range of the gauge, including both the active and inactive regions.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nStart | Define angle of start of active region (measured in degrees) |
[in] | nRange | Define angular range from strt of active region to end of the inactive region (measured in degrees) |
[in] | bClockwise | Defines the direction in which the active region grows (true for clockwise) [FORCED TRUE, FOR FUTURE IMPLEMENTATION] |
void gslc_ElemXRingGaugeSetColorActiveFlat | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_tsColor | colActive | ||
) |
Defines the color of the active region to be a flat (constant) color.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | colActive | Color of active region |
void gslc_ElemXRingGaugeSetColorActiveGradient | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_tsColor | colStart, | ||
gslc_tsColor | colEnd | ||
) |
Defines the color of the active region to be a gradient using two color stops.
The active region will be filled according to the proportion between nMin and nMax. The gradient is defined by a linear RGB blend between the two color stops(colStart and colEnd)
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | colStart | Starting color of gradient fill |
[in] | colEnd | Ending color of gradient fill |
void gslc_ElemXRingGaugeSetColorInactive | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_tsColor | colInactive | ||
) |
Defines the color of the inactive region to be a flat (constant) color.
The inactive color is often set to be the same as the background but it can be set to a different color to indicate the remainder of the value range that is yet to be filled.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | colInactive | Color of inactive region |
void gslc_ElemXRingGaugeSetQuality | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
uint16_t | nSegments | ||
) |
Sets the quality of the ring drawing by defining the number of segments that are used when rendering a 360 degree gauge.The larger the number, the more segments are used and the smoother the curve.
A larger ring gauge may need a higher quality number to maintain a smoothed curve appearance.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nSegments | Number of arc segments to render a complete circle. The higher the value, the smoother the ring. Note that 360/nSegments should be an integer result, thus the allowable quality settings are: 360 (max quality), 180, 120, 90, 72, 60, 45, 40, 36 (low quality), etc. |
void gslc_ElemXRingGaugeSetThickness | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
int8_t | nThickness | ||
) |
Defines the thickness of the ring arcs.
More specifically, it defines the reduction in radius from the outer radius to the inner radius in pixels.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nThickness | Thickness of ring |
void gslc_ElemXRingGaugeSetVal | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
int16_t | nVal | ||
) |
Set an Ring Gauge current indicator value.
Updates the current value of the ring gauge. The active region will be drawn up to the position defined by nVal within the value range defined by SetValRange(nMin,nMax). A SetVal() close to nMin will cause a very small active region to be drawn and a large remainder drawn in the inactive color, whereas a SetVal() close to nMax will cause a more complete active region to be drawn.When SetVal() equals nMax, the entire angular range will be drawn in the active color (and no inactive region).
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nVal | New position value |
void gslc_ElemXRingGaugeSetValRange | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
int16_t | nValMin, | ||
int16_t | nValMax | ||
) |
Defines the range of values that may be passed into SetVal(), used to scale the input to SetVal().
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nValMin | Minimum value |
[in] | nValMax | Maximum value |
const char GSLC_PMEM ERRSTR_NULL[] |
const char GSLC_PMEM ERRSTR_PXD_NULL[] |