33 lines
971 B
C
33 lines
971 B
C
#ifndef _COMPO_TEXTBOX_H
|
|
#define _COMPO_TEXTBOX_H
|
|
|
|
typedef struct compo_textbox_t_ {
|
|
COMPO_STRUCT_COMMON;
|
|
widget_page_t *page;
|
|
widget_rect_t *bg;
|
|
widget_text_t *txt;
|
|
} compo_textbox_t;
|
|
|
|
//创建一个文本框
|
|
compo_textbox_t *compo_textbox_create(compo_form_t *frm, u16 max_word_cnt);
|
|
|
|
//设置文本框内容
|
|
void compo_textbox_set(compo_textbox_t *textbox, const char *text);
|
|
|
|
//设置文本框的坐标及大小
|
|
void compo_textbox_set_location(compo_textbox_t *textbox, s16 x, s16 y, s16 width, s16 height);
|
|
|
|
//设置文本框的坐标
|
|
void compo_textbox_set_pos(compo_textbox_t *textbox, s16 x, s16 y);
|
|
|
|
//设置文本框是否自动换行
|
|
void compo_textbox_set_wordwrap(compo_textbox_t *textbox, bool wordwrap);
|
|
|
|
//设置文本框的颜色
|
|
void compo_textbox_set_forecolor(compo_textbox_t *textbox, u16 color);
|
|
|
|
//设置文本框的透明度
|
|
void compo_textbox_set_alpha(compo_textbox_t *textbox, u8 alpha);
|
|
|
|
#endif
|