18#ifndef __VSF_TINY_GUI_V_TMPLATE_TYPE_H__
19#define __VSF_TINY_GUI_V_TMPLATE_TYPE_H__
22#include "../../vsf_tgui_cfg.h"
24#if VSF_USE_TINY_GUI == ENABLED \
25 && VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SIMPLE_VIEW
30#ifndef VSF_TGUI_CFG_SV_SUPPORT_FLUXIBLE_BACKGROUND_COLOR
31# define VSF_TGUI_CFG_SV_SUPPORT_FLUXIBLE_BACKGROUND_COLOR ENABLED
34#if VSF_TGUI_CFG_SV_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == DISLABED
35#ifndef VSF_TGUI_CFG_SV_SUPPORT_FIXED_BACKGROUND_COLOR
36# define VSF_TGUI_CFG_SV_SUPPORT_FIXED_BACKGROUND_COLOR ENABLED
40#ifndef VSF_TGUI_CFG_SV_SUPPORT_TILE_TRANSPARENCY
41# define VSF_TGUI_CFG_SV_SUPPORT_TILE_TRANSPARENCY ENABLED
44#ifndef VSF_TGUI_CFG_SV_SUPPORT_CORNER_TILE
45# define VSF_TGUI_CFG_SV_SUPPORT_CORNER_TILE ENABLED
48#ifndef VSF_TGUI_CFG_SV_LABLE_SUPPORT_TEXT_COLOR
49# define VSF_TGUI_CFG_SV_LABLE_SUPPORT_TEXT_COLOR ENABLED
52#ifndef VSF_TGUI_CFG_SV_CONTROL_BACKGROUND_COLOR
53# define VSF_TGUI_CFG_SV_CONTROL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
56#ifndef VSF_TGUI_CFG_SV_LABEL_BACKGROUND_COLOR
57# define VSF_TGUI_CFG_SV_LABEL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
60#ifndef VSF_TGUI_CFG_SV_LABEL_TEXT_COLOR
61# define VSF_TGUI_CFG_SV_LABEL_TEXT_COLOR VSF_TGUI_COLOR_BLACK
64#ifndef VSF_TGUI_CFG_SV_BUTTON_BACKGROUND_COLOR
65# define VSF_TGUI_CFG_SV_BUTTON_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
68#ifndef VSF_TGUI_CFG_SV_BUTTON_CLICKED_BACKGROUND_COLOR
69# define VSF_TGUI_CFG_SV_BUTTON_CLICKED_BACKGROUND_COLOR VSF_TGUI_COLOR_BLUE
72#ifndef VSF_TGUI_CFG_SV_BUTTON_CLICKED_MIX_COLOR
73# define VSF_TGUI_CFG_SV_BUTTON_CLICKED_MIX_COLOR VSF_TGUI_COLOR_BLUE
76#ifndef VSF_TGUI_CFG_SV_BUTTON_CLICKED_MIX_VALUE
77# define VSF_TGUI_CFG_SV_BUTTON_CLICKED_MIX_VALUE 128
80#ifndef VSF_TGUI_CFG_SV_BUTTON_TEXT_COLOR
81# define VSF_TGUI_CFG_SV_BUTTON_TEXT_COLOR VSF_TGUI_COLOR_BLACK
84#ifndef VSF_TGUI_CFG_SV_CONTAINER_BACKGROUND_COLOR
85# define VSF_TGUI_CFG_SV_CONTAINER_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
88#ifndef VSF_TGUI_CFG_SV_PANEL_BACKGROUND_COLOR
89# define VSF_TGUI_CFG_SV_PANEL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
92#ifndef VSF_TGUI_CFG_SV_LIST_BACKGROUND_COLOR
93# define VSF_TGUI_CFG_SV_LIST_BACKGROUND_COLOR VSF_TGUI_COLOR_RGBA(0xB4, 0xC7, 0xE7, 0x00)
96#ifndef VSF_TGUI_CFG_SV_TEXT_LIST_BACKGROUND_COLOR
97# define VSF_TGUI_CFG_SV_TEXT_LIST_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
100#ifndef VSF_TGUI_CFG_SV_TEXT_LIST_INDICATOR_COLOR
101# define VSF_TGUI_CFG_SV_TEXT_LIST_INDICATOR_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
104#if VSF_TGUI_CFG_SV_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
105# define __SV_BACKGROUND_COLOR(__COLOR) .background_color = __COLOR,
107# define __SV_BACKGROUND_COLOR(__COLOR)
110#if VSF_TGUI_CFG_SV_SUPPORT_TILE_TRANSPARENCY == ENABLED
111# define __SV_TILE_TRANS_RATE(__COLOR) .tile_trans_rate = __COLOR,
113# define __SV_TILE_TRANS_RATE(__COLOR)
116#if VSF_TGUI_CFG_SV_SUPPORT_CORNER_TILE == ENABLED
117# define __SV_SHOW_CORNER_TILE(__VALUE) .show_corner_tile = __VALUE,
119# define __SV_SHOW_CORNER_TILE(__VALUE)
122#if VSF_TGUI_CFG_SV_LABLE_SUPPORT_TEXT_COLOR == ENABLED
123# define __SV_TEXT_COLOR(__COLOR) .font_color = __COLOR,
125# define __SV_TEXT_COLOR(__COLOR)
128#define VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
129 __SV_SHOW_CORNER_TILE(false) \
130 __SV_TILE_TRANS_RATE(0xFF) \
131 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_SV_CONTROL_BACKGROUND_COLOR) \
133#define VSF_TGUI_V_LABEL_STATIC_INIT_DEFAULT \
134 __SV_SHOW_CORNER_TILE(true) \
135 __SV_TILE_TRANS_RATE(0xFF) \
136 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_SV_LABEL_BACKGROUND_COLOR) \
137 __SV_TEXT_COLOR(VSF_TGUI_CFG_SV_LABEL_TEXT_COLOR)
139#define VSF_TGUI_V_BUTTON_STATIC_INIT_DEFAULT \
140 __SV_SHOW_CORNER_TILE(true) \
141 __SV_TILE_TRANS_RATE(0xFF) \
142 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_SV_BUTTON_BACKGROUND_COLOR) \
143 __SV_TEXT_COLOR(VSF_TGUI_CFG_SV_BUTTON_TEXT_COLOR)
145#define VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
146 __SV_SHOW_CORNER_TILE(false) \
147 __SV_TILE_TRANS_RATE(0xFF) \
148 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_SV_CONTAINER_BACKGROUND_COLOR) \
150#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_DEFAULT \
151 __SV_SHOW_CORNER_TILE(false) \
152 __SV_TILE_TRANS_RATE(0xFF) \
153 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_SV_TEXT_LIST_BACKGROUND_COLOR)
155#define VSF_TGUI_V_LIST_STATIC_INIT_DEFAULT \
156 __SV_SHOW_CORNER_TILE(false) \
157 __SV_TILE_TRANS_RATE(0xFF) \
160#define VSF_TGUI_V_PANEL_STATIC_INIT_DEFAULT \
161 __SV_SHOW_CORNER_TILE(true) \
162 __SV_TILE_TRANS_RATE(0xFF)
164#define VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE
165#define VSF_TGUI_V_LABEL_STATIC_INIT_OVERRIDE
166#define VSF_TGUI_V_BUTTON_STATIC_INIT_OVERRIDE
167#define VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE
168#define VSF_TGUI_V_LIST_STATIC_INIT_OVERRIDE
170#if VSF_TGUI_CFG_SV_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
171#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_BACKGROUND_CLOLOR_OVERRIDE \
172 .tList.background_color = VSF_TGUI_COLOR_RGBA(0x00, 0x00, 0x00, 0x00),
174#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_BACKGROUND_CLOLOR_OVERRIDE
177#if VSF_TGUI_CFG_SV_SUPPORT_CORNER_TILE == ENABLED
178#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_TILE_OVERRIDE \
179 .show_corner_tile = true,
181#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_TILE_OVERRIDE
184#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_OVERRIDE \
185 VSF_TGUI_V_TEXT_LIST_STATIC_INIT_BACKGROUND_CLOLOR_OVERRIDE
187#if VSF_TGUI_CFG_SV_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
188# define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_OVERRIDE \
189 .background_color = VSF_TGUI_COLOR_RGBA(0x00, 0x00, 0x00, 0x00), \
190 VSF_TGUI_V_TEXT_LIST_STATIC_INIT_TILE_OVERRIDE
192# define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_OVERRIDE
195#define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_DEFAULT
197#define VSF_TGUI_V_PANEL_STATIC_INIT_OVERRIDE
199#define tgui_sv_font(...) \
200 __tgui_attribute(font_index, __VA_ARGS__)
202#if VSF_TGUI_CFG_SV_SUPPORT_CORNER_TILE == ENABLED
203#define tgui_sv_tile_show_corner(...) \
204 __tgui_attribute(show_corner_tile, __VA_ARGS__)
206#define tgui_sv_tile_show_corner(...)
209#if VSF_TGUI_CFG_SV_SUPPORT_TILE_TRANSPARENCY == ENABLED
210#define tgui_sv_tile_trans_rate(...) \
211 __tgui_attribute(tile_trans_rate, __VA_ARGS__)
213#define tgui_sv_tile_trans_rate(...)
216#if VSF_TGUI_CFG_SV_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
217#define tgui_sv_background_color(...) \
218 __tgui_attribute(background_color, __VA_ARGS__)
220#define tgui_sv_background_color(...)
223#if VSF_TGUI_CFG_SV_LABLE_SUPPORT_TEXT_COLOR == ENABLED
224#define tgui_sv_font_color(...) \
225 __tgui_attribute(font_color, __VA_ARGS__)
227#define tgui_sv_font_color(...)
238#if VSF_TGUI_CFG_SV_SUPPORT_CORNER_TILE == ENABLED
242#if VSF_TGUI_CFG_SV_SUPPORT_TILE_TRANSPARENCY == ENABLED
246#if VSF_TGUI_CFG_SV_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
255#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
263#if VSF_TGUI_CFG_SV_LABLE_SUPPORT_TEXT_COLOR == ENABLED
270#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
278#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
286#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
294#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
#define REG_RSVD_U8
Definition i_io_systick.h:136
declare_structure(vsf_tgui_v_control_t) def_structure(vsf_tgui_v_control_t) uint8_t font_index uint8_t show_corner_tile
Definition vsf_tgui_v_type.h:233
end_def_structure(vsf_tgui_v_control_t) declare_structure(vsf_tgui_v_container_t) def_structure(vsf_tgui_v_container_t) REG_RSVD_U8 end_def_structure(vsf_tgui_v_container_t) declare_structure(vsf_tgui_v_label_t) def_structure(vsf_tgui_v_label_t) vsf_tgui_sv_color_t font_color
vsf_tgui_sv_color_t background_color
Definition vsf_tgui_v_type.h:247
uint8_t tile_trans_rate
Definition vsf_tgui_v_type.h:243
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_tgui_sv_color.h:84
vsf_tgui_evt_t declare_structure(__vk_tgui_focus_t) def_structure(__vk_tgui_focus_t) const vsf_tgui_control_t *current_ptr