mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 03:09:16 +08:00
add icon display mode in listview.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@710 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -19,25 +19,26 @@
|
||||
/* RTGUI options */
|
||||
|
||||
#ifdef _WIN32
|
||||
/* name length of RTGUI object */
|
||||
#define RTGUI_NAME_MAX 12
|
||||
/* support 16 weight font */
|
||||
#define RTGUI_USING_FONT16
|
||||
/* support Chinese font */
|
||||
#define RTGUI_USING_FONTHZ
|
||||
/* use small size in RTGUI */
|
||||
#define RTGUI_USING_SMALL_SIZE
|
||||
/* use mouse cursor */
|
||||
/* #define RTGUI_USING_MOUSE_CURSOR */
|
||||
/* default font size in RTGUI */
|
||||
#define RTGUI_DEFAULT_FONT_SIZE 12
|
||||
/* name length of RTGUI object */
|
||||
#define RTGUI_NAME_MAX 12
|
||||
/* support 16 weight font */
|
||||
#define RTGUI_USING_FONT16
|
||||
/* support Chinese font */
|
||||
#define RTGUI_USING_FONTHZ
|
||||
/* use small size in RTGUI */
|
||||
#define RTGUI_USING_SMALL_SIZE
|
||||
/* use mouse cursor */
|
||||
/* #define RTGUI_USING_MOUSE_CURSOR */
|
||||
/* default font size in RTGUI */
|
||||
#define RTGUI_DEFAULT_FONT_SIZE 12
|
||||
|
||||
#define RTGUI_USING_STDIO_FILERW
|
||||
#define RTGUI_IMAGE_PNG
|
||||
#define RTGUI_IMAGE_JPEG
|
||||
#define RTGUI_USING_FONT12
|
||||
#define RTGUI_USING_HZ_BMP
|
||||
#define RTGUI_MEM_TRACE
|
||||
#define RTGUI_USING_STDIO_FILERW
|
||||
#define RTGUI_IMAGE_PNG
|
||||
#define RTGUI_IMAGE_JPEG
|
||||
#define RTGUI_USING_FONT12
|
||||
#define RTGUI_USING_HZ_BMP
|
||||
#define RTGUI_MEM_TRACE
|
||||
#define RTGUI_USING_WINMOVE
|
||||
#endif
|
||||
|
||||
#if RTGUI_DEFAULT_FONT_SIZE == 0
|
||||
|
||||
@@ -51,6 +51,6 @@ void rtgui_filelist_view_destroy(rtgui_filelist_view_t* view);
|
||||
rt_bool_t rtgui_filelist_view_event_handler(struct rtgui_widget* widget, struct rtgui_event* event);
|
||||
void rtgui_filelist_view_set_directory(rtgui_filelist_view_t* view, const char* directory);
|
||||
|
||||
void rtgui_filelist_get_fullpath(rtgui_filelist_view_t* view, char* path, rt_size_t len);
|
||||
void rtgui_filelist_view_get_fullpath(rtgui_filelist_view_t* view, char* path, rt_size_t len);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,10 @@ struct rtgui_list_item
|
||||
/** Checks if the object is a filelist view */
|
||||
#define RTGUI_IS_LIST_VIEW(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_LIST_VIEW_TYPE))
|
||||
|
||||
#define RTGUI_LIST_VIEW_LIST 0x00
|
||||
#define RTGUI_LIST_VIEW_ICON 0x01
|
||||
#define RTGUI_LIST_VIEW_REPORT 0x02
|
||||
|
||||
struct rtgui_list_view
|
||||
{
|
||||
struct rtgui_view parent;
|
||||
@@ -46,19 +50,25 @@ struct rtgui_list_view
|
||||
/* list item */
|
||||
const struct rtgui_list_item* items;
|
||||
|
||||
/* layout flag */
|
||||
rt_uint16_t flag;
|
||||
|
||||
/* total number of items */
|
||||
rt_uint16_t items_count;
|
||||
/* the number of item in a page */
|
||||
rt_uint16_t page_items;
|
||||
/* current item */
|
||||
/* current item */
|
||||
rt_uint16_t current_item;
|
||||
|
||||
/* icon layout */
|
||||
rt_uint8_t row_items, col_items;
|
||||
};
|
||||
typedef struct rtgui_list_view rtgui_list_view_t;
|
||||
|
||||
rtgui_type_t *rtgui_list_view_type_get(void);
|
||||
|
||||
rtgui_list_view_t* rtgui_list_view_create(const struct rtgui_list_item* items, rt_uint16_t count,
|
||||
rtgui_rect_t *rect);
|
||||
rtgui_rect_t *rect, rt_uint16_t flag);
|
||||
void rtgui_list_view_destroy(rtgui_list_view_t* view);
|
||||
|
||||
rt_bool_t rtgui_list_view_event_handler(struct rtgui_widget* widget, struct rtgui_event* event);
|
||||
|
||||
@@ -61,6 +61,8 @@ rtgui_listbox_t* rtgui_listbox_create(const struct rtgui_listbox_item* items, rt
|
||||
void rtgui_listbox_destroy(rtgui_listbox_t* box);
|
||||
|
||||
rt_bool_t rtgui_listbox_event_handler(struct rtgui_widget* widget, struct rtgui_event* event);
|
||||
void rtgui_listbox_set_onitem(rtgui_listbox_t* box, rtgui_onitem_func_t func);
|
||||
void rtgui_listbox_set_items(rtgui_listbox_t* box, struct rtgui_listbox_item* items, rt_uint16_t count);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user