progressbar.h

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

H
41
字号
/**
 *file progressbar.h
 *@
 */
#ifndef _COMPONENT_PROGRESSBAR
#define _COMPONENT_PROGRESSBAR

#include "component.h"

typedef enum {PROGRESS_RECT, PROGRESS_SMOOTH, PROGRESS_SLIDER} progress_style_t;

typedef struct progressbar progressbar_t;
struct progressbar {
	component_t			comp;			/**< 进度条组件 */
	int					min;			/**< 进度条起始位置 */
	int					max;			/**< 进度条结束位置 */
	int					span;			/**< 进度条跨度 */
	int					current;		/**< 进度条当前位置 */
	int					block_size;
	int					block_num;
	progress_style_t	style;
};


int XCreateProgressBar(component_t		*parent,
					   progressbar_t	*progressbar,
					   const rect		*rc,
					   int				min,
					   int				max,
					   int				span,
					   progress_style_t	style,
					   int				block_size);
				   	 
int XProgressBarSetPos(progressbar_t *progressbar, int position);
long XProgressBarGetPos(progressbar_t *pb);

/* 按键消息处理过程 */ 
int XProgressBarKeyHandle(progressbar_t *pb, int keyID);

#endif

⌨️ 快捷键说明

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