18#ifndef __VSF_TINY_GUI_EXT_DYNAMIC_H__
19#define __VSF_TINY_GUI_EXT_DYNAMIC_H__
23#if VSF_TGUI_CFG_DYNAMIC == ENABLED
30#if !defined(VSF_TGUI_HEAP_HEADER) && VSF_USE_HEAP == ENABLED
31# define VSF_TGUI_HEAP_HEADER "service/heap/vsf_heap.h"
32# define vsf_tgui_malloc(__size) vsf_heap_malloc(__size)
33# define vsf_tgui_free(__ptr) vsf_heap_free(__ptr)
38#define vsf_tgui_control_set_width(__control, __w) \
40 (__control)->tSize.iWidth = (__w); \
43#define vsf_tgui_control_set_height(__control, __h) \
45 (__control)->tSize.iHeight = (__h); \
48#define vsf_tui_control_set_size(__control, __w, __h) \
50 (__control)->tSize.iWidth = (__w); \
51 (__control)->tSize.iHeight = (__h); \
54#define vsf_tgui_control_set_margin(__control, __left, __top, __right, __bottom)\
56 (__control)->tMargin.chLeft = (__left); \
57 (__control)->tMargin.chTop = (__top); \
58 (__control)->tMargin.chRight = (__right); \
59 (__control)->tMargin.chBottom = (__bottom); \
62#define vsf_control_set_msghandler(__control, __handler, __num) \
64 (__control)->tMSGMap.ptItems = (__handler); \
65 (__control)->tMSGMap.chCount = (__num); \
70#define vsf_tgui_container_set_type2(__container, __type, __autosize) \
72 (__container)->ContainerAttribute.u5Type = (__type), \
73 (__container)->ContainerAttribute.bIsAutoSize = (__autosize); \
75#define vsf_tgui_container_set_type1(__container, __type) \
76 vsf_tgui_container_set_type2((__container), (__type), true)
78#define vsf_tgui_container_set_type(__container, ...) \
79 __PLOOC_EVAL(vsf_tgui_container_set_type, __VA_ARGS__)((__container), ##__VA_ARGS__)
105#define vsf_tgui_button_set_text_static(__button, __text) \
106 vsf_tgui_label_set_text_static((vsf_tgui_label_t *)(__button), (__text))
110#define vsf_tgui_list_get_child(__list) \
111 ((vsf_tgui_control_t *) (((vsf_tgui_container_t *)((__list)->node_ptr))->node_ptr) )
enum vsf_msgt_node_id_t vsf_tree_msg_node_id_t
struct vsf_tgui_control_t vsf_tgui_control_t
Definition vsf_tgui_common.h:549
void vsf_tgui_control_remove(vsf_tgui_container_t *parent, vsf_tgui_control_t *control)
Definition vsf_tgui_dynamic.c:126
vsf_tgui_button_t * vsf_tgui_button_new(char *name)
Definition vsf_tgui_dynamic.c:218
vsf_tgui_control_t * vsf_tgui_control_new(vsf_tree_msg_node_id_t id, char *name)
Definition vsf_tgui_dynamic.c:62
vsf_tgui_label_t * vsf_tgui_label_new(char *name)
Definition vsf_tgui_dynamic.c:182
const char * vsf_tgui_label_get_text(vsf_tgui_label_t *label)
Definition vsf_tgui_dynamic.c:211
void vsf_tgui_control_add(vsf_tgui_container_t *parent, vsf_tgui_control_t *control_prev, vsf_tgui_control_t *control)
Definition vsf_tgui_dynamic.c:106
vsf_tgui_container_t * vsf_tgui_container_new(char *name)
Definition vsf_tgui_dynamic.c:167
void vsf_tgui_label_set_text_static(vsf_tgui_label_t *label, const char *text)
Definition vsf_tgui_dynamic.c:200
void vsf_tgui_control_sync(vsf_tgui_container_t *parent, vsf_tgui_control_t *control)
Definition vsf_tgui_dynamic.c:152
void vsf_tgui_control_destroy(vsf_tgui_control_t *control)
Definition vsf_tgui_dynamic.c:101