41 lines
1.0 KiB
C
41 lines
1.0 KiB
C
#ifndef MYWIN_LIST_H__
|
||
#define MYWIN_LIST_H__
|
||
|
||
// 页面,继承自MYWIN框架
|
||
|
||
typedef struct {
|
||
WIN_WindowStruct win;
|
||
int list_y; // 列表的y方向的原点
|
||
int index;
|
||
int itemHeigh;
|
||
int itemNum;
|
||
char **item;
|
||
WIN_ButtonStruct **button;
|
||
} WIN_ListStruct;
|
||
|
||
// 在堆中创建一个列表窗口
|
||
WIN_ListStruct *WIN_CreatList(WIN_WindowStruct *base,
|
||
void (*msgLoop)(struct _WIN_WindowStruct *win,
|
||
WIN_MsgStruct *msg),
|
||
int x, int y, int x_size, int y_size);
|
||
|
||
// 设置列表框显示的条目
|
||
void LIST_SetItem(WIN_ListStruct *list, char **item, int itemNum);
|
||
|
||
// 设置每个条目的高度
|
||
void LIST_SetItemHeight(WIN_ListStruct *list, int height);
|
||
|
||
// 设置列表Y轴方向的原点
|
||
void LIST_SetYOrigin(WIN_ListStruct *list, int ori);
|
||
|
||
// 设置Y轴方向的移动距离
|
||
void LIST_SetYMove(WIN_ListStruct *list, int move);
|
||
|
||
// 默认绘制函数
|
||
void LIST_DefaultPaint(WIN_ListStruct *list);
|
||
|
||
// 默认消息处理函数
|
||
void LIST_DefaultMsgLoop(WIN_ListStruct *list, WIN_MsgStruct *msg);
|
||
|
||
#endif
|