use new object type implementation.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1402 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong
2011-05-13 10:53:51 +00:00
parent 169c31fc4f
commit 8457439dc1
61 changed files with 282 additions and 655 deletions

View File

@@ -33,18 +33,11 @@ static void _rtgui_listbox_constructor(struct rtgui_listbox *box)
RTGUI_WIDGET_TEXTALIGN(RTGUI_WIDGET(box)) = RTGUI_ALIGN_CENTER_VERTICAL;
}
rtgui_type_t *rtgui_listbox_type_get(void)
{
static rtgui_type_t *listbox_type = RT_NULL;
if (!listbox_type)
{
listbox_type = rtgui_type_create("listbox", RTGUI_WIDGET_TYPE,
sizeof(rtgui_listbox_t), RTGUI_CONSTRUCTOR(_rtgui_listbox_constructor), RT_NULL);
}
return listbox_type;
}
DEFINE_CLASS_TYPE(listbox, "listbox",
RTGUI_WIDGET_TYPE,
_rtgui_listbox_constructor,
RT_NULL,
sizeof(struct rtgui_listbox));
void rtgui_listbox_ondraw(struct rtgui_listbox* box)
{