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.2.0.1 */
9 /* Date (dd.mm.yyyy): 31.10.2022 Time (hh:mm): 14:11 */
10 /*******************************************************************************/
11
12
13 #define GUIX_STUDIO_GENERATED_FILE
14 #include <stddef.h>
15 #include "pixelmaps_32bpp_resources.h"
16 #include "pixelmaps_32bpp_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_WINDOW_CONTROL_BLOCK main_window;
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[153600];
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 pixelmaps_32bpp_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 480, /* x resolution */
39 320, /* 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 614400, /* canvas memory size in bytes */
45 0 /* rotation angle */
46 }
47 };
48
49
gx_studio_text_button_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)50 UINT gx_studio_text_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
51 {
52 UINT status;
53 GX_TEXT_BUTTON *button = (GX_TEXT_BUTTON *) control_block;
54 GX_TEXT_BUTTON_PROPERTIES *props = (GX_TEXT_BUTTON_PROPERTIES *) info->properties;
55 status = gx_text_button_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
56 if (status == GX_SUCCESS)
57 {
58 gx_text_button_font_set(button, props->font_id);
59 #if defined(GUIX_5_4_0_COMPATIBILITY)
60 gx_text_button_text_color_set(button, props->normal_text_color_id, props->selected_text_color_id);
61 #else
62 gx_text_button_text_color_set(button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
63 #endif
64 }
65 return status;
66 }
67
gx_studio_checkbox_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)68 UINT gx_studio_checkbox_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
69 {
70 UINT status;
71 GX_CHECKBOX *button = (GX_CHECKBOX *) control_block;
72 GX_TEXT_BUTTON *text_button = (GX_TEXT_BUTTON *) button;
73 GX_CHECKBOX_PROPERTIES *props = (GX_CHECKBOX_PROPERTIES *) info->properties;
74 status = gx_checkbox_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
75 if (status == GX_SUCCESS)
76 {
77 gx_text_button_font_set(text_button, props->font_id);
78 #if defined(GUIX_5_4_0_COMPATIBILITY)
79 gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id);
80 #else
81 gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
82 #endif
83
84 if (props->unchecked_pixelmap_id ||
85 props->checked_pixelmap_id ||
86 props->unchecked_disabled_pixelmap_id ||
87 props->checked_disabled_pixelmap_id)
88 {
89 gx_checkbox_pixelmap_set(button,
90 props->unchecked_pixelmap_id,
91 props->checked_pixelmap_id,
92 props->unchecked_disabled_pixelmap_id,
93 props->checked_disabled_pixelmap_id);
94 }
95 }
96 return status;
97 }
98
gx_studio_radio_button_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)99 UINT gx_studio_radio_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
100 {
101 UINT status;
102 GX_RADIO_BUTTON *button = (GX_RADIO_BUTTON *) control_block;
103 GX_TEXT_BUTTON *text_button = (GX_TEXT_BUTTON *) button;
104 GX_RADIO_BUTTON_PROPERTIES *props = (GX_RADIO_BUTTON_PROPERTIES *) info->properties;
105 status = gx_radio_button_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
106 if (status == GX_SUCCESS)
107 {
108 gx_text_button_font_set(text_button, props->font_id);
109 #if defined(GUIX_5_4_0_COMPATIBILITY)
110 gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id);
111 #else
112 gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
113 #endif
114
115 if (props->off_pixelmap_id ||
116 props->on_pixelmap_id ||
117 props->off_disabled_pixelmap_id ||
118 props->on_disabled_pixelmap_id)
119 {
120 gx_radio_button_pixelmap_set(button,
121 props->off_pixelmap_id,
122 props->on_pixelmap_id,
123 props->off_disabled_pixelmap_id,
124 props->on_disabled_pixelmap_id);
125 }
126 }
127 return status;
128 }
129
gx_studio_slider_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)130 UINT gx_studio_slider_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
131 {
132 UINT status;
133 GX_SLIDER *slider = (GX_SLIDER *) control_block;
134 GX_SLIDER_PROPERTIES *props = (GX_SLIDER_PROPERTIES *) info->properties;
135 GX_SLIDER_INFO slider_info;
136 slider_info.gx_slider_info_min_val = props->minval;
137 slider_info.gx_slider_info_max_val = props->maxval;
138 slider_info.gx_slider_info_current_val = props->current_val;
139 slider_info.gx_slider_info_increment = props->increment;
140 slider_info.gx_slider_info_min_travel = props->min_travel;
141 slider_info.gx_slider_info_max_travel = props->max_travel;
142 slider_info.gx_slider_info_needle_width = props->needle_width;
143 slider_info.gx_slider_info_needle_height = props->needle_height;
144 slider_info.gx_slider_info_needle_inset = props->needle_inset;
145 slider_info.gx_slider_info_needle_hotspot_offset = props->needle_hotspot;
146 status = gx_slider_create(slider,
147 info->widget_name,
148 parent,
149 props->tickmark_count,
150 &slider_info,
151 info->style,
152 info->widget_id,
153 &info->size);
154 return status;
155 }
156
gx_studio_progress_bar_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)157 UINT gx_studio_progress_bar_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
158 {
159 UINT status;
160 GX_PROGRESS_BAR *bar = (GX_PROGRESS_BAR *) control_block;
161 GX_PROGRESS_BAR_INFO *bar_info = (GX_PROGRESS_BAR_INFO *) info->properties;
162 status = gx_progress_bar_create(bar,
163 info->widget_name,
164 parent,
165 bar_info,
166 info->style,
167 info->widget_id,
168 &info->size);
169 return status;
170 }
171
gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)172 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
173 {
174 UINT status;
175 GX_PROMPT *prompt = (GX_PROMPT *) control_block;
176 GX_PROMPT_PROPERTIES *props = (GX_PROMPT_PROPERTIES *) info->properties;
177 status = gx_prompt_create(prompt, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
178 if (status == GX_SUCCESS)
179 {
180 gx_prompt_font_set(prompt, props->font_id);
181 #if defined(GUIX_5_4_0_COMPATIBILITY)
182 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id);
183 #else
184 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
185 #endif
186 }
187 return status;
188 }
189
gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)190 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
191 {
192 UINT status;
193 GX_WINDOW *window = (GX_WINDOW *) control_block;
194 GX_WINDOW_PROPERTIES *props = (GX_WINDOW_PROPERTIES *) info->properties;
195 status = gx_window_create(window, info->widget_name, parent, info->style, info->widget_id, &info->size);
196 if (status == GX_SUCCESS)
197 {
198 if (props->wallpaper_id)
199 {
200 gx_window_wallpaper_set(window, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
201 }
202 }
203 return status;
204 }
205
gx_studio_multi_line_text_view_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)206 UINT gx_studio_multi_line_text_view_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
207 {
208 UINT status;
209 GX_MULTI_LINE_TEXT_VIEW *view = (GX_MULTI_LINE_TEXT_VIEW *) control_block;
210 GX_ML_TEXT_VIEW_PROPERTIES *props = (GX_ML_TEXT_VIEW_PROPERTIES *) info->properties;
211 status = gx_multi_line_text_view_create(view, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
212 if (status == GX_SUCCESS)
213 {
214 gx_multi_line_text_view_font_set(view, props->font_id);
215 #if defined(GUIX_5_4_0_COMPATIBILITY)
216 gx_multi_line_text_view_text_color_set(view, props->normal_text_color_id, props->selected_text_color_id);
217 #else
218 gx_multi_line_text_view_text_color_set(view, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
219 #endif
220 gx_multi_line_text_view_whitespace_set(view, props->whitespace);
221 gx_multi_line_text_view_line_space_set(view, props->line_space);
222 }
223 return status;
224 }
225 GX_WINDOW_PROPERTIES main_window_properties =
226 {
227 0 /* wallpaper pixelmap id */
228 };
229 GX_WINDOW_PROPERTIES main_window_pic_window_properties =
230 {
231 GX_PIXELMAP_ID_COMPRESS_ALPHA_32BPP /* wallpaper pixelmap id */
232 };
233 GX_WINDOW_PROPERTIES main_window_window_2_properties =
234 {
235 0 /* wallpaper pixelmap id */
236 };
237 GX_PROMPT_PROPERTIES main_window_prompt_1_properties =
238 {
239 GX_STRING_ID_STRING_16, /* string id */
240 GX_FONT_ID_PROMPT, /* font id */
241 GX_COLOR_ID_TEXT, /* normal text color */
242 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
243 GX_COLOR_ID_TEXT /* disabled text color */
244 };
245 GX_TEXT_BUTTON_PROPERTIES main_window_button_1_properties =
246 {
247 GX_STRING_ID_STRING_17, /* string id */
248 GX_FONT_ID_BUTTON, /* font id */
249 GX_COLOR_ID_WINDOW_BORDER, /* normal text color */
250 GX_COLOR_ID_WINDOW_BORDER, /* selected text color */
251 GX_COLOR_ID_WINDOW_BORDER /* disabled text color */
252 };
253 GX_PROGRESS_BAR_INFO main_window_progress_bar_1_properties =
254 {
255 0, /* mimimun value */
256 100, /* maximum value */
257 50, /* current value */
258 GX_FONT_ID_SYSTEM, /* font_id */
259 GX_COLOR_ID_TEXT, /* normal text color */
260 GX_COLOR_ID_TEXT, /* selected text color */
261 GX_COLOR_ID_TEXT, /* disabled text color */
262 0 /* fill pixelmap */
263 };
264 GX_ML_TEXT_VIEW_PROPERTIES main_window_text_view_1_properties =
265 {
266 GX_STRING_ID_STRING_18, /* string id */
267 GX_FONT_ID_TEXT_INPUT, /* font id */
268 GX_COLOR_ID_TEXT, /* normal text color */
269 GX_COLOR_ID_TEXT, /* selected text color */
270 GX_COLOR_ID_TEXT, /* disabled text color */
271 0, /* whitespace */
272 0 /* line_space */
273 };
274 GX_PROMPT_PROPERTIES main_window_prompt_properties =
275 {
276 GX_STRING_ID_STRING_20, /* string id */
277 GX_FONT_ID_FONT_1BPP, /* font id */
278 GX_COLOR_ID_GREEN, /* normal text color */
279 GX_COLOR_ID_GREEN, /* selected text color */
280 GX_COLOR_ID_GREEN /* disabled text color */
281 };
282 GX_PROMPT_PROPERTIES main_window_prompt_2_properties =
283 {
284 GX_STRING_ID_STRING_19, /* string id */
285 GX_FONT_ID_FONT_4BPP, /* font id */
286 GX_COLOR_ID_RED, /* normal text color */
287 GX_COLOR_ID_RED, /* selected text color */
288 GX_COLOR_ID_RED /* disabled text color */
289 };
290 GX_CHECKBOX_PROPERTIES main_window_alpha_box_properties =
291 {
292 GX_STRING_ID_STRING_2, /* string id */
293 GX_FONT_ID_BUTTON, /* font id */
294 GX_COLOR_ID_BTN_TEXT, /* normal text color */
295 GX_COLOR_ID_BTN_TEXT, /* selected text color */
296 GX_COLOR_ID_BTN_TEXT, /* disabled text color */
297 0, /* unchecked pixelmap id */
298 0, /* checked pixelmap id */
299 0, /* unchecked disabled pixelmap id */
300 0 /* checked disabled pixelmap id */
301 };
302 GX_CHECKBOX_PROPERTIES main_window_compressed_box_properties =
303 {
304 GX_STRING_ID_STRING_4, /* string id */
305 GX_FONT_ID_BUTTON, /* font id */
306 GX_COLOR_ID_BTN_TEXT, /* normal text color */
307 GX_COLOR_ID_BTN_TEXT, /* selected text color */
308 GX_COLOR_ID_BTN_TEXT, /* disabled text color */
309 0, /* unchecked pixelmap id */
310 0, /* checked pixelmap id */
311 0, /* unchecked disabled pixelmap id */
312 0 /* checked disabled pixelmap id */
313 };
314 GX_WINDOW_PROPERTIES main_window_window_properties =
315 {
316 0 /* wallpaper pixelmap id */
317 };
318 GX_RADIO_BUTTON_PROPERTIES main_window_radio_button_4_properties =
319 {
320 GX_STRING_ID_STRING_6, /* string id */
321 GX_FONT_ID_BUTTON, /* font id */
322 GX_COLOR_ID_BTN_TEXT, /* normal text color */
323 GX_COLOR_ID_BTN_TEXT, /* selected text color */
324 GX_COLOR_ID_BTN_TEXT, /* disabled text color */
325 0, /* off pixelmap id */
326 0, /* on pixelmap id */
327 0, /* off disabled pixelmap id */
328 0 /* on disabled pixelmap id */
329 };
330 GX_RADIO_BUTTON_PROPERTIES main_window_radio_button_properties =
331 {
332 GX_STRING_ID_STRING_7, /* string id */
333 GX_FONT_ID_BUTTON, /* font id */
334 GX_COLOR_ID_BTN_TEXT, /* normal text color */
335 GX_COLOR_ID_BTN_TEXT, /* selected text color */
336 GX_COLOR_ID_BTN_TEXT, /* disabled text color */
337 0, /* off pixelmap id */
338 0, /* on pixelmap id */
339 0, /* off disabled pixelmap id */
340 0 /* on disabled pixelmap id */
341 };
342 GX_RADIO_BUTTON_PROPERTIES main_window_radio_button_1_properties =
343 {
344 GX_STRING_ID_STRING_9, /* string id */
345 GX_FONT_ID_BUTTON, /* font id */
346 GX_COLOR_ID_BTN_TEXT, /* normal text color */
347 GX_COLOR_ID_BTN_TEXT, /* selected text color */
348 GX_COLOR_ID_BTN_TEXT, /* disabled text color */
349 0, /* off pixelmap id */
350 0, /* on pixelmap id */
351 0, /* off disabled pixelmap id */
352 0 /* on disabled pixelmap id */
353 };
354 GX_RADIO_BUTTON_PROPERTIES main_window_radio_button_2_properties =
355 {
356 GX_STRING_ID_STRING_12, /* string id */
357 GX_FONT_ID_BUTTON, /* font id */
358 GX_COLOR_ID_BTN_TEXT, /* normal text color */
359 GX_COLOR_ID_BTN_TEXT, /* selected text color */
360 GX_COLOR_ID_BTN_TEXT, /* disabled text color */
361 0, /* off pixelmap id */
362 0, /* on pixelmap id */
363 0, /* off disabled pixelmap id */
364 0 /* on disabled pixelmap id */
365 };
366 GX_PROMPT_PROPERTIES main_window_prompt_11_2_properties =
367 {
368 GX_STRING_ID_STRING_14, /* string id */
369 GX_FONT_ID_PROMPT, /* font id */
370 GX_COLOR_ID_TEXT, /* normal text color */
371 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
372 GX_COLOR_ID_TEXT /* disabled text color */
373 };
374 GX_PROMPT_PROPERTIES main_window_prompt_11_properties =
375 {
376 GX_STRING_ID_STRING_61, /* string id */
377 GX_FONT_ID_PROMPT, /* font id */
378 GX_COLOR_ID_TEXT, /* normal text color */
379 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
380 GX_COLOR_ID_TEXT /* disabled text color */
381 };
382 GX_SLIDER_PROPERTIES main_window_brush_alpha_slider_1_properties =
383 {
384 10, /* tickmark count */
385 0, /* mimimun value */
386 255, /* maximum value */
387 255, /* current value */
388 1, /* increment */
389 10, /* minimum travel */
390 10, /* maximum travel */
391 5, /* needle width */
392 14, /* needle height */
393 5, /* needle inset */
394 1 /* needle hotspot */
395 };
396 GX_PROMPT_PROPERTIES main_window_prompt_12_1_properties =
397 {
398 GX_STRING_ID_STRING_62, /* string id */
399 GX_FONT_ID_PROMPT, /* font id */
400 GX_COLOR_ID_SELECTED_TEXT, /* normal text color */
401 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
402 GX_COLOR_ID_SELECTED_TEXT /* disabled text color */
403 };
404 GX_PROMPT_PROPERTIES main_window_prompt_11_1_properties =
405 {
406 GX_STRING_ID_STRING_13, /* string id */
407 GX_FONT_ID_PROMPT, /* font id */
408 GX_COLOR_ID_TEXT, /* normal text color */
409 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
410 GX_COLOR_ID_TEXT /* disabled text color */
411 };
412
413 GX_CONST GX_STUDIO_WIDGET main_window_prompt_1_define =
414 {
415 "prompt_1",
416 GX_TYPE_PROMPT, /* widget type */
417 GX_ID_NONE, /* widget id */
418 #if defined(GX_WIDGET_USER_DATA)
419 0, /* user data */
420 #endif
421 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
422 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
423 sizeof(GX_PROMPT), /* control block size */
424 GX_COLOR_ID_BTN_BORDER, /* normal color id */
425 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
426 GX_COLOR_ID_BTN_BORDER, /* disabled color id */
427 gx_studio_prompt_create, /* create function */
428 GX_NULL, /* drawing function override */
429 GX_NULL, /* event function override */
430 {27, 179, 106, 202}, /* widget size */
431 GX_NULL, /* no next widget */
432 GX_NULL, /* no child widgets */
433 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_prompt_1), /* control block */
434 (void *) &main_window_prompt_1_properties /* extended properties */
435 };
436
437 GX_CONST GX_STUDIO_WIDGET main_window_prompt_2_define =
438 {
439 "prompt_2",
440 GX_TYPE_PROMPT, /* widget type */
441 GX_ID_NONE, /* widget id */
442 #if defined(GX_WIDGET_USER_DATA)
443 0, /* user data */
444 #endif
445 GX_STYLE_BORDER_THIN|GX_STYLE_TEXT_CENTER, /* style flags */
446 0, /* status flags */
447 sizeof(GX_PROMPT), /* control block size */
448 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
449 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
450 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
451 gx_studio_prompt_create, /* create function */
452 GX_NULL, /* drawing function override */
453 GX_NULL, /* event function override */
454 {30, 141, 111, 164}, /* widget size */
455 GX_NULL, /* no next widget */
456 GX_NULL, /* no child widgets */
457 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_prompt_2), /* control block */
458 (void *) &main_window_prompt_2_properties /* extended properties */
459 };
460
461 GX_CONST GX_STUDIO_WIDGET main_window_prompt_define =
462 {
463 "prompt",
464 GX_TYPE_PROMPT, /* widget type */
465 GX_ID_NONE, /* widget id */
466 #if defined(GX_WIDGET_USER_DATA)
467 0, /* user data */
468 #endif
469 GX_STYLE_BORDER_THIN|GX_STYLE_TEXT_CENTER, /* style flags */
470 0, /* status flags */
471 sizeof(GX_PROMPT), /* control block size */
472 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
473 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
474 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
475 gx_studio_prompt_create, /* create function */
476 GX_NULL, /* drawing function override */
477 GX_NULL, /* event function override */
478 {27, 111, 106, 134}, /* widget size */
479 &main_window_prompt_2_define, /* next widget definition */
480 GX_NULL, /* no child widgets */
481 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_prompt), /* control block */
482 (void *) &main_window_prompt_properties /* extended properties */
483 };
484
485 GX_CONST GX_STUDIO_WIDGET main_window_text_view_1_define =
486 {
487 "text_view_1",
488 GX_TYPE_MULTI_LINE_TEXT_VIEW, /* widget type */
489 GX_ID_NONE, /* widget id */
490 #if defined(GX_WIDGET_USER_DATA)
491 0, /* user data */
492 #endif
493 GX_STYLE_BORDER_THIN|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
494 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
495 sizeof(GX_MULTI_LINE_TEXT_VIEW), /* control block size */
496 GX_COLOR_ID_SCROLL_BUTTON, /* normal color id */
497 GX_COLOR_ID_SCROLL_BUTTON, /* selected color id */
498 GX_COLOR_ID_SCROLL_BUTTON, /* disabled color id */
499 gx_studio_multi_line_text_view_create, /* create function */
500 GX_NULL, /* drawing function override */
501 GX_NULL, /* event function override */
502 {125, 171, 257, 279}, /* widget size */
503 &main_window_prompt_define, /* next widget definition */
504 GX_NULL, /* no child widgets */
505 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_text_view_1), /* control block */
506 (void *) &main_window_text_view_1_properties /* extended properties */
507 };
508
509 GX_CONST GX_STUDIO_WIDGET main_window_progress_bar_1_define =
510 {
511 "progress_bar_1",
512 GX_TYPE_PROGRESS_BAR, /* widget type */
513 GX_ID_NONE, /* widget id */
514 #if defined(GX_WIDGET_USER_DATA)
515 0, /* user data */
516 #endif
517 GX_STYLE_BORDER_RAISED|GX_STYLE_PROGRESS_PERCENT|GX_STYLE_PROGRESS_TEXT_DRAW, /* style flags */
518 0, /* status flags */
519 sizeof(GX_PROGRESS_BAR), /* control block size */
520 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
521 GX_COLOR_ID_WINDOW_BORDER, /* selected color id */
522 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
523 gx_studio_progress_bar_create, /* create function */
524 GX_NULL, /* drawing function override */
525 GX_NULL, /* event function override */
526 {26, 258, 105, 281}, /* widget size */
527 &main_window_text_view_1_define, /* next widget definition */
528 GX_NULL, /* no child widgets */
529 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_progress_bar_1), /* control block */
530 (void *) &main_window_progress_bar_1_properties /* extended properties */
531 };
532
533 GX_CONST GX_STUDIO_WIDGET main_window_button_1_define =
534 {
535 "button_1",
536 GX_TYPE_TEXT_BUTTON, /* widget type */
537 GX_ID_NONE, /* widget id */
538 #if defined(GX_WIDGET_USER_DATA)
539 0, /* user data */
540 #endif
541 GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
542 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
543 sizeof(GX_TEXT_BUTTON), /* control block size */
544 GX_COLOR_ID_BTN_LOWER, /* normal color id */
545 GX_COLOR_ID_BTN_UPPER, /* selected color id */
546 GX_COLOR_ID_BTN_LOWER, /* disabled color id */
547 gx_studio_text_button_create, /* create function */
548 GX_NULL, /* drawing function override */
549 GX_NULL, /* event function override */
550 {26, 222, 108, 245}, /* widget size */
551 &main_window_progress_bar_1_define, /* next widget definition */
552 GX_NULL, /* no child widgets */
553 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_button_1), /* control block */
554 (void *) &main_window_button_1_properties /* extended properties */
555 };
556
557 GX_CONST GX_STUDIO_WIDGET main_window_window_2_define =
558 {
559 "window_2",
560 GX_TYPE_WINDOW, /* widget type */
561 GX_ID_NONE, /* widget id */
562 #if defined(GX_WIDGET_USER_DATA)
563 0, /* user data */
564 #endif
565 GX_STYLE_BORDER_THICK, /* style flags */
566 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
567 sizeof(GX_WINDOW), /* control block size */
568 GX_COLOR_ID_BTN_BORDER, /* normal color id */
569 GX_COLOR_ID_BTN_BORDER, /* selected color id */
570 GX_COLOR_ID_BTN_BORDER, /* disabled color id */
571 gx_studio_window_create, /* create function */
572 GX_NULL, /* drawing function override */
573 GX_NULL, /* event function override */
574 {26, 171, 109, 208}, /* widget size */
575 &main_window_button_1_define, /* next widget definition */
576 &main_window_prompt_1_define, /* child widget definition */
577 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_window_2), /* control block */
578 (void *) &main_window_window_2_properties /* extended properties */
579 };
580
581 GX_CONST GX_STUDIO_WIDGET main_window_prompt_11_2_define =
582 {
583 "prompt_11_2",
584 GX_TYPE_PROMPT, /* widget type */
585 GX_ID_NONE, /* widget id */
586 #if defined(GX_WIDGET_USER_DATA)
587 0, /* user data */
588 #endif
589 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
590 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
591 sizeof(GX_PROMPT), /* control block size */
592 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
593 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
594 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
595 gx_studio_prompt_create, /* create function */
596 GX_NULL, /* drawing function override */
597 GX_NULL, /* event function override */
598 {276, 157, 353, 180}, /* widget size */
599 GX_NULL, /* no next widget */
600 GX_NULL, /* no child widgets */
601 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_prompt_11_2), /* control block */
602 (void *) &main_window_prompt_11_2_properties /* extended properties */
603 };
604
605 GX_CONST GX_STUDIO_WIDGET main_window_radio_button_2_define =
606 {
607 "radio_button_2",
608 GX_TYPE_RADIO_BUTTON, /* widget type */
609 ID_PALETTE_MAPS, /* widget id */
610 #if defined(GX_WIDGET_USER_DATA)
611 0, /* user data */
612 #endif
613 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_BUTTON_RADIO|GX_STYLE_TEXT_LEFT, /* style flags */
614 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
615 sizeof(GX_RADIO_BUTTON), /* control block size */
616 GX_COLOR_ID_BTN_LOWER, /* normal color id */
617 GX_COLOR_ID_BTN_UPPER, /* selected color id */
618 GX_COLOR_ID_BTN_LOWER, /* disabled color id */
619 gx_studio_radio_button_create, /* create function */
620 GX_NULL, /* drawing function override */
621 GX_NULL, /* event function override */
622 {289, 261, 449, 284}, /* widget size */
623 &main_window_prompt_11_2_define, /* next widget definition */
624 GX_NULL, /* no child widgets */
625 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_radio_button_2), /* control block */
626 (void *) &main_window_radio_button_2_properties /* extended properties */
627 };
628
629 GX_CONST GX_STUDIO_WIDGET main_window_radio_button_1_define =
630 {
631 "radio_button_1",
632 GX_TYPE_RADIO_BUTTON, /* widget type */
633 ID_4444ARGB_MAPS, /* widget id */
634 #if defined(GX_WIDGET_USER_DATA)
635 0, /* user data */
636 #endif
637 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_BUTTON_RADIO|GX_STYLE_TEXT_LEFT, /* style flags */
638 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
639 sizeof(GX_RADIO_BUTTON), /* control block size */
640 GX_COLOR_ID_BTN_LOWER, /* normal color id */
641 GX_COLOR_ID_BTN_UPPER, /* selected color id */
642 GX_COLOR_ID_BTN_LOWER, /* disabled color id */
643 gx_studio_radio_button_create, /* create function */
644 GX_NULL, /* drawing function override */
645 GX_NULL, /* event function override */
646 {289, 235, 429, 258}, /* widget size */
647 &main_window_radio_button_2_define, /* next widget definition */
648 GX_NULL, /* no child widgets */
649 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_radio_button_1), /* control block */
650 (void *) &main_window_radio_button_1_properties /* extended properties */
651 };
652
653 GX_CONST GX_STUDIO_WIDGET main_window_radio_button_define =
654 {
655 "radio_button",
656 GX_TYPE_RADIO_BUTTON, /* widget type */
657 ID_565RGB_MAPS, /* widget id */
658 #if defined(GX_WIDGET_USER_DATA)
659 0, /* user data */
660 #endif
661 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_BUTTON_RADIO|GX_STYLE_TEXT_LEFT, /* style flags */
662 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
663 sizeof(GX_RADIO_BUTTON), /* control block size */
664 GX_COLOR_ID_BTN_LOWER, /* normal color id */
665 GX_COLOR_ID_BTN_UPPER, /* selected color id */
666 GX_COLOR_ID_BTN_LOWER, /* disabled color id */
667 gx_studio_radio_button_create, /* create function */
668 GX_NULL, /* drawing function override */
669 GX_NULL, /* event function override */
670 {289, 209, 412, 232}, /* widget size */
671 &main_window_radio_button_1_define, /* next widget definition */
672 GX_NULL, /* no child widgets */
673 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_radio_button), /* control block */
674 (void *) &main_window_radio_button_properties /* extended properties */
675 };
676
677 GX_CONST GX_STUDIO_WIDGET main_window_radio_button_4_define =
678 {
679 "radio_button_4",
680 GX_TYPE_RADIO_BUTTON, /* widget type */
681 ID_32BPP_MAPS, /* widget id */
682 #if defined(GX_WIDGET_USER_DATA)
683 0, /* user data */
684 #endif
685 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_BUTTON_PUSHED|GX_STYLE_BUTTON_RADIO|GX_STYLE_TEXT_LEFT, /* style flags */
686 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
687 sizeof(GX_RADIO_BUTTON), /* control block size */
688 GX_COLOR_ID_BTN_LOWER, /* normal color id */
689 GX_COLOR_ID_BTN_UPPER, /* selected color id */
690 GX_COLOR_ID_BTN_LOWER, /* disabled color id */
691 gx_studio_radio_button_create, /* create function */
692 GX_NULL, /* drawing function override */
693 GX_NULL, /* event function override */
694 {289, 184, 412, 207}, /* widget size */
695 &main_window_radio_button_define, /* next widget definition */
696 GX_NULL, /* no child widgets */
697 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_radio_button_4), /* control block */
698 (void *) &main_window_radio_button_4_properties /* extended properties */
699 };
700
701 GX_CONST GX_STUDIO_WIDGET main_window_prompt_11_1_define =
702 {
703 "prompt_11_1",
704 GX_TYPE_PROMPT, /* widget type */
705 GX_ID_NONE, /* widget id */
706 #if defined(GX_WIDGET_USER_DATA)
707 0, /* user data */
708 #endif
709 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
710 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
711 sizeof(GX_PROMPT), /* control block size */
712 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
713 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
714 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
715 gx_studio_prompt_create, /* create function */
716 GX_NULL, /* drawing function override */
717 GX_NULL, /* event function override */
718 {279, 12, 331, 35}, /* widget size */
719 GX_NULL, /* no next widget */
720 GX_NULL, /* no child widgets */
721 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_prompt_11_1), /* control block */
722 (void *) &main_window_prompt_11_1_properties /* extended properties */
723 };
724
725 GX_CONST GX_STUDIO_WIDGET main_window_prompt_12_1_define =
726 {
727 "prompt_12_1",
728 GX_TYPE_PROMPT, /* widget type */
729 ID_BRUSH_ALPHA_PROMPT, /* widget id */
730 #if defined(GX_WIDGET_USER_DATA)
731 0, /* user data */
732 #endif
733 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
734 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
735 sizeof(GX_PROMPT), /* control block size */
736 GX_COLOR_ID_SLIDER_TICK, /* normal color id */
737 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
738 GX_COLOR_ID_SLIDER_TICK, /* disabled color id */
739 gx_studio_prompt_create, /* create function */
740 GX_NULL, /* drawing function override */
741 GX_NULL, /* event function override */
742 {420, 114, 463, 137}, /* widget size */
743 &main_window_prompt_11_1_define, /* next widget definition */
744 GX_NULL, /* no child widgets */
745 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_prompt_12_1), /* control block */
746 (void *) &main_window_prompt_12_1_properties /* extended properties */
747 };
748
749 GX_CONST GX_STUDIO_WIDGET main_window_brush_alpha_slider_1_define =
750 {
751 "brush_alpha_slider_1",
752 GX_TYPE_SLIDER, /* widget type */
753 ID_BRUSH_ALPHA_SLIDER, /* widget id */
754 #if defined(GX_WIDGET_USER_DATA)
755 0, /* user data */
756 #endif
757 GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_SHOW_NEEDLE|GX_STYLE_SHOW_TICKMARKS, /* style flags */
758 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
759 sizeof(GX_SLIDER), /* control block size */
760 GX_COLOR_ID_BTN_UPPER, /* normal color id */
761 GX_COLOR_ID_BTN_UPPER, /* selected color id */
762 GX_COLOR_ID_BTN_UPPER, /* disabled color id */
763 gx_studio_slider_create, /* create function */
764 GX_NULL, /* drawing function override */
765 GX_NULL, /* event function override */
766 {293, 114, 409, 137}, /* widget size */
767 &main_window_prompt_12_1_define, /* next widget definition */
768 GX_NULL, /* no child widgets */
769 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_brush_alpha_slider_1), /* control block */
770 (void *) &main_window_brush_alpha_slider_1_properties /* extended properties */
771 };
772
773 GX_CONST GX_STUDIO_WIDGET main_window_prompt_11_define =
774 {
775 "prompt_11",
776 GX_TYPE_PROMPT, /* widget type */
777 GX_ID_NONE, /* widget id */
778 #if defined(GX_WIDGET_USER_DATA)
779 0, /* user data */
780 #endif
781 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
782 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
783 sizeof(GX_PROMPT), /* control block size */
784 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
785 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
786 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
787 gx_studio_prompt_create, /* create function */
788 GX_NULL, /* drawing function override */
789 GX_NULL, /* event function override */
790 {276, 89, 379, 112}, /* widget size */
791 &main_window_brush_alpha_slider_1_define, /* next widget definition */
792 GX_NULL, /* no child widgets */
793 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_prompt_11), /* control block */
794 (void *) &main_window_prompt_11_properties /* extended properties */
795 };
796
797 GX_CONST GX_STUDIO_WIDGET main_window_window_define =
798 {
799 "window",
800 GX_TYPE_WINDOW, /* widget type */
801 GX_ID_NONE, /* widget id */
802 #if defined(GX_WIDGET_USER_DATA)
803 0, /* user data */
804 #endif
805 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT, /* style flags */
806 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
807 sizeof(GX_WINDOW), /* control block size */
808 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
809 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
810 GX_COLOR_ID_WINDOW_FILL, /* disabled color id */
811 gx_studio_window_create, /* create function */
812 GX_NULL, /* drawing function override */
813 GX_NULL, /* event function override */
814 {280, 146, 458, 309}, /* widget size */
815 &main_window_prompt_11_define, /* next widget definition */
816 &main_window_radio_button_4_define, /* child widget definition */
817 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_window), /* control block */
818 (void *) &main_window_window_properties /* extended properties */
819 };
820
821 GX_CONST GX_STUDIO_WIDGET main_window_compressed_box_define =
822 {
823 "compressed_box",
824 GX_TYPE_CHECKBOX, /* widget type */
825 ID_COMPRESSED, /* widget id */
826 #if defined(GX_WIDGET_USER_DATA)
827 0, /* user data */
828 #endif
829 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_BUTTON_PUSHED|GX_STYLE_BUTTON_TOGGLE|GX_STYLE_TEXT_LEFT, /* style flags */
830 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
831 sizeof(GX_CHECKBOX), /* control block size */
832 GX_COLOR_ID_BTN_LOWER, /* normal color id */
833 GX_COLOR_ID_BTN_UPPER, /* selected color id */
834 GX_COLOR_ID_BTN_LOWER, /* disabled color id */
835 gx_studio_checkbox_create, /* create function */
836 GX_NULL, /* drawing function override */
837 GX_NULL, /* event function override */
838 {296, 37, 416, 54}, /* widget size */
839 &main_window_window_define, /* next widget definition */
840 GX_NULL, /* no child widgets */
841 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_compressed_box), /* control block */
842 (void *) &main_window_compressed_box_properties /* extended properties */
843 };
844
845 GX_CONST GX_STUDIO_WIDGET main_window_alpha_box_define =
846 {
847 "alpha_box",
848 GX_TYPE_CHECKBOX, /* widget type */
849 ID_ALPHA, /* widget id */
850 #if defined(GX_WIDGET_USER_DATA)
851 0, /* user data */
852 #endif
853 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_BUTTON_PUSHED|GX_STYLE_BUTTON_TOGGLE|GX_STYLE_TEXT_LEFT, /* style flags */
854 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
855 sizeof(GX_CHECKBOX), /* control block size */
856 GX_COLOR_ID_SELECTED_TEXT, /* normal color id */
857 GX_COLOR_ID_BTN_UPPER, /* selected color id */
858 GX_COLOR_ID_SELECTED_TEXT, /* disabled color id */
859 gx_studio_checkbox_create, /* create function */
860 GX_NULL, /* drawing function override */
861 GX_NULL, /* event function override */
862 {297, 59, 365, 82}, /* widget size */
863 &main_window_compressed_box_define, /* next widget definition */
864 GX_NULL, /* no child widgets */
865 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_alpha_box), /* control block */
866 (void *) &main_window_alpha_box_properties /* extended properties */
867 };
868
869 GX_CONST GX_STUDIO_WIDGET main_window_pic_window_define =
870 {
871 "pic_window",
872 GX_TYPE_WINDOW, /* widget type */
873 ID_PIC_WINDOW, /* widget id */
874 #if defined(GX_WIDGET_USER_DATA)
875 0, /* user data */
876 #endif
877 GX_STYLE_BORDER_THIN|GX_STYLE_TRANSPARENT, /* style flags */
878 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
879 sizeof(GX_WINDOW), /* control block size */
880 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
881 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
882 GX_COLOR_ID_WINDOW_FILL, /* disabled color id */
883 gx_studio_window_create, /* create function */
884 (VOID (*)(GX_WIDGET *)) pic_win_draw, /* drawing function override */
885 GX_NULL, /* event function override */
886 {8, 11, 272, 295}, /* widget size */
887 &main_window_alpha_box_define, /* next widget definition */
888 &main_window_window_2_define, /* child widget definition */
889 offsetof(MAIN_WINDOW_CONTROL_BLOCK, main_window_pic_window), /* control block */
890 (void *) &main_window_pic_window_properties /* extended properties */
891 };
892
893 GX_CONST GX_STUDIO_WIDGET main_window_define =
894 {
895 "main_window",
896 GX_TYPE_WINDOW, /* widget type */
897 GX_ID_NONE, /* widget id */
898 #if defined(GX_WIDGET_USER_DATA)
899 0, /* user data */
900 #endif
901 GX_STYLE_BORDER_THIN, /* style flags */
902 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
903 sizeof(MAIN_WINDOW_CONTROL_BLOCK), /* control block size */
904 GX_COLOR_ID_SHINE, /* normal color id */
905 GX_COLOR_ID_SHINE, /* selected color id */
906 GX_COLOR_ID_SHINE, /* disabled color id */
907 gx_studio_window_create, /* create function */
908 GX_NULL, /* drawing function override */
909 (UINT (*)(GX_WIDGET *, GX_EVENT *)) main_event_handler, /* event function override */
910 {0, 0, 479, 319}, /* widget size */
911 GX_NULL, /* next widget */
912 &main_window_pic_window_define, /* child widget */
913 0, /* control block */
914 (void *) &main_window_properties /* extended properties */
915 };
916 GX_CONST GX_STUDIO_WIDGET_ENTRY pixelmaps_32bpp_widget_table[] =
917 {
918 { &main_window_define, (GX_WIDGET *) &main_window },
919 {GX_NULL, GX_NULL}
920 };
921
gx_studio_nested_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)922 static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
923 {
924 UINT status = GX_SUCCESS;
925 GX_WIDGET *widget = GX_NULL;
926 GX_VALUE list_count = 0;
927 GX_VALUE list_total_count = 0;
928
929 if(parent && (parent->gx_widget_type == GX_TYPE_MENU))
930 {
931 list_total_count = ((GX_MENU *)parent)->gx_menu_list_total_count;
932 }
933
934 while(definition && status == GX_SUCCESS)
935 {
936 if (definition->create_function)
937 {
938 if (definition->style & GX_STYLE_DYNAMICALLY_ALLOCATED)
939 {
940 status = gx_widget_allocate(&widget, definition->control_block_size);
941 if (status != GX_SUCCESS)
942 {
943 return GX_NULL;
944 }
945 }
946 else
947 {
948 if (control == GX_NULL)
949 {
950 return GX_NULL;
951 }
952 widget = (GX_WIDGET *) (control + definition->control_block_offset);
953 }
954
955 status = definition->create_function(definition, widget, parent);
956
957 if(list_count < list_total_count)
958 {
959 gx_menu_insert((GX_MENU *)parent, widget);
960 ((GX_MENU *)parent)->gx_menu_list_total_count--;
961 list_count++;
962 }
963
964 if (status == GX_SUCCESS)
965 {
966 if (definition->widget_type != GX_TYPE_TEMPLATE)
967 {
968 #if defined(GUIX_5_4_0_COMPATIBILITY)
969 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id);
970 #else
971 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id, definition->disabled_fill_color_id);
972 #endif
973 }
974
975 if (!(definition->status & GX_STATUS_ACCEPTS_FOCUS))
976 {
977 gx_widget_status_remove(widget, GX_STATUS_ACCEPTS_FOCUS);
978 }
979
980 if (definition->draw_function)
981 {
982 gx_widget_draw_set(widget, definition->draw_function);
983 }
984 if (definition->event_function)
985 {
986 gx_widget_event_process_set(widget, definition->event_function);
987 }
988
989 #if defined(GX_WIDGET_USER_DATA)
990 widget->gx_widget_user_data = definition->user_data;
991 #endif
992
993 if (definition->child_widget)
994 {
995 gx_studio_nested_widget_create(control, definition->child_widget, widget);
996 }
997 }
998 definition = definition->next_widget;
999 }
1000 }
1001 return widget;
1002 }
1003
gx_studio_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)1004 GX_WIDGET *gx_studio_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
1005 {
1006 GX_WIDGET *widget;
1007 widget = gx_studio_nested_widget_create(control, definition, GX_NULL);
1008
1009 if (parent && widget)
1010 {
1011 gx_widget_attach(parent, widget);
1012 }
1013 return widget;
1014 }
1015
gx_studio_named_widget_create(char * name,GX_WIDGET * parent,GX_WIDGET ** new_widget)1016 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget)
1017 {
1018 UINT status = GX_FAILURE;
1019 GX_CONST GX_STUDIO_WIDGET_ENTRY *entry = pixelmaps_32bpp_widget_table;
1020 GX_WIDGET *widget = GX_NULL;
1021
1022 while(entry->widget_information)
1023 {
1024 if (!strcmp(name, entry->widget_information->widget_name))
1025 {
1026 widget = gx_studio_widget_create((GX_BYTE *) entry->widget, entry->widget_information, parent);
1027 if (widget)
1028 {
1029 status = GX_SUCCESS;
1030 }
1031 break;
1032 }
1033 entry++;
1034 }
1035
1036 if (new_widget)
1037 {
1038 *new_widget = widget;
1039 }
1040 return status;
1041 }
1042
1043
gx_studio_display_configure(USHORT display,UINT (* driver)(GX_DISPLAY *),GX_UBYTE language,USHORT theme,GX_WINDOW_ROOT ** return_root)1044 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *),
1045 GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root)
1046 {
1047 GX_CONST GX_THEME *theme_ptr;
1048 GX_RECTANGLE size;
1049
1050 GX_STUDIO_DISPLAY_INFO *display_info = &pixelmaps_32bpp_display_table[display];
1051
1052
1053 /* create the requested display */
1054
1055 gx_display_create(display_info->display,
1056 display_info->name,
1057 driver,
1058 (GX_VALUE) display_info->x_resolution,
1059 (GX_VALUE) display_info->y_resolution);
1060
1061
1062 /* install the request theme */
1063
1064 if(display_info->theme_table)
1065 {
1066 theme_ptr = display_info->theme_table[theme];
1067 if(theme_ptr)
1068 {
1069 gx_display_color_table_set(display_info->display, theme_ptr->theme_color_table, theme_ptr->theme_color_table_size);
1070
1071 /* install the color palette if required */
1072 if (display_info->display->gx_display_driver_palette_set &&
1073 theme_ptr->theme_palette != NULL)
1074 {
1075 display_info->display->gx_display_driver_palette_set(display_info->display, theme_ptr->theme_palette, theme_ptr->theme_palette_size);
1076 }
1077
1078 gx_display_font_table_set(display_info->display, theme_ptr->theme_font_table, theme_ptr->theme_font_table_size);
1079 gx_display_pixelmap_table_set(display_info->display, theme_ptr->theme_pixelmap_table, theme_ptr->theme_pixelmap_table_size);
1080 gx_system_scroll_appearance_set(theme_ptr->theme_vertical_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_vertical_scrollbar_appearance);
1081 gx_system_scroll_appearance_set(theme_ptr->theme_horizontal_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_horizontal_scrollbar_appearance);
1082 }
1083 }
1084
1085 /* Install the language table. */
1086
1087 if(display_info->language_table)
1088 {
1089 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);
1090 gx_display_active_language_set(display_info->display, language);
1091 }
1092
1093 /* Set screen rotation angle. */
1094
1095 display_info->display->gx_display_rotation_angle = display_info->rotation_angle;
1096
1097 /* create the canvas for this display */
1098
1099 gx_canvas_create(display_info->canvas,
1100 display_info->canvas_name,
1101 display_info->display,
1102 GX_CANVAS_MANAGED | GX_CANVAS_VISIBLE,
1103 display_info->x_resolution,
1104 display_info->y_resolution,
1105 display_info->canvas_memory,
1106 display_info->canvas_memory_size);
1107
1108 /* Create the root window for this canvas */
1109
1110 gx_utility_rectangle_define(&size,
1111 0, 0,
1112 (GX_VALUE) (display_info->x_resolution - 1),
1113 (GX_VALUE) (display_info->y_resolution - 1));
1114
1115 gx_window_root_create(display_info->root_window,
1116 display_info->name,
1117 display_info->canvas, GX_STYLE_NONE, 0, &size);
1118 if (return_root)
1119 {
1120 *return_root = display_info->root_window;
1121 }
1122 return GX_SUCCESS;
1123 }
1124 #undef GUIX_STUDIO_GENERATED_FILE
1125