From 0e00642bfca57432cc88adb7bbe029872804673f Mon Sep 17 00:00:00 2001 From: inmarket Date: Mon, 9 Jan 2017 11:40:48 +1000 Subject: Add gwinListItemSetText() --- src/gwin/gwin_list.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/gwin/gwin_list.h') diff --git a/src/gwin/gwin_list.h b/src/gwin/gwin_list.h index a4d8aca7..81db7c34 100644 --- a/src/gwin/gwin_list.h +++ b/src/gwin/gwin_list.h @@ -169,14 +169,26 @@ void gwinListSetScroll(GHandle gh, scroll_t flag); * reordered. * * @param[in] gh The widget handle (must be a list handle) - * @param[in] item The string which shall be displayed in the list afterwards + * @param[in] text The string which shall be displayed in the list afterwards * @param[in] useAlloc If set to TRUE, the string will be dynamically allocated. A static buffer must be passed otherwise * * @return The current ID of the item. The ID might change if you remove items from the middle of the list * * @api */ -int gwinListAddItem(GHandle gh, const char* item, bool_t useAlloc); +int gwinListAddItem(GHandle gh, const char* text, bool_t useAlloc); + +/** + * @brief Set the custom parameter of an item with a given ID + * + * @param[in] gh The widget handle (must be a list handle) + * @param[in] item The item ID + * @param[in] text The text to replace the existing text + * @param[in] useAlloc If set to TRUE, the string will be dynamically allocated. A static buffer must be passed otherwise + * + * @api + */ +void gwinListItemSetText(GHandle gh, int item, const char* text, bool_t useAlloc); /** * @brief Get the name behind an item with a given ID -- cgit v1.2.3