spinbox.h

来自「本程序是使用CDMA450模块开发的一个无线公话完整程序」· C头文件 代码 · 共 34 行

H
34
字号
#ifndef _COMPONENT_SPINBOX
#define _COMPONENT_SPINBOX

#include "component.h"

typedef struct {
	component_t comp;		/**< 增减量组件 */
	short		min;		/**< 最小值 */
	short		max;		/**< 最大值 */
	short		cur;		/**< 当前值 */
	short		step;		/**< 单位增量 */
	short		cycle;
} spin_t;

/**
*XCreateSpin --- 创建增减量组件
 */
int XCreateSpin(component_t *parent, 
				spin_t *sp, 
				const rect *rc,
				short min,
				short max,
				short step,
				short current);


short XSpinSetPos(spin_t *sp, short pos);
short XSpinGetPos(spin_t *sp);
int XSpinReset(spin_t *sp, int min, int max, int step);

int XSpinKeyHandle(spin_t *sp, int key);

#endif /*spin.h*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?