1 /*******************************************************************************/
2 /* This file is auto-generated by Azure RTOS GUIX Studio. Do not edit this */
3 /* file by hand. Modifications to this file should only be made by running */
4 /* the Azure RTOS GUIX Studio application and re-generating the application */
5 /* specification file(s). For more information please refer to the Azure RTOS */
6 /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */
7 /* */
8 /* GUIX Studio Revision 6.1.12.0 */
9 /* Date (dd.mm.yyyy): 25. 8.2022 Time (hh:mm): 18:44 */
10 /*******************************************************************************/
11
12
13 #define GUIX_STUDIO_GENERATED_FILE
14 #include <stddef.h>
15 #include "demo_guix_radial_slider_resources.h"
16 #include "demo_guix_radial_slider_specifications.h"
17
18 static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
19 MAIN_SCREEN_CONTROL_BLOCK main_screen;
20 GX_DISPLAY display_1_control_block;
21 GX_WINDOW_ROOT display_1_root_window;
22 GX_CANVAS display_1_canvas_control_block;
23 ULONG display_1_canvas_memory[307200];
24
25 extern GX_CONST GX_THEME *display_1_theme_table[];
26 extern GX_CONST GX_STRING *display_1_language_table[];
27
28 GX_STUDIO_DISPLAY_INFO demo_guix_radial_slider_display_table[1] =
29 {
30 {
31 "display_1",
32 "display_1_canvas",
33 display_1_theme_table,
34 display_1_language_table,
35 DISPLAY_1_THEME_TABLE_SIZE,
36 DISPLAY_1_LANGUAGE_TABLE_SIZE,
37 DISPLAY_1_STRING_TABLE_SIZE,
38 640, /* x resolution */
39 480, /* y resolution */
40 &display_1_control_block,
41 &display_1_canvas_control_block,
42 &display_1_root_window,
43 display_1_canvas_memory, /* canvas memory area */
44 1228800, /* canvas memory size in bytes */
45 GX_SCREEN_ROTATION_NONE /* rotation angle */
46 }
47 };
48
49
gx_studio_checkbox_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)50 UINT gx_studio_checkbox_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
51 {
52 UINT status;
53 GX_CHECKBOX *button = (GX_CHECKBOX *) control_block;
54 GX_TEXT_BUTTON *text_button = (GX_TEXT_BUTTON *) button;
55 GX_CHECKBOX_PROPERTIES *props = (GX_CHECKBOX_PROPERTIES *) info->properties;
56 status = gx_checkbox_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
57 if (status == GX_SUCCESS)
58 {
59 gx_text_button_font_set(text_button, props->font_id);
60 #if defined(GUIX_5_4_0_COMPATIBILITY)
61 gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id);
62 #else
63 gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
64 #endif
65
66 if (props->unchecked_pixelmap_id ||
67 props->checked_pixelmap_id ||
68 props->unchecked_disabled_pixelmap_id ||
69 props->checked_disabled_pixelmap_id)
70 {
71 gx_checkbox_pixelmap_set(button,
72 props->unchecked_pixelmap_id,
73 props->checked_pixelmap_id,
74 props->unchecked_disabled_pixelmap_id,
75 props->checked_disabled_pixelmap_id);
76 }
77 }
78 return status;
79 }
80
gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)81 UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
82 {
83 UINT status;
84 GX_ICON *icon = (GX_ICON *) control_block;
85 GX_ICON_PROPERTIES *props = (GX_ICON_PROPERTIES *) info->properties;
86 status = gx_icon_create(icon, info->widget_name, parent, props->normal_pixelmap_id, info->style, info->widget_id, info->size.gx_rectangle_left, info->size.gx_rectangle_top);
87 if (props->selected_pixelmap_id)
88 {
89 gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
90 }
91 else
92 {
93 gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
94 }
95 return status;
96 }
97
gx_studio_radial_slider_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)98 UINT gx_studio_radial_slider_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
99 {
100 UINT status;
101 GX_RADIAL_SLIDER *slider = (GX_RADIAL_SLIDER *) control_block;
102 GX_RADIAL_SLIDER_INFO slider_info;
103 GX_RADIAL_SLIDER_PROPERTIES *props = (GX_RADIAL_SLIDER_PROPERTIES *)info->properties;
104 memset(&slider_info, 0, sizeof(GX_RADIAL_SLIDER_INFO));
105 slider_info.gx_radial_slider_info_xcenter = props->xcenter;
106 slider_info.gx_radial_slider_info_ycenter = props->ycenter;
107 slider_info.gx_radial_slider_info_radius = props->radius;
108 slider_info.gx_radial_slider_info_track_width = props->track_width;
109 slider_info.gx_radial_slider_info_current_angle = props->current_angle;
110 slider_info.gx_radial_slider_info_min_angle = props->min_angle;
111 slider_info.gx_radial_slider_info_max_angle = props->max_angle;
112 slider_info.gx_radial_slider_info_background_pixelmap = props->background_pixelmap;
113 slider_info.gx_radial_slider_info_needle_pixelmap = props->needle_pixelmap;
114 status = gx_radial_slider_create(slider,
115 info->widget_name,
116 parent,
117 &slider_info,
118 info->style,
119 info->widget_id,
120 &info->size);
121 gx_radial_slider_animation_set(slider, props->animation_total_steps, props->animation_delay, props->animation_style, props->animation_update_callback);
122 return status;
123 }
124
gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)125 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
126 {
127 UINT status;
128 GX_PROMPT *prompt = (GX_PROMPT *) control_block;
129 GX_PROMPT_PROPERTIES *props = (GX_PROMPT_PROPERTIES *) info->properties;
130 status = gx_prompt_create(prompt, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
131 if (status == GX_SUCCESS)
132 {
133 gx_prompt_font_set(prompt, props->font_id);
134 #if defined(GUIX_5_4_0_COMPATIBILITY)
135 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id);
136 #else
137 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
138 #endif
139 }
140 return status;
141 }
142
gx_studio_numeric_prompt_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)143 UINT gx_studio_numeric_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
144 {
145 UINT status;
146 GX_NUMERIC_PROMPT *prompt = (GX_NUMERIC_PROMPT *) control_block;
147 GX_NUMERIC_PROMPT_PROPERTIES *props = (GX_NUMERIC_PROMPT_PROPERTIES *) info->properties;
148 status = gx_numeric_prompt_create(prompt, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
149 if (status == GX_SUCCESS)
150 {
151 gx_prompt_font_set((GX_PROMPT *)prompt, props->font_id);
152 #if defined(GUIX_5_4_0_COMPATIBILITY)
153 gx_prompt_text_color_set((GX_PROMPT *)prompt, props->normal_text_color_id, props->selected_text_color_id);
154 #else
155 gx_prompt_text_color_set((GX_PROMPT *)prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
156 #endif
157 if(!props->string_id)
158 {
159 gx_numeric_prompt_value_set(prompt, props->numeric_prompt_value);
160 }
161 if(props->format_func)
162 {
163 gx_numeric_prompt_format_function_set(prompt, props->format_func);
164 }
165 }
166 return status;
167 }
168
gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)169 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
170 {
171 UINT status;
172 GX_WINDOW *window = (GX_WINDOW *) control_block;
173 GX_WINDOW_PROPERTIES *props = (GX_WINDOW_PROPERTIES *) info->properties;
174 status = gx_window_create(window, info->widget_name, parent, info->style, info->widget_id, &info->size);
175 if (status == GX_SUCCESS)
176 {
177 if (props->wallpaper_id)
178 {
179 gx_window_wallpaper_set(window, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
180 }
181 }
182 return status;
183 }
184 GX_WINDOW_PROPERTIES main_screen_properties =
185 {
186 0 /* wallpaper pixelmap id */
187 };
188 GX_ICON_PROPERTIES main_screen_logo_properties =
189 {
190 GX_PIXELMAP_ID_MS_AZURE_LOGO_SMALL, /* normal pixelmap id */
191 0 /* selected pixelmap id */
192 };
193 GX_PROMPT_PROPERTIES main_screen_title_properties =
194 {
195 GX_STRING_ID_STRING_4, /* string id */
196 GX_FONT_ID_TITLE, /* font id */
197 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
198 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
199 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
200 };
201 GX_RADIAL_SLIDER_PROPERTIES main_screen_radial_slider_properties =
202 {
203 187, /* xcenter */
204 131, /* ycenter */
205 108, /* radius */
206 44, /* track width */
207 -63, /* current angle */
208 -63, /* min angle */
209 242, /* max angle */
210 GX_PIXELMAP_ID_BG_WASHER_ON, /* background pixelmap */
211 GX_PIXELMAP_ID_WHEEL_DOT_GREEN, /* needle pixelmap */
212 15, /* animation total steps */
213 2, /* animation delay */
214 GX_ANIMATION_CIRC_EASE_IN_OUT, /* animation style */
215 radial_slider_animation_callback, /* animation update callback func */
216 };
217 GX_NUMERIC_PROMPT_PROPERTIES main_screen_radial_slider_value_properties =
218 {
219 0, /* string id */
220 GX_FONT_ID_NORMAL_FONT, /* font id */
221 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
222 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
223 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* disabled text color */
224 GX_NULL, /* format function */
225 0 /* numeric prompt value */
226 };
227 GX_PROMPT_PROPERTIES main_screen_prompt_14_5_properties =
228 {
229 GX_STRING_ID_STRING_102, /* string id */
230 GX_FONT_ID_PROMPT, /* font id */
231 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
232 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
233 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
234 };
235 GX_PROMPT_PROPERTIES main_screen_prompt_14_properties =
236 {
237 GX_STRING_ID_STRING_5, /* string id */
238 GX_FONT_ID_PROMPT, /* font id */
239 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
240 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
241 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
242 };
243 GX_PROMPT_PROPERTIES main_screen_prompt_14_1_properties =
244 {
245 GX_STRING_ID_STRING_6, /* string id */
246 GX_FONT_ID_PROMPT, /* font id */
247 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
248 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
249 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
250 };
251 GX_PROMPT_PROPERTIES main_screen_prompt_14_2_properties =
252 {
253 GX_STRING_ID_STRING_7, /* string id */
254 GX_FONT_ID_PROMPT, /* font id */
255 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
256 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
257 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
258 };
259 GX_PROMPT_PROPERTIES main_screen_prompt_14_3_properties =
260 {
261 GX_STRING_ID_STRING_12, /* string id */
262 GX_FONT_ID_PROMPT, /* font id */
263 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
264 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
265 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
266 };
267 GX_PROMPT_PROPERTIES main_screen_prompt_14_4_properties =
268 {
269 GX_STRING_ID_STRING_13, /* string id */
270 GX_FONT_ID_PROMPT, /* font id */
271 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
272 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
273 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
274 };
275 GX_PROMPT_PROPERTIES main_screen_prompt_14_6_properties =
276 {
277 GX_STRING_ID_STRING_15, /* string id */
278 GX_FONT_ID_PROMPT, /* font id */
279 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
280 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
281 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
282 };
283 GX_PROMPT_PROPERTIES main_screen_prompt_14_7_properties =
284 {
285 GX_STRING_ID_STRING_16, /* string id */
286 GX_FONT_ID_PROMPT, /* font id */
287 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
288 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
289 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
290 };
291 GX_PROMPT_PROPERTIES main_screen_prompt_14_8_properties =
292 {
293 GX_STRING_ID_STRING_17, /* string id */
294 GX_FONT_ID_PROMPT, /* font id */
295 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
296 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
297 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
298 };
299 GX_PROMPT_PROPERTIES main_screen_prompt_14_9_properties =
300 {
301 GX_STRING_ID_STRING_18, /* string id */
302 GX_FONT_ID_PROMPT, /* font id */
303 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
304 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
305 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
306 };
307 GX_PROMPT_PROPERTIES main_screen_prompt_14_10_properties =
308 {
309 GX_STRING_ID_STRING_19, /* string id */
310 GX_FONT_ID_PROMPT, /* font id */
311 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
312 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
313 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
314 };
315 GX_PROMPT_PROPERTIES main_screen_prompt_14_11_properties =
316 {
317 GX_STRING_ID_STRING_20, /* string id */
318 GX_FONT_ID_PROMPT, /* font id */
319 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
320 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
321 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
322 };
323 GX_CHECKBOX_PROPERTIES main_screen_checkbox_2_properties =
324 {
325 GX_STRING_ID_STRING_96, /* string id */
326 GX_FONT_ID_BUTTON, /* font id */
327 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
328 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* selected text color */
329 GX_COLOR_ID_DISABLED_TEXT, /* disabled text color */
330 0, /* unchecked pixelmap id */
331 0, /* checked pixelmap id */
332 0, /* unchecked disabled pixelmap id */
333 0 /* checked disabled pixelmap id */
334 };
335 GX_CHECKBOX_PROPERTIES main_screen_checkbox_properties =
336 {
337 GX_STRING_ID_STRING_114, /* string id */
338 GX_FONT_ID_BUTTON, /* font id */
339 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
340 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* selected text color */
341 GX_COLOR_ID_DISABLED_TEXT, /* disabled text color */
342 0, /* unchecked pixelmap id */
343 0, /* checked pixelmap id */
344 0, /* unchecked disabled pixelmap id */
345 0 /* checked disabled pixelmap id */
346 };
347 GX_PROMPT_PROPERTIES main_screen_prompt_14_12_properties =
348 {
349 GX_STRING_ID_STRING_24, /* string id */
350 GX_FONT_ID_PROMPT, /* font id */
351 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
352 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
353 GX_COLOR_ID_LIGHT_SLATE_GRAY /* disabled text color */
354 };
355 GX_NUMERIC_PROMPT_PROPERTIES main_screen_animation_step_prompt_properties =
356 {
357 0, /* string id */
358 GX_FONT_ID_PROMPT, /* font id */
359 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* normal text color */
360 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
361 GX_COLOR_ID_LIGHT_SLATE_GRAY, /* disabled text color */
362 GX_NULL, /* format function */
363 0 /* numeric prompt value */
364 };
365
366 GX_CONST GX_STUDIO_WIDGET main_screen_radial_slider_value_define =
367 {
368 "radial_slider_value",
369 GX_TYPE_NUMERIC_PROMPT, /* widget type */
370 GX_ID_NONE, /* widget id */
371 #if defined(GX_WIDGET_USER_DATA)
372 0, /* user data */
373 #endif
374 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
375 0, /* status flags */
376 sizeof(GX_NUMERIC_PROMPT), /* control block size */
377 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
378 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
379 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
380 gx_studio_numeric_prompt_create, /* create function */
381 GX_NULL, /* drawing function override */
382 GX_NULL, /* event function override */
383 {283, 225, 362, 262}, /* widget size */
384 GX_NULL, /* no next widget */
385 GX_NULL, /* no child widgets */
386 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_radial_slider_value), /* control block */
387 (void *) &main_screen_radial_slider_value_properties /* extended properties */
388 };
389
390 GX_CONST GX_STUDIO_WIDGET main_screen_animation_step_prompt_define =
391 {
392 "animation_step_prompt",
393 GX_TYPE_NUMERIC_PROMPT, /* widget type */
394 GX_ID_NONE, /* widget id */
395 #if defined(GX_WIDGET_USER_DATA)
396 0, /* user data */
397 #endif
398 GX_STYLE_BORDER_THIN|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
399 0, /* status flags */
400 sizeof(GX_NUMERIC_PROMPT), /* control block size */
401 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
402 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
403 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
404 gx_studio_numeric_prompt_create, /* create function */
405 GX_NULL, /* drawing function override */
406 GX_NULL, /* event function override */
407 {288, 438, 325, 465}, /* widget size */
408 GX_NULL, /* no next widget */
409 GX_NULL, /* no child widgets */
410 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_animation_step_prompt), /* control block */
411 (void *) &main_screen_animation_step_prompt_properties /* extended properties */
412 };
413
414 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_12_define =
415 {
416 "prompt_14_12",
417 GX_TYPE_PROMPT, /* widget type */
418 GX_ID_NONE, /* widget id */
419 #if defined(GX_WIDGET_USER_DATA)
420 0, /* user data */
421 #endif
422 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
423 0, /* status flags */
424 sizeof(GX_PROMPT), /* control block size */
425 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
426 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
427 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
428 gx_studio_prompt_create, /* create function */
429 GX_NULL, /* drawing function override */
430 GX_NULL, /* event function override */
431 {159, 443, 279, 460}, /* widget size */
432 &main_screen_animation_step_prompt_define, /* next widget definition */
433 GX_NULL, /* no child widgets */
434 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_12), /* control block */
435 (void *) &main_screen_prompt_14_12_properties /* extended properties */
436 };
437
438 GX_CONST GX_STUDIO_WIDGET main_screen_checkbox_define =
439 {
440 "checkbox",
441 GX_TYPE_CHECKBOX, /* widget type */
442 ID_SET_ANCHOR_LIST, /* widget id */
443 #if defined(GX_WIDGET_USER_DATA)
444 0, /* user data */
445 #endif
446 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_BUTTON_TOGGLE|GX_STYLE_TEXT_LEFT, /* style flags */
447 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
448 sizeof(GX_CHECKBOX), /* control block size */
449 GX_COLOR_ID_BTN_LOWER, /* normal color id */
450 GX_COLOR_ID_BTN_UPPER, /* selected color id */
451 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
452 gx_studio_checkbox_create, /* create function */
453 GX_NULL, /* drawing function override */
454 GX_NULL, /* event function override */
455 {362, 406, 506, 429}, /* widget size */
456 &main_screen_prompt_14_12_define, /* next widget definition */
457 GX_NULL, /* no child widgets */
458 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_checkbox), /* control block */
459 (void *) &main_screen_checkbox_properties /* extended properties */
460 };
461
462 GX_CONST GX_STUDIO_WIDGET main_screen_checkbox_2_define =
463 {
464 "checkbox_2",
465 GX_TYPE_CHECKBOX, /* widget type */
466 ID_ANIMATED, /* widget id */
467 #if defined(GX_WIDGET_USER_DATA)
468 0, /* user data */
469 #endif
470 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_BUTTON_PUSHED|GX_STYLE_BUTTON_TOGGLE|GX_STYLE_TEXT_LEFT, /* style flags */
471 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
472 sizeof(GX_CHECKBOX), /* control block size */
473 GX_COLOR_ID_BTN_LOWER, /* normal color id */
474 GX_COLOR_ID_BTN_UPPER, /* selected color id */
475 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
476 gx_studio_checkbox_create, /* create function */
477 GX_NULL, /* drawing function override */
478 GX_NULL, /* event function override */
479 {128, 406, 235, 429}, /* widget size */
480 &main_screen_checkbox_define, /* next widget definition */
481 GX_NULL, /* no child widgets */
482 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_checkbox_2), /* control block */
483 (void *) &main_screen_checkbox_2_properties /* extended properties */
484 };
485
486 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_11_define =
487 {
488 "prompt_14_11",
489 GX_TYPE_PROMPT, /* widget type */
490 GX_ID_NONE, /* widget id */
491 #if defined(GX_WIDGET_USER_DATA)
492 0, /* user data */
493 #endif
494 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
495 0, /* status flags */
496 sizeof(GX_PROMPT), /* control block size */
497 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
498 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
499 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
500 gx_studio_prompt_create, /* create function */
501 GX_NULL, /* drawing function override */
502 GX_NULL, /* event function override */
503 {63, 356, 177, 373}, /* widget size */
504 &main_screen_checkbox_2_define, /* next widget definition */
505 GX_NULL, /* no child widgets */
506 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_11), /* control block */
507 (void *) &main_screen_prompt_14_11_properties /* extended properties */
508 };
509
510 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_10_define =
511 {
512 "prompt_14_10",
513 GX_TYPE_PROMPT, /* widget type */
514 GX_ID_NONE, /* widget id */
515 #if defined(GX_WIDGET_USER_DATA)
516 0, /* user data */
517 #endif
518 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
519 0, /* status flags */
520 sizeof(GX_PROMPT), /* control block size */
521 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
522 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
523 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
524 gx_studio_prompt_create, /* create function */
525 GX_NULL, /* drawing function override */
526 GX_NULL, /* event function override */
527 {110, 305, 136, 322}, /* widget size */
528 &main_screen_prompt_14_11_define, /* next widget definition */
529 GX_NULL, /* no child widgets */
530 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_10), /* control block */
531 (void *) &main_screen_prompt_14_10_properties /* extended properties */
532 };
533
534 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_9_define =
535 {
536 "prompt_14_9",
537 GX_TYPE_PROMPT, /* widget type */
538 GX_ID_NONE, /* widget id */
539 #if defined(GX_WIDGET_USER_DATA)
540 0, /* user data */
541 #endif
542 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
543 0, /* status flags */
544 sizeof(GX_PROMPT), /* control block size */
545 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
546 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
547 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
548 gx_studio_prompt_create, /* create function */
549 GX_NULL, /* drawing function override */
550 GX_NULL, /* event function override */
551 {138, 258, 164, 275}, /* widget size */
552 &main_screen_prompt_14_10_define, /* next widget definition */
553 GX_NULL, /* no child widgets */
554 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_9), /* control block */
555 (void *) &main_screen_prompt_14_9_properties /* extended properties */
556 };
557
558 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_8_define =
559 {
560 "prompt_14_8",
561 GX_TYPE_PROMPT, /* widget type */
562 GX_ID_NONE, /* widget id */
563 #if defined(GX_WIDGET_USER_DATA)
564 0, /* user data */
565 #endif
566 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
567 0, /* status flags */
568 sizeof(GX_PROMPT), /* control block size */
569 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
570 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
571 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
572 gx_studio_prompt_create, /* create function */
573 GX_NULL, /* drawing function override */
574 GX_NULL, /* event function override */
575 {126, 208, 152, 225}, /* widget size */
576 &main_screen_prompt_14_9_define, /* next widget definition */
577 GX_NULL, /* no child widgets */
578 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_8), /* control block */
579 (void *) &main_screen_prompt_14_8_properties /* extended properties */
580 };
581
582 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_7_define =
583 {
584 "prompt_14_7",
585 GX_TYPE_PROMPT, /* widget type */
586 GX_ID_NONE, /* widget id */
587 #if defined(GX_WIDGET_USER_DATA)
588 0, /* user data */
589 #endif
590 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
591 0, /* status flags */
592 sizeof(GX_PROMPT), /* control block size */
593 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
594 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
595 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
596 gx_studio_prompt_create, /* create function */
597 GX_NULL, /* drawing function override */
598 GX_NULL, /* event function override */
599 {105, 156, 131, 173}, /* widget size */
600 &main_screen_prompt_14_8_define, /* next widget definition */
601 GX_NULL, /* no child widgets */
602 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_7), /* control block */
603 (void *) &main_screen_prompt_14_7_properties /* extended properties */
604 };
605
606 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_6_define =
607 {
608 "prompt_14_6",
609 GX_TYPE_PROMPT, /* widget type */
610 GX_ID_NONE, /* widget id */
611 #if defined(GX_WIDGET_USER_DATA)
612 0, /* user data */
613 #endif
614 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
615 0, /* status flags */
616 sizeof(GX_PROMPT), /* control block size */
617 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
618 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
619 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
620 gx_studio_prompt_create, /* create function */
621 GX_NULL, /* drawing function override */
622 GX_NULL, /* event function override */
623 {143, 107, 169, 124}, /* widget size */
624 &main_screen_prompt_14_7_define, /* next widget definition */
625 GX_NULL, /* no child widgets */
626 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_6), /* control block */
627 (void *) &main_screen_prompt_14_6_properties /* extended properties */
628 };
629
630 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_4_define =
631 {
632 "prompt_14_4",
633 GX_TYPE_PROMPT, /* widget type */
634 GX_ID_NONE, /* widget id */
635 #if defined(GX_WIDGET_USER_DATA)
636 0, /* user data */
637 #endif
638 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
639 0, /* status flags */
640 sizeof(GX_PROMPT), /* control block size */
641 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
642 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
643 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
644 gx_studio_prompt_create, /* create function */
645 GX_NULL, /* drawing function override */
646 GX_NULL, /* event function override */
647 {438, 356, 556, 373}, /* widget size */
648 &main_screen_prompt_14_6_define, /* next widget definition */
649 GX_NULL, /* no child widgets */
650 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_4), /* control block */
651 (void *) &main_screen_prompt_14_4_properties /* extended properties */
652 };
653
654 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_3_define =
655 {
656 "prompt_14_3",
657 GX_TYPE_PROMPT, /* widget type */
658 GX_ID_NONE, /* widget id */
659 #if defined(GX_WIDGET_USER_DATA)
660 0, /* user data */
661 #endif
662 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
663 0, /* status flags */
664 sizeof(GX_PROMPT), /* control block size */
665 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
666 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
667 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
668 gx_studio_prompt_create, /* create function */
669 GX_NULL, /* drawing function override */
670 GX_NULL, /* event function override */
671 {483, 305, 507, 322}, /* widget size */
672 &main_screen_prompt_14_4_define, /* next widget definition */
673 GX_NULL, /* no child widgets */
674 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_3), /* control block */
675 (void *) &main_screen_prompt_14_3_properties /* extended properties */
676 };
677
678 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_2_define =
679 {
680 "prompt_14_2",
681 GX_TYPE_PROMPT, /* widget type */
682 GX_ID_NONE, /* widget id */
683 #if defined(GX_WIDGET_USER_DATA)
684 0, /* user data */
685 #endif
686 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
687 0, /* status flags */
688 sizeof(GX_PROMPT), /* control block size */
689 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
690 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
691 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
692 gx_studio_prompt_create, /* create function */
693 GX_NULL, /* drawing function override */
694 GX_NULL, /* event function override */
695 {509, 258, 533, 275}, /* widget size */
696 &main_screen_prompt_14_3_define, /* next widget definition */
697 GX_NULL, /* no child widgets */
698 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_2), /* control block */
699 (void *) &main_screen_prompt_14_2_properties /* extended properties */
700 };
701
702 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_1_define =
703 {
704 "prompt_14_1",
705 GX_TYPE_PROMPT, /* widget type */
706 GX_ID_NONE, /* widget id */
707 #if defined(GX_WIDGET_USER_DATA)
708 0, /* user data */
709 #endif
710 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
711 0, /* status flags */
712 sizeof(GX_PROMPT), /* control block size */
713 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
714 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
715 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
716 gx_studio_prompt_create, /* create function */
717 GX_NULL, /* drawing function override */
718 GX_NULL, /* event function override */
719 {504, 205, 528, 222}, /* widget size */
720 &main_screen_prompt_14_2_define, /* next widget definition */
721 GX_NULL, /* no child widgets */
722 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_1), /* control block */
723 (void *) &main_screen_prompt_14_1_properties /* extended properties */
724 };
725
726 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_define =
727 {
728 "prompt_14",
729 GX_TYPE_PROMPT, /* widget type */
730 GX_ID_NONE, /* widget id */
731 #if defined(GX_WIDGET_USER_DATA)
732 0, /* user data */
733 #endif
734 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
735 0, /* status flags */
736 sizeof(GX_PROMPT), /* control block size */
737 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
738 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
739 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
740 gx_studio_prompt_create, /* create function */
741 GX_NULL, /* drawing function override */
742 GX_NULL, /* event function override */
743 {449, 156, 473, 173}, /* widget size */
744 &main_screen_prompt_14_1_define, /* next widget definition */
745 GX_NULL, /* no child widgets */
746 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14), /* control block */
747 (void *) &main_screen_prompt_14_properties /* extended properties */
748 };
749
750 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_14_5_define =
751 {
752 "prompt_14_5",
753 GX_TYPE_PROMPT, /* widget type */
754 GX_ID_NONE, /* widget id */
755 #if defined(GX_WIDGET_USER_DATA)
756 0, /* user data */
757 #endif
758 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
759 0, /* status flags */
760 sizeof(GX_PROMPT), /* control block size */
761 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
762 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
763 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
764 gx_studio_prompt_create, /* create function */
765 GX_NULL, /* drawing function override */
766 GX_NULL, /* event function override */
767 {456, 106, 480, 123}, /* widget size */
768 &main_screen_prompt_14_define, /* next widget definition */
769 GX_NULL, /* no child widgets */
770 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_14_5), /* control block */
771 (void *) &main_screen_prompt_14_5_properties /* extended properties */
772 };
773
774 GX_CONST GX_STUDIO_WIDGET main_screen_radial_slider_define =
775 {
776 "radial_slider",
777 GX_TYPE_RADIAL_SLIDER, /* widget type */
778 ID_RADIAL_SLIDER, /* widget id */
779 #if defined(GX_WIDGET_USER_DATA)
780 0, /* user data */
781 #endif
782 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED, /* style flags */
783 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
784 sizeof(GX_RADIAL_SLIDER), /* control block size */
785 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
786 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
787 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
788 gx_studio_radial_slider_create, /* create function */
789 GX_NULL, /* drawing function override */
790 GX_NULL, /* event function override */
791 {133, 109, 506, 370}, /* widget size */
792 &main_screen_prompt_14_5_define, /* next widget definition */
793 &main_screen_radial_slider_value_define, /* child widget definition */
794 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_radial_slider), /* control block */
795 (void *) &main_screen_radial_slider_properties /* extended properties */
796 };
797
798 GX_CONST GX_STUDIO_WIDGET main_screen_title_define =
799 {
800 "title",
801 GX_TYPE_PROMPT, /* widget type */
802 GX_ID_NONE, /* widget id */
803 #if defined(GX_WIDGET_USER_DATA)
804 0, /* user data */
805 #endif
806 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER, /* style flags */
807 0, /* status flags */
808 sizeof(GX_PROMPT), /* control block size */
809 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
810 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
811 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
812 gx_studio_prompt_create, /* create function */
813 GX_NULL, /* drawing function override */
814 GX_NULL, /* event function override */
815 {237, 32, 363, 52}, /* widget size */
816 &main_screen_radial_slider_define, /* next widget definition */
817 GX_NULL, /* no child widgets */
818 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_title), /* control block */
819 (void *) &main_screen_title_properties /* extended properties */
820 };
821
822 GX_CONST GX_STUDIO_WIDGET main_screen_logo_define =
823 {
824 "logo",
825 GX_TYPE_ICON, /* widget type */
826 GX_ID_NONE, /* widget id */
827 #if defined(GX_WIDGET_USER_DATA)
828 0, /* user data */
829 #endif
830 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP, /* style flags */
831 0, /* status flags */
832 sizeof(GX_ICON), /* control block size */
833 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
834 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
835 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
836 gx_studio_icon_create, /* create function */
837 GX_NULL, /* drawing function override */
838 GX_NULL, /* event function override */
839 {10, 10, 198, 39}, /* widget size */
840 &main_screen_title_define, /* next widget definition */
841 GX_NULL, /* no child widgets */
842 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_logo), /* control block */
843 (void *) &main_screen_logo_properties /* extended properties */
844 };
845
846 GX_CONST GX_STUDIO_WIDGET main_screen_define =
847 {
848 "main_screen",
849 GX_TYPE_WINDOW, /* widget type */
850 GX_ID_NONE, /* widget id */
851 #if defined(GX_WIDGET_USER_DATA)
852 0, /* user data */
853 #endif
854 GX_STYLE_BORDER_NONE|GX_STYLE_TILE_WALLPAPER, /* style flags */
855 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
856 sizeof(MAIN_SCREEN_CONTROL_BLOCK), /* control block size */
857 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
858 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
859 GX_COLOR_ID_WINDOW_FILL, /* disabled color id */
860 gx_studio_window_create, /* create function */
861 GX_NULL, /* drawing function override */
862 (UINT (*)(GX_WIDGET *, GX_EVENT *)) main_screen_event_handler, /* event function override */
863 {0, 0, 639, 479}, /* widget size */
864 GX_NULL, /* next widget */
865 &main_screen_logo_define, /* child widget */
866 0, /* control block */
867 (void *) &main_screen_properties /* extended properties */
868 };
869 GX_CONST GX_STUDIO_WIDGET_ENTRY demo_guix_radial_slider_widget_table[] =
870 {
871 { &main_screen_define, (GX_WIDGET *) &main_screen },
872 {GX_NULL, GX_NULL}
873 };
874
gx_studio_nested_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)875 static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
876 {
877 UINT status = GX_SUCCESS;
878 GX_WIDGET *widget = GX_NULL;
879 GX_VALUE list_count = 0;
880 GX_VALUE list_total_count = 0;
881
882 if(parent && (parent->gx_widget_type == GX_TYPE_MENU))
883 {
884 list_total_count = ((GX_MENU *)parent)->gx_menu_list_total_count;
885 }
886
887 while(definition && status == GX_SUCCESS)
888 {
889 if (definition->create_function)
890 {
891 if (definition->style & GX_STYLE_DYNAMICALLY_ALLOCATED)
892 {
893 status = gx_widget_allocate(&widget, definition->control_block_size);
894 if (status != GX_SUCCESS)
895 {
896 return GX_NULL;
897 }
898 }
899 else
900 {
901 if (control == GX_NULL)
902 {
903 return GX_NULL;
904 }
905 widget = (GX_WIDGET *) (control + definition->control_block_offset);
906 }
907
908 status = definition->create_function(definition, widget, parent);
909
910 if(list_count < list_total_count)
911 {
912 gx_menu_insert((GX_MENU *)parent, widget);
913 ((GX_MENU *)parent)->gx_menu_list_total_count--;
914 list_count++;
915 }
916
917 if (status == GX_SUCCESS)
918 {
919 if (definition->widget_type != GX_TYPE_TEMPLATE)
920 {
921 #if defined(GUIX_5_4_0_COMPATIBILITY)
922 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id);
923 #else
924 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id, definition->disabled_fill_color_id);
925 #endif
926 }
927
928 if (!(definition->status & GX_STATUS_ACCEPTS_FOCUS))
929 {
930 gx_widget_status_remove(widget, GX_STATUS_ACCEPTS_FOCUS);
931 }
932
933 if (definition->draw_function)
934 {
935 gx_widget_draw_set(widget, definition->draw_function);
936 }
937 if (definition->event_function)
938 {
939 gx_widget_event_process_set(widget, definition->event_function);
940 }
941
942 #if defined(GX_WIDGET_USER_DATA)
943 widget->gx_widget_user_data = definition->user_data;
944 #endif
945
946 if (definition->child_widget)
947 {
948 gx_studio_nested_widget_create(control, definition->child_widget, widget);
949 }
950 }
951 definition = definition->next_widget;
952 }
953 }
954 return widget;
955 }
956
gx_studio_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)957 GX_WIDGET *gx_studio_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
958 {
959 GX_WIDGET *widget;
960 widget = gx_studio_nested_widget_create(control, definition, GX_NULL);
961
962 if (parent && widget)
963 {
964 gx_widget_attach(parent, widget);
965 }
966 return widget;
967 }
968
gx_studio_named_widget_create(char * name,GX_WIDGET * parent,GX_WIDGET ** new_widget)969 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget)
970 {
971 UINT status = GX_FAILURE;
972 GX_CONST GX_STUDIO_WIDGET_ENTRY *entry = demo_guix_radial_slider_widget_table;
973 GX_WIDGET *widget = GX_NULL;
974
975 while(entry->widget_information)
976 {
977 if (!strcmp(name, entry->widget_information->widget_name))
978 {
979 widget = gx_studio_widget_create((GX_BYTE *) entry->widget, entry->widget_information, parent);
980 if (widget)
981 {
982 status = GX_SUCCESS;
983 }
984 break;
985 }
986 entry++;
987 }
988
989 if (new_widget)
990 {
991 *new_widget = widget;
992 }
993 return status;
994 }
995
996
gx_studio_display_configure(USHORT display,UINT (* driver)(GX_DISPLAY *),GX_UBYTE language,USHORT theme,GX_WINDOW_ROOT ** return_root)997 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *),
998 GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root)
999 {
1000 GX_CONST GX_THEME *theme_ptr;
1001 GX_RECTANGLE size;
1002
1003 GX_STUDIO_DISPLAY_INFO *display_info = &demo_guix_radial_slider_display_table[display];
1004
1005
1006 /* create the requested display */
1007
1008 gx_display_create(display_info->display,
1009 display_info->name,
1010 driver,
1011 (GX_VALUE) display_info->x_resolution,
1012 (GX_VALUE) display_info->y_resolution);
1013
1014
1015 /* install the request theme */
1016
1017 if(display_info->theme_table)
1018 {
1019 theme_ptr = display_info->theme_table[theme];
1020 if(theme_ptr)
1021 {
1022 gx_display_color_table_set(display_info->display, theme_ptr->theme_color_table, theme_ptr->theme_color_table_size);
1023
1024 /* install the color palette if required */
1025 if (display_info->display->gx_display_driver_palette_set &&
1026 theme_ptr->theme_palette != NULL)
1027 {
1028 display_info->display->gx_display_driver_palette_set(display_info->display, theme_ptr->theme_palette, theme_ptr->theme_palette_size);
1029 }
1030
1031 gx_display_font_table_set(display_info->display, theme_ptr->theme_font_table, theme_ptr->theme_font_table_size);
1032 gx_display_pixelmap_table_set(display_info->display, theme_ptr->theme_pixelmap_table, theme_ptr->theme_pixelmap_table_size);
1033 gx_system_scroll_appearance_set(theme_ptr->theme_vertical_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_vertical_scrollbar_appearance);
1034 gx_system_scroll_appearance_set(theme_ptr->theme_horizontal_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_horizontal_scrollbar_appearance);
1035 }
1036 }
1037
1038 /* Install the language table. */
1039
1040 if(display_info->language_table)
1041 {
1042 gx_display_language_table_set_ext(display_info->display, display_info->language_table, (GX_UBYTE) display_info->language_table_size, display_info->string_table_size);
1043 gx_display_active_language_set(display_info->display, language);
1044 }
1045
1046 /* Set screen rotation angle. */
1047
1048 display_info->display->gx_display_rotation_angle = display_info->rotation_angle;
1049
1050 /* create the canvas for this display */
1051
1052 gx_canvas_create(display_info->canvas,
1053 display_info->canvas_name,
1054 display_info->display,
1055 GX_CANVAS_MANAGED | GX_CANVAS_VISIBLE,
1056 display_info->x_resolution,
1057 display_info->y_resolution,
1058 display_info->canvas_memory,
1059 display_info->canvas_memory_size);
1060
1061 /* Create the root window for this canvas */
1062
1063 gx_utility_rectangle_define(&size,
1064 0, 0,
1065 (GX_VALUE) (display_info->x_resolution - 1),
1066 (GX_VALUE) (display_info->y_resolution - 1));
1067
1068 gx_window_root_create(display_info->root_window,
1069 display_info->name,
1070 display_info->canvas, GX_STYLE_NONE, 0, &size);
1071 if (return_root)
1072 {
1073 *return_root = display_info->root_window;
1074 }
1075 return GX_SUCCESS;
1076 }
1077 #undef GUIX_STUDIO_GENERATED_FILE
1078