rtt-f030/examples/rtgui_win/demo_gui_checkbox.c

38 lines
1016 B
C
Raw Normal View History

/*
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>checkbox<EFBFBD>ؼ<EFBFBD><EFBFBD><EFBFBD>ʾ
*
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻ<EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>view<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӽ<EFBFBD><EFBFBD><EFBFBD>checkbox<EFBFBD>ؼ<EFBFBD>
*/
#include "demo_view.h"
#include <rtgui/widgets/checkbox.h>
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾcheckbox<6F>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD>ͼ */
rtgui_view_t* demo_gui_checkbox(rtgui_view_t* parent_view)
{
rtgui_view_t* view;
rtgui_checkbox_t* checkbox;
rtgui_font_t* font;
/* <20>ȴ<EFBFBD><C8B4><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ʾ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD>ͼ */
view = demo_view_create(parent_view, "CheckBox View");
/* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>checkbox<6F>ؼ<EFBFBD> */
checkbox = rtgui_checkbox_create(view, "Red", RT_TRUE, 5, 40);
/* <20><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ɫΪ<C9AB><CEAA>ɫ */
RTGUI_WIDGET_FOREGROUND(checkbox) = red;
checkbox = rtgui_checkbox_create(view, "Blue", RT_TRUE, 5, 60);
RTGUI_WIDGET_FOREGROUND(checkbox) = blue;
checkbox = rtgui_checkbox_create(view, "12 font", RT_TRUE, 5, 80);
font = rtgui_font_refer("asc", 12);
RTGUI_WIDGET_FONT(checkbox) = font;
checkbox = rtgui_checkbox_create(view, "16 font", RT_TRUE, 5, 100);
font = rtgui_font_refer("asc", 16);
RTGUI_WIDGET_FONT(checkbox) = font;
return view;
}