mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 17:18:24 +00:00
add Chinese Comments
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@481 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -22,8 +22,10 @@ static void listitem_action(void* parameter)
|
||||
win = rtgui_win_create(RTGUI_TOPLEVEL(workbench),
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", &rect, RTGUI_WIN_STYLE_DEFAULT);
|
||||
|
||||
rect.x1 += 20; rect.x2 -= 5;
|
||||
rect.y1 += 5; rect.y2 = rect.y1 + 20;
|
||||
rect.x1 += 20;
|
||||
rect.x2 -= 5;
|
||||
rect.y1 += 5;
|
||||
rect.y2 = rect.y1 + 20;
|
||||
|
||||
rt_sprintf(label_text, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> %d", no);
|
||||
label = rtgui_label_create(label_text);
|
||||
@@ -51,7 +53,7 @@ static struct rtgui_list_item items[] =
|
||||
{"<EFBFBD>б<EFBFBD><EFBFBD><EFBFBD>3", RT_NULL, listitem_action, (void*)3},
|
||||
{"<EFBFBD>б<EFBFBD><EFBFBD><EFBFBD>4", RT_NULL, listitem_action, (void*)4},
|
||||
{"<EFBFBD>б<EFBFBD><EFBFBD><EFBFBD>5", RT_NULL, listitem_action, (void*)5},
|
||||
{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", RT_NULL, return_action, RT_NULL},
|
||||
{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", RT_NULL, return_action, RT_NULL},
|
||||
};
|
||||
|
||||
static void open_btn_onbutton(rtgui_widget_t* widget, struct rtgui_event* event)
|
||||
@@ -62,7 +64,8 @@ static void open_btn_onbutton(rtgui_widget_t* widget, struct rtgui_event* event)
|
||||
workbench = RTGUI_WORKBENCH(rtgui_widget_get_toplevel(widget));
|
||||
rtgui_widget_get_rect(RTGUI_WIDGET(workbench), &rect);
|
||||
|
||||
_view = rtgui_list_view_create(items, sizeof(items)/sizeof(struct rtgui_list_item), &rect);
|
||||
_view = rtgui_list_view_create(items, sizeof(items)/sizeof(struct rtgui_list_item),
|
||||
&rect);
|
||||
rtgui_workbench_add_view(workbench, RTGUI_VIEW(_view));
|
||||
|
||||
/* ģʽ<C4A3><CABD>ʾ<EFBFBD><CABE>ͼ */
|
||||
@@ -78,8 +81,10 @@ rtgui_view_t* demo_listview_view(rtgui_workbench_t* workbench)
|
||||
view = demo_view(workbench, "<EFBFBD>б<EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>ʾ");
|
||||
|
||||
demo_view_get_rect(view, &rect);
|
||||
rect.x1 += 5; rect.x2 = rect.x1 + 80;
|
||||
rect.y1 += 30; rect.y2 = rect.y1 + 20;
|
||||
rect.x1 += 5;
|
||||
rect.x2 = rect.x1 + 80;
|
||||
rect.y1 += 30;
|
||||
rect.y2 = rect.y1 + 20;
|
||||
open_btn = rtgui_button_create("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>");
|
||||
rtgui_container_add_child(RTGUI_CONTAINER(view), RTGUI_WIDGET(open_btn));
|
||||
rtgui_widget_set_rect(RTGUI_WIDGET(open_btn), &rect);
|
||||
|
||||
Reference in New Issue
Block a user