GUIslice  0.16.0
Embedded GUI in C
XSeekbar.h File Reference
#include "GUIslice.h"
Include dependency graph for XSeekbar.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gslc_tsXSeekbar
 Extended data for Seekbar element. More...
 

Macros

#define GSLC_TYPEX_SEEKBAR
 
#define gslc_ElemXSeekbarCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, nPosMin_, nPosMax_, nPos_, nProgressW_, nRemainW_, nThumbSz_, colProgress_, colRemain_, colThumb_, bVert_, colFrame_, colFill_)
 Create a Seekbar Element in Flash. More...
 

Typedefs

typedef bool(* GSLC_CB_XSEEKBAR_POS) (void *pvGui, void *pvElem, int16_t nPos)
 Callback function for slider feedback. More...
 

Functions

gslc_tsElemRefgslc_ElemXSeekbarCreate (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXSeekbar *pXData, gslc_tsRect rElem, int16_t nPosMin, int16_t nPosMax, int16_t nPos, uint8_t nProgressW, uint8_t nRemainW, uint8_t nThumbSz, gslc_tsColor colProgress, gslc_tsColor colRemain, gslc_tsColor colThumb, bool bVert)
 Create a Seekbar Element. More...
 
void gslc_ElemXSeekbarSetStyle (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bTrimThumb, gslc_tsColor colTrim, bool bFrameThumb, gslc_tsColor colFrame, uint16_t nTickDiv, int16_t nTickLen, gslc_tsColor colTick)
 Set a Seekbar element's style, this includes thumb customizations and tick marks. More...
 
int gslc_ElemXSeekbarGetPos (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
 Get a Seekbar element's current position. More...
 
void gslc_ElemXSeekbarSetPos (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int16_t nPos)
 Set a Seekbar element's current position. More...
 
void gslc_ElemXSeekbarSetPosFunc (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, GSLC_CB_XSEEKBAR_POS funcCb)
 Assign the position callback function for a slider. More...
 
bool gslc_ElemXSeekbarDraw (void *pvGui, void *pvElemRef, gslc_teRedrawType eRedraw)
 Draw a Seekbar element on the screen. More...
 
bool gslc_ElemXSeekbarTouch (void *pvGui, void *pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t nRelY)
 Handle touch events to Seekbar element. More...
 

Macro Definition Documentation

#define gslc_ElemXSeekbarCreate_P (   pGui,
  nElemId,
  nPage,
  nX,
  nY,
  nW,
  nH,
  nPosMin_,
  nPosMax_,
  nPos_,
  nProgressW_,
  nRemainW_,
  nThumbSz_,
  colProgress_,
  colRemain_,
  colThumb_,
  bVert_,
  colFrame_,
  colFill_ 
)

Create a Seekbar Element in Flash.

Parameters
[in]pGuiPointer to GUI
[in]nElemIdUnique element ID to assign
[in]nPagePage ID to attach element to
[in]nXX coordinate of element
[in]nYY coordinate of element
[in]nWWidth of element
[in]nHHeight of element
[in]nPosMin_Minimum position value
[in]nPosMax_Maximum position value
[in]nPos_Starting position value
[in]nProgressW_Width of progress track
[in]nRemainW_Width of remaining track
[in]nThumbSz_Size of the thumb control
[in]colProgress_Color of progress fill bar
[in]colRemain_Color remaining fill bar
[in]colThumb_Color for the thumb indicator
[in]bVert_Orientation (true for vertical)
[in]colFrame_Color of the element frame
[in]colFill_Color of the element fill
Returns
none
#define GSLC_TYPEX_SEEKBAR

Typedef Documentation

typedef bool(* GSLC_CB_XSEEKBAR_POS) (void *pvGui, void *pvElem, int16_t nPos)

Callback function for slider feedback.

Function Documentation

