diff options
| author | [email protected] <[email protected]> | 2010-12-18 01:52:31 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2010-12-18 01:52:31 +0000 |
| commit | b2db97ed9658979295ca61520271856d9911f61a (patch) | |
| tree | f8b6d1586728083f7671a584d8391fd6b0e65a55 /components/rtgui/include | |
| parent | 5b440a3429fde5305761292fa8737aa0a020379b (diff) | |
update menu control.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1210 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/include')
| -rw-r--r-- | components/rtgui/include/rtgui/widgets/menu.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/components/rtgui/include/rtgui/widgets/menu.h b/components/rtgui/include/rtgui/widgets/menu.h index dcfa33ffaa..e573ad6a1e 100644 --- a/components/rtgui/include/rtgui/widgets/menu.h +++ b/components/rtgui/include/rtgui/widgets/menu.h @@ -1,9 +1,9 @@ #ifndef __RTGUI_MENU_H__
#define __RTGUI_MENU_H__
-:q
+
#include <rtgui/image.h>
-#include <rtgui/widgets/label.h>
#include <rtgui/widgets/window.h>
+#include <rtgui/widgets/listctrl.h>
/* rtgui menu item */
enum rtgui_menu_item_type
@@ -33,14 +33,6 @@ struct rtgui_menu_item };
typedef struct rtgui_menu_item rtgui_menu_item_t;
-rtgui_menu_item_t items[] =
-{
- {RTGUI_ITEM_NORMAL, "item #1", RT_NULL, RT_NULL, 0, RT_NULL},
- {RTGUI_ITEM_NORMAL, "item #2", RT_NULL, RT_NULL, 0, RT_NULL},
- {RTGUI_ITEM_SEPARATOR, RT_NULL, RT_NULL, RT_NULL, 0, RT_NULL},
- {RTGUI_ITEM_NORMAL, "item #3", RT_NULL, RT_NULL, 0, RT_NULL},
-};
-
/** Gets the type of a menu */
#define RTGUI_MENU_TYPE (rtgui_menu_type_get())
/** Casts the object to an rtgui_menu */
@@ -57,10 +49,11 @@ struct rtgui_menu /* menu items */
const struct rtgui_menu_item *items;
rt_uint16_t items_count;
- rt_uint16_t current_item;
/* parent menu */
struct rtgui_menu *parent_menu;
+ struct rtgui_menu *sub_menu;
+
/* menu item list control */
struct rtgui_listctrl *items_list;
|
