18#ifndef __VSF_TINY_GUI_V_TMPLATE_TYPE_H__
19#define __VSF_TINY_GUI_V_TMPLATE_TYPE_H__
23#include "../../vsf_tgui_cfg.h"
25#if VSF_USE_TINY_GUI == ENABLED \
26 && VSF_TGUI_CFG_RENDERING_TEMPLATE_SEL == VSF_TGUI_V_TEMPLATE_SIMPLE_VIEW
30#include "../../port/view/vsf_tgui_sv_port.h"
38#ifndef VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR
39# define VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR ENABLED
42#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == DISLABED
43#ifndef VSF_TGUI_CFG_V_SUPPORT_FIXED_BACKGROUND_COLOR
44# define VSF_TGUI_CFG_V_SUPPORT_FIXED_BACKGROUND_COLOR ENABLED
48#ifndef VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY
49# define VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY ENABLED
52#ifndef VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE
53# define VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE ENABLED
56#ifndef VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR
57# define VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR ENABLED
60#ifndef VSF_TGUI_CFG_V_CONTROL_BACKGROUND_COLOR
61# define VSF_TGUI_CFG_V_CONTROL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
64#ifndef VSF_TGUI_CFG_V_LABEL_BACKGROUND_COLOR
65# define VSF_TGUI_CFG_V_LABEL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
68#ifndef VSF_TGUI_CFG_V_LABEL_TEXT_COLOR
69# define VSF_TGUI_CFG_V_LABEL_TEXT_COLOR VSF_TGUI_COLOR_BLACK
72#ifndef VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_COLOR
73# define VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_COLOR VSF_TGUI_COLOR_WHITE
76#ifndef VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_VALUE
77# define VSF_TGUI_CFG_V_LABEL_DISABLED_TEXT_MIX_VALUE 128
80#ifndef VSF_TGUI_CFG_V_BUTTON_BACKGROUND_COLOR
81# define VSF_TGUI_CFG_V_BUTTON_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
84#ifndef VSF_TGUI_CFG_V_BUTTON_CLICKED_BACKGROUND_COLOR
85# define VSF_TGUI_CFG_V_BUTTON_CLICKED_BACKGROUND_COLOR VSF_TGUI_COLOR_BLUE
88#ifndef VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_COLOR
89# define VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_COLOR VSF_TGUI_COLOR_BLUE
92#ifndef VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_VALUE
93# define VSF_TGUI_CFG_V_BUTTON_CLICKED_MIX_VALUE 128
96#ifndef VSF_TGUI_CFG_V_BUTTON_TEXT_COLOR
97# define VSF_TGUI_CFG_V_BUTTON_TEXT_COLOR VSF_TGUI_COLOR_BLACK
100#ifndef VSF_TGUI_CFG_V_CONTAINER_BACKGROUND_COLOR
101# define VSF_TGUI_CFG_V_CONTAINER_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
104#ifndef VSF_TGUI_CFG_V_PANEL_BACKGROUND_COLOR
105# define VSF_TGUI_CFG_V_PANEL_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
108#ifndef VSF_TGUI_CFG_V_LIST_BACKGROUND_COLOR
109# define VSF_TGUI_CFG_V_LIST_BACKGROUND_COLOR VSF_TGUI_COLOR_RGBA(0xB4, 0xC7, 0xE7, 0x00)
112#ifndef VSF_TGUI_CFG_V_TEXT_LIST_BACKGROUND_COLOR
113# define VSF_TGUI_CFG_V_TEXT_LIST_BACKGROUND_COLOR VSF_TGUI_COLOR_RGB(0xB4, 0xC7, 0xE7)
116#ifndef VSF_TGUI_CFG_V_TEXT_LIST_INDICATOR_COLOR
117# define VSF_TGUI_CFG_V_TEXT_LIST_INDICATOR_COLOR VSF_TGUI_COLOR_RGB(0x44, 0x72, 0xC4)
120#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
121# define __SV_BACKGROUND_COLOR(__COLOR) .background_color = __COLOR,
123# define __SV_BACKGROUND_COLOR(__COLOR)
126#if VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY == ENABLED
127# define __SV_TILE_TRANS_RATE(__COLOR) .tile_trans_rate = __COLOR,
129# define __SV_TILE_TRANS_RATE(__COLOR)
132#if VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE == ENABLED
133# define __SV_SHOW_CORNER_TILE(__VALUE) .show_corner_tile = __VALUE,
135# define __SV_SHOW_CORNER_TILE(__VALUE)
138#if VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR == ENABLED
139# define __SV_TEXT_COLOR(__COLOR) .text_color = __COLOR,
141# define __SV_TEXT_COLOR(__COLOR)
144#define VSF_TGUI_V_CONTROL_STATIC_INIT_DEFAULT \
145 __SV_SHOW_CORNER_TILE(false) \
146 __SV_TILE_TRANS_RATE(0xFF) \
147 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_CONTROL_BACKGROUND_COLOR)
149#define VSF_TGUI_V_LABEL_STATIC_INIT_DEFAULT \
150 __SV_SHOW_CORNER_TILE(true) \
151 __SV_TILE_TRANS_RATE(0xFF) \
152 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_LABEL_BACKGROUND_COLOR) \
153 __SV_TEXT_COLOR(VSF_TGUI_CFG_V_LABEL_TEXT_COLOR)
155#define VSF_TGUI_V_BUTTON_STATIC_INIT_DEFAULT \
156 __SV_SHOW_CORNER_TILE(true) \
157 __SV_TILE_TRANS_RATE(0xFF) \
158 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_BUTTON_BACKGROUND_COLOR) \
159 __SV_TEXT_COLOR(VSF_TGUI_CFG_V_BUTTON_TEXT_COLOR)
161#define VSF_TGUI_V_CONTAINER_STATIC_INIT_DEFAULT \
162 __SV_SHOW_CORNER_TILE(true) \
163 __SV_TILE_TRANS_RATE(0xFF) \
164 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_CONTAINER_BACKGROUND_COLOR)
166#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_DEFAULT \
167 __SV_SHOW_CORNER_TILE(true) \
168 __SV_TILE_TRANS_RATE(0xFF) \
169 __SV_BACKGROUND_COLOR(VSF_TGUI_CFG_V_TEXT_LIST_BACKGROUND_COLOR)
171#define VSF_TGUI_V_LIST_STATIC_INIT_DEFAULT \
172 __SV_SHOW_CORNER_TILE(true) \
173 __SV_TILE_TRANS_RATE(0xFF)
175#define VSF_TGUI_V_PANEL_STATIC_INIT_DEFAULT \
176 __SV_SHOW_CORNER_TILE(true) \
177 __SV_TILE_TRANS_RATE(0xFF)
179#define VSF_TGUI_V_CONTROL_STATIC_INIT_OVERRIDE
180#define VSF_TGUI_V_LABEL_STATIC_INIT_OVERRIDE
181#define VSF_TGUI_V_BUTTON_STATIC_INIT_OVERRIDE
182#define VSF_TGUI_V_CONTAINER_STATIC_INIT_OVERRIDE
183#define VSF_TGUI_V_LIST_STATIC_INIT_OVERRIDE
185#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
186#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_BACKGROUND_CLOLOR_OVERRIDE \
187 .tList.background_color = VSF_TGUI_COLOR_RGBA(0x00, 0x00, 0x00, 0x00),
189#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_BACKGROUND_CLOLOR_OVERRIDE
192#if VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE == ENABLED
193#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_TILE_OVERRIDE \
194 .show_corner_tile = true,
196#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_TILE_OVERRIDE
199#define VSF_TGUI_V_TEXT_LIST_STATIC_INIT_OVERRIDE \
200 VSF_TGUI_V_TEXT_LIST_STATIC_INIT_BACKGROUND_CLOLOR_OVERRIDE
202#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
203# define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_OVERRIDE \
204 .background_color = VSF_TGUI_COLOR_RGBA(0x00, 0x00, 0x00, 0x00), \
205 VSF_TGUI_V_TEXT_LIST_STATIC_INIT_TILE_OVERRIDE
207# define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_OVERRIDE
210#define VSF_TGUI_V_TEXT_LIST_CONTENT_INIT_DEFAULT
212#define VSF_TGUI_V_PANEL_STATIC_INIT_OVERRIDE
214#define tgui_v_font(...) \
215 __tgui_attribute(font_index, __VA_ARGS__)
217#if VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE == ENABLED
218#define tgui_v_show_corner_tile(...) \
219 __tgui_attribute(show_corner_tile, __VA_ARGS__)
222#if VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY == ENABLED
223#define tgui_v_tile_trans_rate(...) \
224 __tgui_attribute(tile_trans_rate, __VA_ARGS__)
227#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
228#define tgui_v_background_color(...) \
229 __tgui_attribute(background_color, __VA_ARGS__)
232#if VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR == ENABLED
233#define tgui_v_text_color(...) \
234 __tgui_attribute(text_color, __VA_ARGS__)
244#if VSF_TGUI_CFG_V_SUPPORT_CORNER_TILE == ENABLED
247#if VSF_TGUI_CFG_V_SUPPORT_TILE_TRANSPARENCY == ENABLED
250#if VSF_TGUI_CFG_V_SUPPORT_FLUXIBLE_BACKGROUND_COLOR == ENABLED
257#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
265#if VSF_TGUI_CFG_V_LABLE_SUPPORT_TEXT_COLOR == ENABLED
272#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
280#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
288#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
296#if __IS_COMPILER_IAR__ || (!defined( __STDC_VERSION__ ) || __STDC_VERSION__ < 199901L)
#define REG_RSVD_U8
Definition i_io_systick.h:136
def_structure(vsf_tgui_v_control_t) vsf_tgui_v_color_t background_color
uint8_t font_index
Definition vsf_tgui_v_type.h:231
end_def_structure(vsf_tgui_v_control_t) def_structure(vsf_tgui_v_container_t) uint8_t end_def_structure(vsf_tgui_v_container_t) def_structure(vsf_tgui_v_label_t) vsf_tgui_v_color_t text_color
vsf_tgui_v_color_t background_color
Definition vsf_tgui_v_type.h:251
declare_structure(vsf_tgui_v_control_t) def_structure(vsf_tgui_v_control_t) uint8_t font_index uint8_t __skip_frame
Definition vsf_tgui_v_type.h:240
uint8_t tile_trans_rate
Definition vsf_tgui_v_type.h:248
uint8_t show_corner_tile
Definition vsf_tgui_v_type.h:245
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_tgui_sv_color.h:93
vsf_tgui_evt_t declare_structure(__vk_tgui_focus_t) def_structure(__vk_tgui_focus_t) const vsf_tgui_control_t *current_ptr