gslc_tsElemRef* gslc_ElemXSeekbarCreate ( gslc_tsGui pGui,
int16_t  nElemId,
int16_t  nPage,
gslc_tsXSeekbar pXData,
gslc_tsRect  rElem,
int16_t  nPosMin,
int16_t  nPosMax,
int16_t  nPos,
uint8_t  nProgressW,
uint8_t  nRemainW,
uint8_t  nThumbSz,
gslc_tsColor  colProgress,
gslc_tsColor  colRemain,
gslc_tsColor  colThumb,
bool  bVert 
)

Create a Seekbar Element.

Parameters
[in]pGuiPointer to GUI
[in]nElemIdElement ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
[in]nPagePage ID to attach element to
[in]pXDataPtr to extended element data structure
[in]rElemRectangle coordinates defining checkbox size
[in]nPosMinMinimum position value
[in]nPosMaxMaximum position value
[in]nPosStarting position value
[in]nProgressWWidth of progress track
[in]nRemainWWidth of remaining track
[in]nThumbSzSize of the thumb control
[in]colProgressColor of progress fill bar
[in]colRemainColor remaining fill bar
[in]colThumbColor for the thumb indicator
[in]bVertOrientation (true for vertical)
Returns
Pointer to Element reference or NULL if failure
bool gslc_ElemXSeekbarDraw ( void *  pvGui,
void *  pvElemRef,
gslc_teRedrawType  eRedraw 
)

Draw a Seekbar element on the screen.

Parameters
[in]pvGuiVoid ptr to GUI (typecast to gslc_tsGui*)
[in]pvElemRefVoid ptr to Element reference (typecast to gslc_tsElemRef*)
[in]eRedrawRedraw mode
Returns
true if success, false otherwise
int gslc_ElemXSeekbarGetPos ( gslc_tsGui pGui,
gslc_tsElemRef pElemRef 
)

Get a Seekbar element's current position.

Parameters
[in]pGuiPointer to GUI
[in]pElemRefPointer to Element reference
Returns
Current slider position
void gslc_ElemXSeekbarSetPos ( gslc_tsGui pGui,
gslc_tsElemRef pElemRef,
int16_t  nPos 
)

Set a Seekbar element's current position.

Parameters
[in]pGuiPointer to GUI
[in]pGuiPointer to GUI
[in]pElemRefPointer to Element reference
[in]nPosNew position value
Returns
none
void gslc_ElemXSeekbarSetPosFunc ( gslc_tsGui pGui,
gslc_tsElemRef pElemRef,
GSLC_CB_XSEEKBAR_POS  funcCb 
)

Assign the position callback function for a slider.

Parameters
[in]pGuiPointer to GUI
[in]pElemRefPointer to Element reference
[in]funcCbFunction pointer to position routine (or NULL for none)
Returns
none
void gslc_ElemXSeekbarSetStyle ( gslc_tsGui pGui,
gslc_tsElemRef pElemRef,
bool  bTrimThumb,
gslc_tsColor  colTrim,
bool  bFrameThumb,
gslc_tsColor  colFrame,
uint16_t  nTickDiv,
int16_t  nTickLen,
gslc_tsColor  colTick 
)

Set a Seekbar element's style, this includes thumb customizations and tick marks.

Parameters
[in]pGuiPointer to GUI
[in]pElemRefPointer to Element reference
[in]bTrimThumbShow a colored trim for thumb?
[in]colTrimColor of thumb trim
[in]bFrameThumbShow a frame around thumb?
[in]colFrameColor of thumb frame
[in]nTickDivNumber of tick divisions to show (0 for none)
[in]nTickLenLength of tick marks
[in]colTickColor of ticks
Returns
none
bool gslc_ElemXSeekbarTouch ( void *  pvGui,
void *  pvElemRef,
gslc_teTouch  eTouch,
int16_t  nRelX,
int16_t  nRelY 
)

Handle touch events to Seekbar element.

Parameters
[in]pvGuiVoid ptr to GUI (typecast to gslc_tsGui*)
[in]pvElemRefVoid ptr to Element reference (typecast to gslc_tsElemRef*)
[in]eTouchTouch event type
[in]nRelXTouch X coord relative to element
[in]nRelYTouch Y coord relative to element
Returns
true if success, false otherwise