📄 progressbar.h
字号:
/**
*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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -