fixed compiling error for GUI examples.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@470 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
gary.li.wenchao.4 2010-03-09 01:13:25 +00:00
parent e4b78f5c87
commit 72a5992592
2 changed files with 8 additions and 8 deletions

View File

@ -23,7 +23,7 @@ rtgui_view_t* demo_view_checkbox(rtgui_workbench_t* workbench)
rect.x1 += 5; rect.x2 = rect.x1 + 100;
rect.y1 += 5; rect.y2 = rect.y1 + 20;
/* 创建一个checkbox控件 */
checkbox = rtgui_checkbox_create("Red");
checkbox = rtgui_checkbox_create("Red",RT_TRUE);
/* 设置前景色为红色 */
RTGUI_WIDGET_FOREGROUND(RTGUI_WIDGET(checkbox)) = red;
/* 设置checkbox的位置 */
@ -36,7 +36,7 @@ rtgui_view_t* demo_view_checkbox(rtgui_workbench_t* workbench)
rect.x1 += 5; rect.x2 = rect.x1 + 100;
rect.y1 += 5 + 25; rect.y2 = rect.y1 + 20;
/* 创建一个checkbox控件 */
checkbox = rtgui_checkbox_create("Blue");
checkbox = rtgui_checkbox_create("Blue",RT_TRUE);
/* 设置前景色为蓝色 */
RTGUI_WIDGET_FOREGROUND(RTGUI_WIDGET(checkbox)) = blue;
/* 设置checkbox的位置 */
@ -49,7 +49,7 @@ rtgui_view_t* demo_view_checkbox(rtgui_workbench_t* workbench)
rect.x1 += 5; rect.x2 = rect.x1 + 100;
rect.y1 += 5 + 25 + 25; rect.y2 = rect.y1 + 20;
/* 创建一个checkbox控件 */
checkbox = rtgui_checkbox_create("12 font");
checkbox = rtgui_checkbox_create("12 font",RT_TRUE);
/* 设置字体为12点阵 */
font = rtgui_font_refer("asc", 12);
RTGUI_WIDGET_FONT(RTGUI_WIDGET(checkbox)) = font;
@ -63,7 +63,7 @@ rtgui_view_t* demo_view_checkbox(rtgui_workbench_t* workbench)
rect.x1 += 5; rect.x2 = rect.x1 + 100;
rect.y1 += 5 + 25 + 25 + 25; rect.y2 = rect.y1 + 20;
/* 创建一个checkbox控件 */
checkbox = rtgui_checkbox_create("16 font");
checkbox = rtgui_checkbox_create("16 font",RT_TRUE);
/* 设置字体为16点阵 */
font = rtgui_font_refer("asc", 16);
RTGUI_WIDGET_FONT(RTGUI_WIDGET(checkbox)) = font;

View File

@ -33,7 +33,7 @@ rtgui_view_t* demo_view_textbox(rtgui_workbench_t* workbench)
textbox_rect = rect;
textbox_rect.x1 = textbox_rect.x2 + 5; textbox_rect.x2 = textbox_rect.x1 + 160;
/* 创建一个textbox控件 */
text = rtgui_textbox_create("bernard");
text = rtgui_textbox_create("bernard",RTGUI_TEXTBOX_SINGLE);
/* 设置textbox控件的位置 */
rtgui_widget_set_rect(RTGUI_WIDGET(text), &textbox_rect);
/* 添加textbox控件到视图中 */
@ -50,7 +50,7 @@ rtgui_view_t* demo_view_textbox(rtgui_workbench_t* workbench)
textbox_rect = rect;
textbox_rect.x1 = textbox_rect.x2 + 5; textbox_rect.x2 = textbox_rect.x1 + 160;
/* 创建一个textbox控件 */
text = rtgui_textbox_create("bernard.xiong@gmail.com");
text = rtgui_textbox_create("bernard.xiong@gmail.com",RTGUI_TEXTBOX_SINGLE);
/* 设置textbox控件的位置 */
rtgui_widget_set_rect(RTGUI_WIDGET(text), &textbox_rect);
/* 添加textbox控件到视图中 */
@ -66,7 +66,7 @@ rtgui_view_t* demo_view_textbox(rtgui_workbench_t* workbench)
textbox_rect = rect;
textbox_rect.x1 = textbox_rect.x2 + 5; textbox_rect.x2 = textbox_rect.x1 + 160;
/* 创建一个textbox控件 */
text = rtgui_textbox_create("rt-thread");
text = rtgui_textbox_create("rt-thread",RTGUI_TEXTBOX_SINGLE);
/* 设置textbox显示文本为掩码形式(即显示为*号,适合于显示密码的情况) */
text->flag |= RTGUI_TEXTBOX_MASK;
/* 设置textbox控件的位置 */
@ -84,7 +84,7 @@ rtgui_view_t* demo_view_textbox(rtgui_workbench_t* workbench)
textbox_rect = rect;
textbox_rect.x1 = textbox_rect.x2 + 5; textbox_rect.x2 = textbox_rect.x1 + 160;
/* 创建一个textbox控件 */
text = rtgui_textbox_create("http://www.rt-thread.org");
text = rtgui_textbox_create("http://www.rt-thread.org",RTGUI_TEXTBOX_SINGLE);
/* 设置textbox控件的位置 */
rtgui_widget_set_rect(RTGUI_WIDGET(text), &textbox_rect);
/* 添加textbox控件到视图中 */