/******************************************************************************** * Function Describe: Spin.c declare module * Relate Module: GUI.c * Writer: Shliangwen * Date: 2016-1-8 *******************************************************************************/ struct SUT_SPIN { char **item; //spin item unsigned short x; //position x unsigned char y; //position y unsigned char width; //max string width unsigned char itemnum; //item number short top; //first item short bottom; //last item short handle; //current item short step; //data spin step unsigned char focus; //input focus unsigned char disable; unsigned char keyflag; char *unit; unsigned char type; //data/string spin }; //initialize struct void SpinInit ( struct SUT_SPIN *, unsigned short x, unsigned char y, char **item ); void SpinInitData ( struct SUT_SPIN *p, unsigned short x, unsigned char y, unsigned char width, short min, short max, short step, char *unit ); void SpinSetRange ( struct SUT_SPIN *, short top, short bottom ); //switch spin focus void SpinSetFocus(struct SUT_SPIN *); void SpinLoseFocus(struct SUT_SPIN *); //show spin void SpinShow(struct SUT_SPIN *); void SpinShowBorder(struct SUT_SPIN *); //get spin 's handle short SpinGetHandle(struct SUT_SPIN *); //response key unsigned char SpinResponse(struct SUT_SPIN *); void SpinSetNext(struct SUT_SPIN *); /******************************************************************************** * end of module *******************************************************************************/