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:10                        */
10 /*******************************************************************************/
11 
12 
13 #define GUIX_STUDIO_GENERATED_FILE
14 #include <stddef.h>
15 #include "menu_resources.h"
16 #include "menu_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 TOOLBAR_SCREEN_CONTROL_BLOCK toolbar_screen;
20 BOOK_SCREEN_CONTROL_BLOCK book_screen;
21 BOOKSHELF_SCREEN_CONTROL_BLOCK bookshelf_screen;
22 MAIN_SCREEN_CONTROL_BLOCK main_screen;
23 GX_DISPLAY Main_Display_control_block;
24 GX_WINDOW_ROOT Main_Display_root_window;
25 GX_CANVAS  Main_Display_canvas_control_block;
26 ULONG      Main_Display_canvas_memory[76800];
27 
28 extern GX_CONST GX_THEME *Main_Display_theme_table[];
29 extern GX_CONST GX_STRING *Main_Display_language_table[];
30 
31 GX_STUDIO_DISPLAY_INFO menu_display_table[1] =
32 {
33     {
34     "Main_Display",
35     "Main_Display_canvas",
36     Main_Display_theme_table,
37     Main_Display_language_table,
38     MAIN_DISPLAY_THEME_TABLE_SIZE,
39     MAIN_DISPLAY_LANGUAGE_TABLE_SIZE,
40     MAIN_DISPLAY_STRING_TABLE_SIZE,
41     240,                                     /* x resolution                   */
42     320,                                     /* y resolution                   */
43     &Main_Display_control_block,
44     &Main_Display_canvas_control_block,
45     &Main_Display_root_window,
46     Main_Display_canvas_memory,              /* canvas memory area             */
47     307200,                                  /* canvas memory size in bytes    */
48     0                                        /* rotation angle                 */
49     }
50 };
51 
52 
gx_studio_text_button_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)53 UINT gx_studio_text_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
54 {
55     UINT status;
56     GX_TEXT_BUTTON *button = (GX_TEXT_BUTTON *) control_block;
57     GX_TEXT_BUTTON_PROPERTIES *props = (GX_TEXT_BUTTON_PROPERTIES *) info->properties;
58     status = gx_text_button_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
59     if (status == GX_SUCCESS)
60     {
61         gx_text_button_font_set(button, props->font_id);
62 #if defined(GUIX_5_4_0_COMPATIBILITY)
63         gx_text_button_text_color_set(button, props->normal_text_color_id, props->selected_text_color_id);
64 #else
65         gx_text_button_text_color_set(button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
66 #endif
67     }
68     return status;
69 }
70 
gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)71 UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
72 {
73     UINT status;
74     GX_ICON *icon = (GX_ICON *) control_block;
75     GX_ICON_PROPERTIES *props = (GX_ICON_PROPERTIES *) info->properties;
76     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);
77     if (props->selected_pixelmap_id)
78     {
79         gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
80     }
81     else
82     {
83         gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
84     }
85     return status;
86 }
87 
gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)88 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
89 {
90     UINT status;
91     GX_PROMPT *prompt = (GX_PROMPT *) control_block;
92     GX_PROMPT_PROPERTIES *props = (GX_PROMPT_PROPERTIES *) info->properties;
93     status = gx_prompt_create(prompt, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
94     if (status == GX_SUCCESS)
95     {
96         gx_prompt_font_set(prompt, props->font_id);
97 #if defined(GUIX_5_4_0_COMPATIBILITY)
98         gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id);
99 #else
100         gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
101 #endif
102     }
103     return status;
104 }
105 
gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)106 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
107 {
108     UINT status;
109     GX_WINDOW *window = (GX_WINDOW *) control_block;
110     GX_WINDOW_PROPERTIES *props = (GX_WINDOW_PROPERTIES *) info->properties;
111     status = gx_window_create(window, info->widget_name, parent, info->style, info->widget_id, &info->size);
112     if (status == GX_SUCCESS)
113     {
114         if (props->wallpaper_id)
115         {
116             gx_window_wallpaper_set(window, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
117         }
118     }
119     return status;
120 }
121 
gx_studio_multi_line_text_view_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)122 UINT gx_studio_multi_line_text_view_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
123 {
124     UINT status;
125     GX_MULTI_LINE_TEXT_VIEW *view = (GX_MULTI_LINE_TEXT_VIEW *) control_block;
126     GX_ML_TEXT_VIEW_PROPERTIES *props = (GX_ML_TEXT_VIEW_PROPERTIES *) info->properties;
127     status = gx_multi_line_text_view_create(view, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
128     if (status == GX_SUCCESS)
129     {
130         gx_multi_line_text_view_font_set(view, props->font_id);
131 #if defined(GUIX_5_4_0_COMPATIBILITY)
132         gx_multi_line_text_view_text_color_set(view, props->normal_text_color_id, props->selected_text_color_id);
133 #else
134         gx_multi_line_text_view_text_color_set(view, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
135 #endif
136         gx_multi_line_text_view_whitespace_set(view, props->whitespace);
137         gx_multi_line_text_view_line_space_set(view, props->line_space);
138     }
139     return status;
140 }
141 
gx_studio_vertical_scrollbar_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)142 UINT gx_studio_vertical_scrollbar_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
143 {
144     UINT status;
145     GX_SCROLLBAR *scroll = (GX_SCROLLBAR *) control_block;
146     GX_SCROLLBAR_APPEARANCE *appearance = (GX_SCROLLBAR_APPEARANCE *) info->properties;
147     status = gx_vertical_scrollbar_create(scroll, info->widget_name, parent, appearance, info->style);
148     return status;
149 }
150 GX_WINDOW_PROPERTIES toolbar_screen_properties =
151 {
152     0                                        /* wallpaper pixelmap id          */
153 };
154 GX_ICON_PROPERTIES toolbar_screen_icon_10_1_properties =
155 {
156     GX_PIXELMAP_ID_ARROW,                    /* normal pixelmap id             */
157     0                                        /* selected pixelmap id           */
158 };
159 GX_PROMPT_PROPERTIES toolbar_screen_prompt_11_properties =
160 {
161     0,                                       /* string id                      */
162     GX_FONT_ID_PROMPT,                       /* font id                        */
163     GX_COLOR_ID_TEXT,                        /* normal text color              */
164     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
165     GX_COLOR_ID_TEXT                         /* disabled text color            */
166 };
167 GX_TEXT_BUTTON_PROPERTIES toolbar_screen_home_2_properties =
168 {
169     GX_STRING_ID_STRING_52,                  /* string id                      */
170     GX_FONT_ID_BUTTON,                       /* font id                        */
171     GX_COLOR_ID_WHITE,                       /* normal text color              */
172     GX_COLOR_ID_WHITE,                       /* selected text color            */
173     GX_COLOR_ID_WHITE                        /* disabled text color            */
174 };
175 
176 GX_CONST GX_STUDIO_WIDGET toolbar_screen_prompt_11_define =
177 {
178     "prompt_11",
179     GX_TYPE_PROMPT,                          /* widget type                    */
180     ID_BACK,                                 /* widget id                      */
181     #if defined(GX_WIDGET_USER_DATA)
182     0,                                       /* user data                      */
183     #endif
184     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
185     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
186     sizeof(GX_PROMPT),                       /* control block size             */
187     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
188     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
189     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
190     gx_studio_prompt_create,                 /* create function                */
191     GX_NULL,                                 /* drawing function override      */
192     GX_NULL,                                 /* event function override        */
193     {-16, 5, 63, 28},                        /* widget size                    */
194     GX_NULL,                                 /* no next widget                 */
195     GX_NULL,                                 /* no child widgets               */
196     offsetof(TOOLBAR_SCREEN_CONTROL_BLOCK, toolbar_screen_prompt_11), /* control block */
197     (void *) &toolbar_screen_prompt_11_properties /* extended properties       */
198 };
199 
200 GX_CONST GX_STUDIO_WIDGET toolbar_screen_home_2_define =
201 {
202     "home_2",
203     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
204     ID_HOME_BUTTON,                          /* widget id                      */
205     #if defined(GX_WIDGET_USER_DATA)
206     0,                                       /* user data                      */
207     #endif
208     GX_STYLE_BORDER_RAISED|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
209     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
210     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
211     GX_COLOR_ID_BLACK,                       /* normal color id                */
212     GX_COLOR_ID_BLACK,                       /* selected color id              */
213     GX_COLOR_ID_BLACK,                       /* disabled color id              */
214     gx_studio_text_button_create,            /* create function                */
215     GX_NULL,                                 /* drawing function override      */
216     GX_NULL,                                 /* event function override        */
217     {147, 6, 235, 30},                       /* widget size                    */
218     GX_NULL,                                 /* no next widget                 */
219     GX_NULL,                                 /* no child widgets               */
220     offsetof(TOOLBAR_SCREEN_CONTROL_BLOCK, toolbar_screen_home_2), /* control block */
221     (void *) &toolbar_screen_home_2_properties /* extended properties          */
222 };
223 
224 GX_CONST GX_STUDIO_WIDGET toolbar_screen_icon_10_1_define =
225 {
226     "icon_10_1",
227     GX_TYPE_ICON,                            /* widget type                    */
228     GX_ID_NONE,                              /* widget id                      */
229     #if defined(GX_WIDGET_USER_DATA)
230     0,                                       /* user data                      */
231     #endif
232     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
233     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
234     sizeof(GX_ICON),                         /* control block size             */
235     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
236     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
237     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
238     gx_studio_icon_create,                   /* create function                */
239     GX_NULL,                                 /* drawing function override      */
240     GX_NULL,                                 /* event function override        */
241     {7, 7, 36, 26},                          /* widget size                    */
242     &toolbar_screen_home_2_define,           /* next widget definition         */
243     &toolbar_screen_prompt_11_define,        /* child widget definition        */
244     offsetof(TOOLBAR_SCREEN_CONTROL_BLOCK, toolbar_screen_icon_10_1), /* control block */
245     (void *) &toolbar_screen_icon_10_1_properties /* extended properties       */
246 };
247 
248 GX_CONST GX_STUDIO_WIDGET toolbar_screen_define =
249 {
250     "toolbar_screen",
251     GX_TYPE_WINDOW,                          /* widget type                    */
252     ID_TOOLBAR_SCREEN,                       /* widget id                      */
253     #if defined(GX_WIDGET_USER_DATA)
254     0,                                       /* user data                      */
255     #endif
256     GX_STYLE_BORDER_NONE,                    /* style flags                    */
257     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
258     sizeof(TOOLBAR_SCREEN_CONTROL_BLOCK),    /* control block size             */
259     GX_COLOR_ID_GRAY,                        /* normal color id                */
260     GX_COLOR_ID_GRAY,                        /* selected color id              */
261     GX_COLOR_ID_GRAY,                        /* disabled color id              */
262     gx_studio_window_create,                 /* create function                */
263     GX_NULL,                                 /* drawing function override      */
264     (UINT (*)(GX_WIDGET *, GX_EVENT *)) sub_menu_event, /* event function override */
265     {0, 0, 239, 34},                         /* widget size                    */
266     GX_NULL,                                 /* next widget                    */
267     &toolbar_screen_icon_10_1_define,        /* child widget                   */
268     0,                                       /* control block                  */
269     (void *) &toolbar_screen_properties      /* extended properties            */
270 };
271 GX_WINDOW_PROPERTIES book_screen_properties =
272 {
273     0                                        /* wallpaper pixelmap id          */
274 };
275 GX_ML_TEXT_VIEW_PROPERTIES book_screen_text_view_1_properties =
276 {
277     0,                                       /* string id                      */
278     GX_FONT_ID_TEXT_INPUT,                   /* font id                        */
279     GX_COLOR_ID_TEXT_INPUT_TEXT,             /* normal text color              */
280     GX_COLOR_ID_TEXT_INPUT_TEXT,             /* selected text color            */
281     GX_COLOR_ID_TEXT_INPUT_TEXT,             /* disabled text color            */
282     0,                                       /* whitespace                     */
283     0                                        /* line_space                     */
284 };
285 GX_SCROLLBAR_APPEARANCE  book_screen_vertical_scroll_1_properties =
286 {
287     20,                                      /* scroll width                   */
288     18,                                      /* thumb width                    */
289     20,                                      /* thumb travel min               */
290     20,                                      /* thumb travel max               */
291     4,                                       /* thumb border style             */
292     0,                                       /* scroll fill pixelmap           */
293     0,                                       /* scroll thumb pixelmap          */
294     0,                                       /* scroll up pixelmap             */
295     0,                                       /* scroll down pixelmap           */
296     GX_COLOR_ID_SCROLL_BUTTON,               /* scroll thumb color             */
297     GX_COLOR_ID_SCROLL_BUTTON,               /* scroll thumb border color      */
298     GX_COLOR_ID_SCROLL_BUTTON,               /* scroll button color            */
299 };
300 
301 GX_CONST GX_STUDIO_WIDGET book_screen_vertical_scroll_1_define =
302 {
303     "vertical_scroll_1",
304     GX_TYPE_VERTICAL_SCROLL,                 /* widget type                    */
305     GX_ID_NONE,                              /* widget id                      */
306     #if defined(GX_WIDGET_USER_DATA)
307     0,                                       /* user data                      */
308     #endif
309     GX_STYLE_BORDER_NONE|GX_SCROLLBAR_RELATIVE_THUMB|GX_SCROLLBAR_END_BUTTONS|GX_SCROLLBAR_VERTICAL,   /* style flags */
310     0,                                       /* status flags                   */
311     sizeof(GX_SCROLLBAR),                    /* control block size             */
312     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
313     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
314     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
315     gx_studio_vertical_scrollbar_create,     /* create function                */
316     GX_NULL,                                 /* drawing function override      */
317     GX_NULL,                                 /* event function override        */
318     {220, 0, 239, 319},                      /* widget size                    */
319     GX_NULL,                                 /* no next widget                 */
320     GX_NULL,                                 /* no child widgets               */
321     offsetof(BOOK_SCREEN_CONTROL_BLOCK, book_screen_vertical_scroll_1), /* control block */
322     (void *) &book_screen_vertical_scroll_1_properties /* extended properties  */
323 };
324 
325 GX_CONST GX_STUDIO_WIDGET book_screen_text_view_1_define =
326 {
327     "text_view_1",
328     GX_TYPE_MULTI_LINE_TEXT_VIEW,            /* widget type                    */
329     ID_TEXT_VIEW,                            /* widget id                      */
330     #if defined(GX_WIDGET_USER_DATA)
331     0,                                       /* user data                      */
332     #endif
333     GX_STYLE_BORDER_NONE|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_TEXT_LEFT,   /* style flags */
334     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
335     sizeof(GX_MULTI_LINE_TEXT_VIEW),         /* control block size             */
336     GX_COLOR_ID_BLACK,                       /* normal color id                */
337     GX_COLOR_ID_BLACK,                       /* selected color id              */
338     GX_COLOR_ID_BLACK,                       /* disabled color id              */
339     gx_studio_multi_line_text_view_create,     /* create function              */
340     GX_NULL,                                 /* drawing function override      */
341     GX_NULL,                                 /* event function override        */
342     {0, 0, 239, 319},                        /* widget size                    */
343     GX_NULL,                                 /* no next widget                 */
344     &book_screen_vertical_scroll_1_define,   /* child widget definition        */
345     offsetof(BOOK_SCREEN_CONTROL_BLOCK, book_screen_text_view_1), /* control block */
346     (void *) &book_screen_text_view_1_properties /* extended properties        */
347 };
348 
349 GX_CONST GX_STUDIO_WIDGET book_screen_define =
350 {
351     "book_screen",
352     GX_TYPE_WINDOW,                          /* widget type                    */
353     ID_BOOK_SCREEN,                          /* widget id                      */
354     #if defined(GX_WIDGET_USER_DATA)
355     0,                                       /* user data                      */
356     #endif
357     GX_STYLE_BORDER_NONE,                    /* style flags                    */
358     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
359     sizeof(BOOK_SCREEN_CONTROL_BLOCK),       /* control block size             */
360     GX_COLOR_ID_GRAY,                        /* normal color id                */
361     GX_COLOR_ID_GRAY,                        /* selected color id              */
362     GX_COLOR_ID_GRAY,                        /* disabled color id              */
363     gx_studio_window_create,                 /* create function                */
364     GX_NULL,                                 /* drawing function override      */
365     (UINT (*)(GX_WIDGET *, GX_EVENT *)) sub_menu_event, /* event function override */
366     {0, 0, 239, 319},                        /* widget size                    */
367     GX_NULL,                                 /* next widget                    */
368     &book_screen_text_view_1_define,         /* child widget                   */
369     0,                                       /* control block                  */
370     (void *) &book_screen_properties         /* extended properties            */
371 };
372 GX_WINDOW_PROPERTIES bookshelf_screen_properties =
373 {
374     0                                        /* wallpaper pixelmap id          */
375 };
376 GX_ICON_PROPERTIES bookshelf_screen_icon_1_properties =
377 {
378     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
379     0                                        /* selected pixelmap id           */
380 };
381 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_10_properties =
382 {
383     GX_STRING_ID_STRING_6,                   /* string id                      */
384     GX_FONT_ID_SMALL,                        /* font id                        */
385     GX_COLOR_ID_WHITE,                       /* normal text color              */
386     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
387     GX_COLOR_ID_WHITE                        /* disabled text color            */
388 };
389 GX_ICON_PROPERTIES bookshelf_screen_icon_2_properties =
390 {
391     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
392     0                                        /* selected pixelmap id           */
393 };
394 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_2_properties =
395 {
396     GX_STRING_ID_STRING_6,                   /* string id                      */
397     GX_FONT_ID_SMALL,                        /* font id                        */
398     GX_COLOR_ID_WHITE,                       /* normal text color              */
399     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
400     GX_COLOR_ID_WHITE                        /* disabled text color            */
401 };
402 GX_ICON_PROPERTIES bookshelf_screen_icon_3_properties =
403 {
404     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
405     0                                        /* selected pixelmap id           */
406 };
407 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_3_properties =
408 {
409     GX_STRING_ID_STRING_6,                   /* string id                      */
410     GX_FONT_ID_SMALL,                        /* font id                        */
411     GX_COLOR_ID_WHITE,                       /* normal text color              */
412     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
413     GX_COLOR_ID_WHITE                        /* disabled text color            */
414 };
415 GX_ICON_PROPERTIES bookshelf_screen_icon_4_properties =
416 {
417     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
418     0                                        /* selected pixelmap id           */
419 };
420 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_5_properties =
421 {
422     GX_STRING_ID_STRING_6,                   /* string id                      */
423     GX_FONT_ID_SMALL,                        /* font id                        */
424     GX_COLOR_ID_WHITE,                       /* normal text color              */
425     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
426     GX_COLOR_ID_WHITE                        /* disabled text color            */
427 };
428 GX_ICON_PROPERTIES bookshelf_screen_icon_5_properties =
429 {
430     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
431     0                                        /* selected pixelmap id           */
432 };
433 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_4_properties =
434 {
435     GX_STRING_ID_STRING_6,                   /* string id                      */
436     GX_FONT_ID_SMALL,                        /* font id                        */
437     GX_COLOR_ID_WHITE,                       /* normal text color              */
438     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
439     GX_COLOR_ID_WHITE                        /* disabled text color            */
440 };
441 GX_ICON_PROPERTIES bookshelf_screen_icon_6_properties =
442 {
443     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
444     0                                        /* selected pixelmap id           */
445 };
446 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_6_properties =
447 {
448     GX_STRING_ID_STRING_6,                   /* string id                      */
449     GX_FONT_ID_SMALL,                        /* font id                        */
450     GX_COLOR_ID_WHITE,                       /* normal text color              */
451     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
452     GX_COLOR_ID_WHITE                        /* disabled text color            */
453 };
454 GX_ICON_PROPERTIES bookshelf_screen_icon_7_properties =
455 {
456     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
457     0                                        /* selected pixelmap id           */
458 };
459 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_7_properties =
460 {
461     GX_STRING_ID_STRING_6,                   /* string id                      */
462     GX_FONT_ID_SMALL,                        /* font id                        */
463     GX_COLOR_ID_WHITE,                       /* normal text color              */
464     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
465     GX_COLOR_ID_WHITE                        /* disabled text color            */
466 };
467 GX_ICON_PROPERTIES bookshelf_screen_icon_8_properties =
468 {
469     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
470     0                                        /* selected pixelmap id           */
471 };
472 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_8_properties =
473 {
474     GX_STRING_ID_STRING_6,                   /* string id                      */
475     GX_FONT_ID_SMALL,                        /* font id                        */
476     GX_COLOR_ID_WHITE,                       /* normal text color              */
477     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
478     GX_COLOR_ID_WHITE                        /* disabled text color            */
479 };
480 GX_ICON_PROPERTIES bookshelf_screen_icon_9_properties =
481 {
482     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
483     0                                        /* selected pixelmap id           */
484 };
485 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_9_properties =
486 {
487     GX_STRING_ID_STRING_6,                   /* string id                      */
488     GX_FONT_ID_SMALL,                        /* font id                        */
489     GX_COLOR_ID_WHITE,                       /* normal text color              */
490     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
491     GX_COLOR_ID_WHITE                        /* disabled text color            */
492 };
493 GX_ICON_PROPERTIES bookshelf_screen_icon_10_properties =
494 {
495     GX_PIXELMAP_ID_ARROW,                    /* normal pixelmap id             */
496     0                                        /* selected pixelmap id           */
497 };
498 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_1_properties =
499 {
500     0,                                       /* string id                      */
501     GX_FONT_ID_PROMPT,                       /* font id                        */
502     GX_COLOR_ID_TEXT,                        /* normal text color              */
503     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
504     GX_COLOR_ID_TEXT                         /* disabled text color            */
505 };
506 GX_TEXT_BUTTON_PROPERTIES bookshelf_screen_home_1_properties =
507 {
508     GX_STRING_ID_STRING_52,                  /* string id                      */
509     GX_FONT_ID_BUTTON,                       /* font id                        */
510     GX_COLOR_ID_WHITE,                       /* normal text color              */
511     GX_COLOR_ID_WHITE,                       /* selected text color            */
512     GX_COLOR_ID_WHITE                        /* disabled text color            */
513 };
514 
515 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_10_define =
516 {
517     "prompt_10",
518     GX_TYPE_PROMPT,                          /* widget type                    */
519     ID_PROMPT_BOOK,                          /* widget id                      */
520     #if defined(GX_WIDGET_USER_DATA)
521     0,                                       /* user data                      */
522     #endif
523     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
524     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
525     sizeof(GX_PROMPT),                       /* control block size             */
526     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
527     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
528     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
529     gx_studio_prompt_create,                 /* create function                */
530     GX_NULL,                                 /* drawing function override      */
531     GX_NULL,                                 /* event function override        */
532     {20, 39, 63, 97},                        /* widget size                    */
533     GX_NULL,                                 /* no next widget                 */
534     GX_NULL,                                 /* no child widgets               */
535     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_10), /* control block */
536     (void *) &bookshelf_screen_prompt_10_properties /* extended properties     */
537 };
538 
539 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_2_define =
540 {
541     "prompt_2",
542     GX_TYPE_PROMPT,                          /* widget type                    */
543     ID_PROMPT_BOOK,                          /* widget id                      */
544     #if defined(GX_WIDGET_USER_DATA)
545     0,                                       /* user data                      */
546     #endif
547     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
548     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
549     sizeof(GX_PROMPT),                       /* control block size             */
550     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
551     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
552     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
553     gx_studio_prompt_create,                 /* create function                */
554     GX_NULL,                                 /* drawing function override      */
555     GX_NULL,                                 /* event function override        */
556     {88, 39, 131, 97},                       /* widget size                    */
557     GX_NULL,                                 /* no next widget                 */
558     GX_NULL,                                 /* no child widgets               */
559     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_2), /* control block */
560     (void *) &bookshelf_screen_prompt_2_properties /* extended properties      */
561 };
562 
563 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_3_define =
564 {
565     "prompt_3",
566     GX_TYPE_PROMPT,                          /* widget type                    */
567     ID_PROMPT_BOOK,                          /* widget id                      */
568     #if defined(GX_WIDGET_USER_DATA)
569     0,                                       /* user data                      */
570     #endif
571     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
572     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
573     sizeof(GX_PROMPT),                       /* control block size             */
574     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
575     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
576     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
577     gx_studio_prompt_create,                 /* create function                */
578     GX_NULL,                                 /* drawing function override      */
579     GX_NULL,                                 /* event function override        */
580     {157, 39, 200, 97},                      /* widget size                    */
581     GX_NULL,                                 /* no next widget                 */
582     GX_NULL,                                 /* no child widgets               */
583     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_3), /* control block */
584     (void *) &bookshelf_screen_prompt_3_properties /* extended properties      */
585 };
586 
587 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_5_define =
588 {
589     "prompt_5",
590     GX_TYPE_PROMPT,                          /* widget type                    */
591     ID_PROMPT_BOOK,                          /* widget id                      */
592     #if defined(GX_WIDGET_USER_DATA)
593     0,                                       /* user data                      */
594     #endif
595     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
596     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
597     sizeof(GX_PROMPT),                       /* control block size             */
598     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
599     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
600     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
601     gx_studio_prompt_create,                 /* create function                */
602     GX_NULL,                                 /* drawing function override      */
603     GX_NULL,                                 /* event function override        */
604     {89, 128, 132, 186},                     /* widget size                    */
605     GX_NULL,                                 /* no next widget                 */
606     GX_NULL,                                 /* no child widgets               */
607     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_5), /* control block */
608     (void *) &bookshelf_screen_prompt_5_properties /* extended properties      */
609 };
610 
611 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_4_define =
612 {
613     "prompt_4",
614     GX_TYPE_PROMPT,                          /* widget type                    */
615     ID_PROMPT_BOOK,                          /* widget id                      */
616     #if defined(GX_WIDGET_USER_DATA)
617     0,                                       /* user data                      */
618     #endif
619     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
620     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
621     sizeof(GX_PROMPT),                       /* control block size             */
622     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
623     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
624     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
625     gx_studio_prompt_create,                 /* create function                */
626     GX_NULL,                                 /* drawing function override      */
627     GX_NULL,                                 /* event function override        */
628     {21, 126, 64, 184},                      /* widget size                    */
629     GX_NULL,                                 /* no next widget                 */
630     GX_NULL,                                 /* no child widgets               */
631     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_4), /* control block */
632     (void *) &bookshelf_screen_prompt_4_properties /* extended properties      */
633 };
634 
635 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_6_define =
636 {
637     "prompt_6",
638     GX_TYPE_PROMPT,                          /* widget type                    */
639     ID_PROMPT_BOOK,                          /* widget id                      */
640     #if defined(GX_WIDGET_USER_DATA)
641     0,                                       /* user data                      */
642     #endif
643     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
644     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
645     sizeof(GX_PROMPT),                       /* control block size             */
646     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
647     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
648     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
649     gx_studio_prompt_create,                 /* create function                */
650     GX_NULL,                                 /* drawing function override      */
651     GX_NULL,                                 /* event function override        */
652     {156, 128, 199, 186},                    /* widget size                    */
653     GX_NULL,                                 /* no next widget                 */
654     GX_NULL,                                 /* no child widgets               */
655     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_6), /* control block */
656     (void *) &bookshelf_screen_prompt_6_properties /* extended properties      */
657 };
658 
659 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_7_define =
660 {
661     "prompt_7",
662     GX_TYPE_PROMPT,                          /* widget type                    */
663     ID_PROMPT_BOOK,                          /* widget id                      */
664     #if defined(GX_WIDGET_USER_DATA)
665     0,                                       /* user data                      */
666     #endif
667     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
668     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
669     sizeof(GX_PROMPT),                       /* control block size             */
670     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
671     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
672     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
673     gx_studio_prompt_create,                 /* create function                */
674     GX_NULL,                                 /* drawing function override      */
675     GX_NULL,                                 /* event function override        */
676     {21, 215, 64, 273},                      /* widget size                    */
677     GX_NULL,                                 /* no next widget                 */
678     GX_NULL,                                 /* no child widgets               */
679     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_7), /* control block */
680     (void *) &bookshelf_screen_prompt_7_properties /* extended properties      */
681 };
682 
683 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_8_define =
684 {
685     "prompt_8",
686     GX_TYPE_PROMPT,                          /* widget type                    */
687     ID_PROMPT_BOOK,                          /* widget id                      */
688     #if defined(GX_WIDGET_USER_DATA)
689     0,                                       /* user data                      */
690     #endif
691     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
692     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
693     sizeof(GX_PROMPT),                       /* control block size             */
694     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
695     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
696     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
697     gx_studio_prompt_create,                 /* create function                */
698     GX_NULL,                                 /* drawing function override      */
699     GX_NULL,                                 /* event function override        */
700     {90, 216, 133, 274},                     /* widget size                    */
701     GX_NULL,                                 /* no next widget                 */
702     GX_NULL,                                 /* no child widgets               */
703     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_8), /* control block */
704     (void *) &bookshelf_screen_prompt_8_properties /* extended properties      */
705 };
706 
707 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_9_define =
708 {
709     "prompt_9",
710     GX_TYPE_PROMPT,                          /* widget type                    */
711     ID_PROMPT_BOOK,                          /* widget id                      */
712     #if defined(GX_WIDGET_USER_DATA)
713     0,                                       /* user data                      */
714     #endif
715     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
716     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
717     sizeof(GX_PROMPT),                       /* control block size             */
718     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
719     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
720     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
721     gx_studio_prompt_create,                 /* create function                */
722     GX_NULL,                                 /* drawing function override      */
723     GX_NULL,                                 /* event function override        */
724     {158, 217, 201, 275},                    /* widget size                    */
725     GX_NULL,                                 /* no next widget                 */
726     GX_NULL,                                 /* no child widgets               */
727     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_9), /* control block */
728     (void *) &bookshelf_screen_prompt_9_properties /* extended properties      */
729 };
730 
731 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_1_define =
732 {
733     "prompt_1",
734     GX_TYPE_PROMPT,                          /* widget type                    */
735     ID_BACK,                                 /* widget id                      */
736     #if defined(GX_WIDGET_USER_DATA)
737     0,                                       /* user data                      */
738     #endif
739     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
740     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
741     sizeof(GX_PROMPT),                       /* control block size             */
742     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
743     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
744     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
745     gx_studio_prompt_create,                 /* create function                */
746     GX_NULL,                                 /* drawing function override      */
747     GX_NULL,                                 /* event function override        */
748     {-13, 4, 66, 27},                        /* widget size                    */
749     GX_NULL,                                 /* no next widget                 */
750     GX_NULL,                                 /* no child widgets               */
751     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_1), /* control block */
752     (void *) &bookshelf_screen_prompt_1_properties /* extended properties      */
753 };
754 
755 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_home_1_define =
756 {
757     "home_1",
758     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
759     ID_HOME_BUTTON,                          /* widget id                      */
760     #if defined(GX_WIDGET_USER_DATA)
761     0,                                       /* user data                      */
762     #endif
763     GX_STYLE_BORDER_RAISED|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
764     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
765     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
766     GX_COLOR_ID_BLACK,                       /* normal color id                */
767     GX_COLOR_ID_BLACK,                       /* selected color id              */
768     GX_COLOR_ID_BLACK,                       /* disabled color id              */
769     gx_studio_text_button_create,            /* create function                */
770     GX_NULL,                                 /* drawing function override      */
771     GX_NULL,                                 /* event function override        */
772     {137, 5, 225, 29},                       /* widget size                    */
773     GX_NULL,                                 /* no next widget                 */
774     GX_NULL,                                 /* no child widgets               */
775     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_home_1), /* control block */
776     (void *) &bookshelf_screen_home_1_properties /* extended properties        */
777 };
778 
779 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_10_define =
780 {
781     "icon_10",
782     GX_TYPE_ICON,                            /* widget type                    */
783     GX_ID_NONE,                              /* widget id                      */
784     #if defined(GX_WIDGET_USER_DATA)
785     0,                                       /* user data                      */
786     #endif
787     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
788     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
789     sizeof(GX_ICON),                         /* control block size             */
790     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
791     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
792     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
793     gx_studio_icon_create,                   /* create function                */
794     GX_NULL,                                 /* drawing function override      */
795     GX_NULL,                                 /* event function override        */
796     {10, 6, 39, 25},                         /* widget size                    */
797     &bookshelf_screen_home_1_define,         /* next widget definition         */
798     &bookshelf_screen_prompt_1_define,       /* child widget definition        */
799     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_10), /* control block */
800     (void *) &bookshelf_screen_icon_10_properties /* extended properties       */
801 };
802 
803 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_9_define =
804 {
805     "icon_9",
806     GX_TYPE_ICON,                            /* widget type                    */
807     GX_ID_NONE,                              /* widget id                      */
808     #if defined(GX_WIDGET_USER_DATA)
809     0,                                       /* user data                      */
810     #endif
811     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
812     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
813     sizeof(GX_ICON),                         /* control block size             */
814     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
815     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
816     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
817     gx_studio_icon_create,                   /* create function                */
818     GX_NULL,                                 /* drawing function override      */
819     GX_NULL,                                 /* event function override        */
820     {158, 217, 207, 281},                    /* widget size                    */
821     &bookshelf_screen_icon_10_define,        /* next widget definition         */
822     &bookshelf_screen_prompt_9_define,       /* child widget definition        */
823     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_9), /* control block */
824     (void *) &bookshelf_screen_icon_9_properties /* extended properties        */
825 };
826 
827 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_8_define =
828 {
829     "icon_8",
830     GX_TYPE_ICON,                            /* widget type                    */
831     GX_ID_NONE,                              /* widget id                      */
832     #if defined(GX_WIDGET_USER_DATA)
833     0,                                       /* user data                      */
834     #endif
835     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
836     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
837     sizeof(GX_ICON),                         /* control block size             */
838     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
839     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
840     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
841     gx_studio_icon_create,                   /* create function                */
842     GX_NULL,                                 /* drawing function override      */
843     GX_NULL,                                 /* event function override        */
844     {90, 218, 139, 282},                     /* widget size                    */
845     &bookshelf_screen_icon_9_define,         /* next widget definition         */
846     &bookshelf_screen_prompt_8_define,       /* child widget definition        */
847     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_8), /* control block */
848     (void *) &bookshelf_screen_icon_8_properties /* extended properties        */
849 };
850 
851 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_7_define =
852 {
853     "icon_7",
854     GX_TYPE_ICON,                            /* widget type                    */
855     GX_ID_NONE,                              /* widget id                      */
856     #if defined(GX_WIDGET_USER_DATA)
857     0,                                       /* user data                      */
858     #endif
859     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
860     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
861     sizeof(GX_ICON),                         /* control block size             */
862     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
863     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
864     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
865     gx_studio_icon_create,                   /* create function                */
866     GX_NULL,                                 /* drawing function override      */
867     GX_NULL,                                 /* event function override        */
868     {22, 218, 71, 282},                      /* widget size                    */
869     &bookshelf_screen_icon_8_define,         /* next widget definition         */
870     &bookshelf_screen_prompt_7_define,       /* child widget definition        */
871     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_7), /* control block */
872     (void *) &bookshelf_screen_icon_7_properties /* extended properties        */
873 };
874 
875 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_6_define =
876 {
877     "icon_6",
878     GX_TYPE_ICON,                            /* widget type                    */
879     GX_ID_NONE,                              /* widget id                      */
880     #if defined(GX_WIDGET_USER_DATA)
881     0,                                       /* user data                      */
882     #endif
883     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
884     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
885     sizeof(GX_ICON),                         /* control block size             */
886     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
887     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
888     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
889     gx_studio_icon_create,                   /* create function                */
890     GX_NULL,                                 /* drawing function override      */
891     GX_NULL,                                 /* event function override        */
892     {158, 129, 207, 193},                    /* widget size                    */
893     &bookshelf_screen_icon_7_define,         /* next widget definition         */
894     &bookshelf_screen_prompt_6_define,       /* child widget definition        */
895     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_6), /* control block */
896     (void *) &bookshelf_screen_icon_6_properties /* extended properties        */
897 };
898 
899 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_5_define =
900 {
901     "icon_5",
902     GX_TYPE_ICON,                            /* widget type                    */
903     GX_ID_NONE,                              /* widget id                      */
904     #if defined(GX_WIDGET_USER_DATA)
905     0,                                       /* user data                      */
906     #endif
907     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
908     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
909     sizeof(GX_ICON),                         /* control block size             */
910     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
911     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
912     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
913     gx_studio_icon_create,                   /* create function                */
914     GX_NULL,                                 /* drawing function override      */
915     GX_NULL,                                 /* event function override        */
916     {22, 130, 71, 194},                      /* widget size                    */
917     &bookshelf_screen_icon_6_define,         /* next widget definition         */
918     &bookshelf_screen_prompt_4_define,       /* child widget definition        */
919     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_5), /* control block */
920     (void *) &bookshelf_screen_icon_5_properties /* extended properties        */
921 };
922 
923 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_4_define =
924 {
925     "icon_4",
926     GX_TYPE_ICON,                            /* widget type                    */
927     GX_ID_NONE,                              /* widget id                      */
928     #if defined(GX_WIDGET_USER_DATA)
929     0,                                       /* user data                      */
930     #endif
931     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
932     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
933     sizeof(GX_ICON),                         /* control block size             */
934     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
935     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
936     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
937     gx_studio_icon_create,                   /* create function                */
938     GX_NULL,                                 /* drawing function override      */
939     GX_NULL,                                 /* event function override        */
940     {90, 130, 139, 194},                     /* widget size                    */
941     &bookshelf_screen_icon_5_define,         /* next widget definition         */
942     &bookshelf_screen_prompt_5_define,       /* child widget definition        */
943     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_4), /* control block */
944     (void *) &bookshelf_screen_icon_4_properties /* extended properties        */
945 };
946 
947 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_3_define =
948 {
949     "icon_3",
950     GX_TYPE_ICON,                            /* widget type                    */
951     GX_ID_NONE,                              /* widget id                      */
952     #if defined(GX_WIDGET_USER_DATA)
953     0,                                       /* user data                      */
954     #endif
955     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
956     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
957     sizeof(GX_ICON),                         /* control block size             */
958     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
959     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
960     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
961     gx_studio_icon_create,                   /* create function                */
962     GX_NULL,                                 /* drawing function override      */
963     GX_NULL,                                 /* event function override        */
964     {158, 41, 207, 105},                     /* widget size                    */
965     &bookshelf_screen_icon_4_define,         /* next widget definition         */
966     &bookshelf_screen_prompt_3_define,       /* child widget definition        */
967     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_3), /* control block */
968     (void *) &bookshelf_screen_icon_3_properties /* extended properties        */
969 };
970 
971 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_2_define =
972 {
973     "icon_2",
974     GX_TYPE_ICON,                            /* widget type                    */
975     GX_ID_NONE,                              /* widget id                      */
976     #if defined(GX_WIDGET_USER_DATA)
977     0,                                       /* user data                      */
978     #endif
979     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
980     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
981     sizeof(GX_ICON),                         /* control block size             */
982     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
983     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
984     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
985     gx_studio_icon_create,                   /* create function                */
986     GX_NULL,                                 /* drawing function override      */
987     GX_NULL,                                 /* event function override        */
988     {90, 42, 139, 106},                      /* widget size                    */
989     &bookshelf_screen_icon_3_define,         /* next widget definition         */
990     &bookshelf_screen_prompt_2_define,       /* child widget definition        */
991     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_2), /* control block */
992     (void *) &bookshelf_screen_icon_2_properties /* extended properties        */
993 };
994 
995 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_1_define =
996 {
997     "icon_1",
998     GX_TYPE_ICON,                            /* widget type                    */
999     GX_ID_NONE,                              /* widget id                      */
1000     #if defined(GX_WIDGET_USER_DATA)
1001     0,                                       /* user data                      */
1002     #endif
1003     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1004     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1005     sizeof(GX_ICON),                         /* control block size             */
1006     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1007     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1008     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1009     gx_studio_icon_create,                   /* create function                */
1010     GX_NULL,                                 /* drawing function override      */
1011     GX_NULL,                                 /* event function override        */
1012     {22, 42, 71, 106},                       /* widget size                    */
1013     &bookshelf_screen_icon_2_define,         /* next widget definition         */
1014     &bookshelf_screen_prompt_10_define,      /* child widget definition        */
1015     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_1), /* control block */
1016     (void *) &bookshelf_screen_icon_1_properties /* extended properties        */
1017 };
1018 
1019 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_define =
1020 {
1021     "bookshelf_screen",
1022     GX_TYPE_WINDOW,                          /* widget type                    */
1023     GX_ID_NONE,                              /* widget id                      */
1024     #if defined(GX_WIDGET_USER_DATA)
1025     0,                                       /* user data                      */
1026     #endif
1027     GX_STYLE_BORDER_THIN,                    /* style flags                    */
1028     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1029     sizeof(BOOKSHELF_SCREEN_CONTROL_BLOCK),  /* control block size             */
1030     GX_COLOR_ID_GRAY,                        /* normal color id                */
1031     GX_COLOR_ID_GRAY,                        /* selected color id              */
1032     GX_COLOR_ID_GRAY,                        /* disabled color id              */
1033     gx_studio_window_create,                 /* create function                */
1034     GX_NULL,                                 /* drawing function override      */
1035     (UINT (*)(GX_WIDGET *, GX_EVENT *)) sub_menu_event, /* event function override */
1036     {0, 0, 239, 319},                        /* widget size                    */
1037     GX_NULL,                                 /* next widget                    */
1038     &bookshelf_screen_icon_1_define,         /* child widget                   */
1039     0,                                       /* control block                  */
1040     (void *) &bookshelf_screen_properties    /* extended properties            */
1041 };
1042 GX_WINDOW_PROPERTIES main_screen_properties =
1043 {
1044     0                                        /* wallpaper pixelmap id          */
1045 };
1046 GX_TEXT_BUTTON_PROPERTIES main_screen_home_properties =
1047 {
1048     GX_STRING_ID_STRING_52,                  /* string id                      */
1049     GX_FONT_ID_BUTTON,                       /* font id                        */
1050     GX_COLOR_ID_WHITE,                       /* normal text color              */
1051     GX_COLOR_ID_WHITE,                       /* selected text color            */
1052     GX_COLOR_ID_WHITE                        /* disabled text color            */
1053 };
1054 GX_TEXT_BUTTON_PROPERTIES main_screen_bookshelf_properties =
1055 {
1056     GX_STRING_ID_STRING_57,                  /* string id                      */
1057     GX_FONT_ID_BUTTON,                       /* font id                        */
1058     GX_COLOR_ID_WHITE,                       /* normal text color              */
1059     GX_COLOR_ID_WHITE,                       /* selected text color            */
1060     GX_COLOR_ID_WHITE                        /* disabled text color            */
1061 };
1062 GX_TEXT_BUTTON_PROPERTIES main_screen_booknotes_properties =
1063 {
1064     GX_STRING_ID_STRING_1,                   /* string id                      */
1065     GX_FONT_ID_BUTTON,                       /* font id                        */
1066     GX_COLOR_ID_WHITE,                       /* normal text color              */
1067     GX_COLOR_ID_WHITE,                       /* selected text color            */
1068     GX_COLOR_ID_WHITE                        /* disabled text color            */
1069 };
1070 GX_TEXT_BUTTON_PROPERTIES main_screen_search_properties =
1071 {
1072     GX_STRING_ID_STRING_58,                  /* string id                      */
1073     GX_FONT_ID_BUTTON,                       /* font id                        */
1074     GX_COLOR_ID_WHITE,                       /* normal text color              */
1075     GX_COLOR_ID_WHITE,                       /* selected text color            */
1076     GX_COLOR_ID_WHITE                        /* disabled text color            */
1077 };
1078 GX_TEXT_BUTTON_PROPERTIES main_screen_settings_properties =
1079 {
1080     GX_STRING_ID_STRING_60,                  /* string id                      */
1081     GX_FONT_ID_BUTTON,                       /* font id                        */
1082     GX_COLOR_ID_WHITE,                       /* normal text color              */
1083     GX_COLOR_ID_WHITE,                       /* selected text color            */
1084     GX_COLOR_ID_WHITE                        /* disabled text color            */
1085 };
1086 
1087 GX_CONST GX_STUDIO_WIDGET main_screen_settings_define =
1088 {
1089     "settings",
1090     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
1091     GX_ID_NONE,                              /* widget id                      */
1092     #if defined(GX_WIDGET_USER_DATA)
1093     0,                                       /* user data                      */
1094     #endif
1095     GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1096     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1097     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
1098     GX_COLOR_ID_BLACK,                       /* normal color id                */
1099     GX_COLOR_ID_BLACK,                       /* selected color id              */
1100     GX_COLOR_ID_BLACK,                       /* disabled color id              */
1101     gx_studio_text_button_create,            /* create function                */
1102     GX_NULL,                                 /* drawing function override      */
1103     GX_NULL,                                 /* event function override        */
1104     {28, 239, 200, 279},                     /* widget size                    */
1105     GX_NULL,                                 /* no next widget                 */
1106     GX_NULL,                                 /* no child widgets               */
1107     offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_settings), /* control block */
1108     (void *) &main_screen_settings_properties /* extended properties           */
1109 };
1110 
1111 GX_CONST GX_STUDIO_WIDGET main_screen_search_define =
1112 {
1113     "search",
1114     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
1115     GX_ID_NONE,                              /* widget id                      */
1116     #if defined(GX_WIDGET_USER_DATA)
1117     0,                                       /* user data                      */
1118     #endif
1119     GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1120     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1121     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
1122     GX_COLOR_ID_BLACK,                       /* normal color id                */
1123     GX_COLOR_ID_BLACK,                       /* selected color id              */
1124     GX_COLOR_ID_BLACK,                       /* disabled color id              */
1125     gx_studio_text_button_create,            /* create function                */
1126     GX_NULL,                                 /* drawing function override      */
1127     GX_NULL,                                 /* event function override        */
1128     {9, 188, 216, 228},                      /* widget size                    */
1129     &main_screen_settings_define,            /* next widget definition         */
1130     GX_NULL,                                 /* no child widgets               */
1131     offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_search), /* control block  */
1132     (void *) &main_screen_search_properties  /* extended properties            */
1133 };
1134 
1135 GX_CONST GX_STUDIO_WIDGET main_screen_booknotes_define =
1136 {
1137     "booknotes",
1138     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
1139     GX_ID_NONE,                              /* widget id                      */
1140     #if defined(GX_WIDGET_USER_DATA)
1141     0,                                       /* user data                      */
1142     #endif
1143     GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1144     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1145     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
1146     GX_COLOR_ID_BLACK,                       /* normal color id                */
1147     GX_COLOR_ID_BLACK,                       /* selected color id              */
1148     GX_COLOR_ID_BLACK,                       /* disabled color id              */
1149     gx_studio_text_button_create,            /* create function                */
1150     GX_NULL,                                 /* drawing function override      */
1151     GX_NULL,                                 /* event function override        */
1152     {45, 137, 192, 177},                     /* widget size                    */
1153     &main_screen_search_define,              /* next widget definition         */
1154     GX_NULL,                                 /* no child widgets               */
1155     offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_booknotes), /* control block */
1156     (void *) &main_screen_booknotes_properties /* extended properties          */
1157 };
1158 
1159 GX_CONST GX_STUDIO_WIDGET main_screen_bookshelf_define =
1160 {
1161     "bookshelf",
1162     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
1163     ID_BTN_BOOKSHELF,                        /* widget id                      */
1164     #if defined(GX_WIDGET_USER_DATA)
1165     0,                                       /* user data                      */
1166     #endif
1167     GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1168     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1169     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
1170     GX_COLOR_ID_BLACK,                       /* normal color id                */
1171     GX_COLOR_ID_BLACK,                       /* selected color id              */
1172     GX_COLOR_ID_BLACK,                       /* disabled color id              */
1173     gx_studio_text_button_create,            /* create function                */
1174     GX_NULL,                                 /* drawing function override      */
1175     GX_NULL,                                 /* event function override        */
1176     {10, 86, 217, 126},                      /* widget size                    */
1177     &main_screen_booknotes_define,           /* next widget definition         */
1178     GX_NULL,                                 /* no child widgets               */
1179     offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_bookshelf), /* control block */
1180     (void *) &main_screen_bookshelf_properties /* extended properties          */
1181 };
1182 
1183 GX_CONST GX_STUDIO_WIDGET main_screen_home_define =
1184 {
1185     "home",
1186     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
1187     ID_HOME_BUTTON,                          /* widget id                      */
1188     #if defined(GX_WIDGET_USER_DATA)
1189     0,                                       /* user data                      */
1190     #endif
1191     GX_STYLE_BORDER_RAISED|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1192     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1193     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
1194     GX_COLOR_ID_BLACK,                       /* normal color id                */
1195     GX_COLOR_ID_BLACK,                       /* selected color id              */
1196     GX_COLOR_ID_BLACK,                       /* disabled color id              */
1197     gx_studio_text_button_create,            /* create function                */
1198     GX_NULL,                                 /* drawing function override      */
1199     GX_NULL,                                 /* event function override        */
1200     {29, 36, 145, 76},                       /* widget size                    */
1201     &main_screen_bookshelf_define,           /* next widget definition         */
1202     GX_NULL,                                 /* no child widgets               */
1203     offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_home), /* control block    */
1204     (void *) &main_screen_home_properties    /* extended properties            */
1205 };
1206 
1207 GX_CONST GX_STUDIO_WIDGET main_screen_define =
1208 {
1209     "main_screen",
1210     GX_TYPE_WINDOW,                          /* widget type                    */
1211     GX_ID_NONE,                              /* widget id                      */
1212     #if defined(GX_WIDGET_USER_DATA)
1213     0,                                       /* user data                      */
1214     #endif
1215     GX_STYLE_BORDER_THIN,                    /* style flags                    */
1216     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1217     sizeof(MAIN_SCREEN_CONTROL_BLOCK),       /* control block size             */
1218     GX_COLOR_ID_GRAY,                        /* normal color id                */
1219     GX_COLOR_ID_GRAY,                        /* selected color id              */
1220     GX_COLOR_ID_GRAY,                        /* disabled color id              */
1221     gx_studio_window_create,                 /* create function                */
1222     GX_NULL,                                 /* drawing function override      */
1223     (UINT (*)(GX_WIDGET *, GX_EVENT *)) sub_menu_event, /* event function override */
1224     {-1, -1, 238, 318},                      /* widget size                    */
1225     GX_NULL,                                 /* next widget                    */
1226     &main_screen_home_define,                /* child widget                   */
1227     0,                                       /* control block                  */
1228     (void *) &main_screen_properties         /* extended properties            */
1229 };
1230 GX_CONST GX_STUDIO_WIDGET_ENTRY menu_widget_table[] =
1231 {
1232     { &toolbar_screen_define, (GX_WIDGET *) &toolbar_screen },
1233     { &book_screen_define, (GX_WIDGET *) &book_screen },
1234     { &bookshelf_screen_define, (GX_WIDGET *) &bookshelf_screen },
1235     { &main_screen_define, (GX_WIDGET *) &main_screen },
1236     {GX_NULL, GX_NULL}
1237 };
1238 
gx_studio_nested_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)1239 static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
1240 {
1241     UINT status = GX_SUCCESS;
1242     GX_WIDGET *widget = GX_NULL;
1243     GX_VALUE   list_count = 0;
1244     GX_VALUE   list_total_count = 0;
1245 
1246     if(parent && (parent->gx_widget_type == GX_TYPE_MENU))
1247     {
1248         list_total_count = ((GX_MENU *)parent)->gx_menu_list_total_count;
1249     }
1250 
1251     while(definition && status == GX_SUCCESS)
1252     {
1253         if (definition->create_function)
1254         {
1255             if (definition->style & GX_STYLE_DYNAMICALLY_ALLOCATED)
1256             {
1257                 status = gx_widget_allocate(&widget, definition->control_block_size);
1258                 if (status != GX_SUCCESS)
1259                 {
1260                     return GX_NULL;
1261                 }
1262             }
1263             else
1264             {
1265                 if (control == GX_NULL)
1266                 {
1267                     return GX_NULL;
1268                 }
1269                 widget = (GX_WIDGET *) (control + definition->control_block_offset);
1270             }
1271 
1272             status = definition->create_function(definition, widget, parent);
1273 
1274             if(list_count < list_total_count)
1275             {
1276                 gx_menu_insert((GX_MENU *)parent, widget);
1277                 ((GX_MENU *)parent)->gx_menu_list_total_count--;
1278                 list_count++;
1279             }
1280 
1281             if (status == GX_SUCCESS)
1282             {
1283                 if (definition->widget_type != GX_TYPE_TEMPLATE)
1284                 {
1285 #if defined(GUIX_5_4_0_COMPATIBILITY)
1286                     gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id);
1287 #else
1288                     gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id, definition->disabled_fill_color_id);
1289 #endif
1290                 }
1291 
1292                 if (!(definition->status & GX_STATUS_ACCEPTS_FOCUS))
1293                 {
1294                     gx_widget_status_remove(widget, GX_STATUS_ACCEPTS_FOCUS);
1295                 }
1296 
1297                 if (definition->draw_function)
1298                 {
1299                     gx_widget_draw_set(widget, definition->draw_function);
1300                 }
1301                 if (definition->event_function)
1302                 {
1303                     gx_widget_event_process_set(widget, definition->event_function);
1304                 }
1305 
1306                 #if defined(GX_WIDGET_USER_DATA)
1307                 widget->gx_widget_user_data = definition->user_data;
1308                 #endif
1309 
1310                 if (definition->child_widget)
1311                 {
1312                     gx_studio_nested_widget_create(control, definition->child_widget, widget);
1313                 }
1314             }
1315             definition = definition->next_widget;
1316         }
1317     }
1318     return widget;
1319 }
1320 
gx_studio_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)1321 GX_WIDGET *gx_studio_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
1322 {
1323     GX_WIDGET *widget;
1324     widget = gx_studio_nested_widget_create(control, definition, GX_NULL);
1325 
1326     if (parent && widget)
1327     {
1328         gx_widget_attach(parent, widget);
1329     }
1330     return widget;
1331 }
1332 
gx_studio_named_widget_create(char * name,GX_WIDGET * parent,GX_WIDGET ** new_widget)1333 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget)
1334 {
1335     UINT status = GX_FAILURE;
1336     GX_CONST GX_STUDIO_WIDGET_ENTRY *entry = menu_widget_table;
1337     GX_WIDGET *widget = GX_NULL;
1338 
1339     while(entry->widget_information)
1340     {
1341         if (!strcmp(name, entry->widget_information->widget_name))
1342         {
1343             widget = gx_studio_widget_create((GX_BYTE *) entry->widget, entry->widget_information, parent);
1344             if (widget)
1345             {
1346                 status = GX_SUCCESS;
1347             }
1348             break;
1349         }
1350         entry++;
1351     }
1352 
1353     if (new_widget)
1354     {
1355         *new_widget = widget;
1356     }
1357     return status;
1358 }
1359 
1360 
gx_studio_display_configure(USHORT display,UINT (* driver)(GX_DISPLAY *),GX_UBYTE language,USHORT theme,GX_WINDOW_ROOT ** return_root)1361 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *),
1362     GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root)
1363 {
1364     GX_CONST GX_THEME *theme_ptr;
1365     GX_RECTANGLE size;
1366 
1367     GX_STUDIO_DISPLAY_INFO *display_info = &menu_display_table[display];
1368 
1369 
1370 /* create the requested display                                                */
1371 
1372     gx_display_create(display_info->display,
1373                       display_info->name,
1374                       driver,
1375                       (GX_VALUE) display_info->x_resolution,
1376                       (GX_VALUE) display_info->y_resolution);
1377 
1378 
1379 /* install the request theme                                                   */
1380 
1381     if(display_info->theme_table)
1382     {
1383         theme_ptr = display_info->theme_table[theme];
1384         if(theme_ptr)
1385         {
1386             gx_display_color_table_set(display_info->display, theme_ptr->theme_color_table, theme_ptr->theme_color_table_size);
1387 
1388 /* install the color palette if required                                       */
1389             if (display_info->display->gx_display_driver_palette_set &&
1390                 theme_ptr->theme_palette != NULL)
1391             {
1392                 display_info->display->gx_display_driver_palette_set(display_info->display, theme_ptr->theme_palette, theme_ptr->theme_palette_size);
1393             }
1394 
1395             gx_display_font_table_set(display_info->display, theme_ptr->theme_font_table, theme_ptr->theme_font_table_size);
1396             gx_display_pixelmap_table_set(display_info->display, theme_ptr->theme_pixelmap_table, theme_ptr->theme_pixelmap_table_size);
1397             gx_system_scroll_appearance_set(theme_ptr->theme_vertical_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_vertical_scrollbar_appearance);
1398             gx_system_scroll_appearance_set(theme_ptr->theme_horizontal_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_horizontal_scrollbar_appearance);
1399         }
1400     }
1401 
1402 /* Install the language table.                                                 */
1403 
1404     if(display_info->language_table)
1405     {
1406         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);
1407         gx_display_active_language_set(display_info->display, language);
1408     }
1409 
1410 /* Set screen rotation angle.                                                  */
1411 
1412     display_info->display->gx_display_rotation_angle = display_info->rotation_angle;
1413 
1414 /* create the canvas for this display                                          */
1415 
1416     gx_canvas_create(display_info->canvas,
1417                      display_info->canvas_name,
1418                      display_info->display,
1419                      GX_CANVAS_MANAGED | GX_CANVAS_VISIBLE,
1420                      display_info->x_resolution,
1421                      display_info->y_resolution,
1422                      display_info->canvas_memory,
1423                      display_info->canvas_memory_size);
1424 
1425 /* Create the root window for this canvas                                      */
1426 
1427     gx_utility_rectangle_define(&size,
1428                                 0, 0,
1429                                 (GX_VALUE) (display_info->x_resolution - 1),
1430                                 (GX_VALUE) (display_info->y_resolution - 1));
1431 
1432     gx_window_root_create(display_info->root_window,
1433                           display_info->name,
1434                           display_info->canvas, GX_STYLE_NONE, 0, &size);
1435     if (return_root)
1436     {
1437         *return_root = display_info->root_window;
1438     }
1439     return GX_SUCCESS;
1440 }
1441 #undef GUIX_STUDIO_GENERATED_FILE
1442