/*******************************************************************************/
/*  This file is auto-generated by Azure RTOS GUIX Studio. Do not edit this    */
/*  file by hand. Modifications to this file should only be made by running    */
/*  the Azure RTOS GUIX Studio application and re-generating the application   */
/*  specification file(s). For more information please refer to the Azure RTOS */
/*  GUIX Studio User Guide, or visit our web site at azure.com/rtos            */
/*                                                                             */
/*  GUIX Studio Revision 6.2.0.1                                               */
/*  Date (dd.mm.yyyy): 31.10.2022   Time (hh:mm): 14:11                        */
/*******************************************************************************/


#define GUIX_STUDIO_GENERATED_FILE
#include <stddef.h>
#include "runtime_allocate_16bpp_resources.h"
#include "runtime_allocate_16bpp_specifications.h"

static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
GX_CONST GX_STUDIO_WIDGET window_define;
GX_DISPLAY display_1_control_block;
GX_WINDOW_ROOT display_1_root_window;
GX_CANVAS  display_1_canvas_control_block;
ULONG      display_1_canvas_memory[192000];

extern GX_CONST GX_THEME *display_1_theme_table[];
extern GX_CONST GX_STRING *display_1_language_table[];

GX_STUDIO_DISPLAY_INFO runtime_allocate_16bpp_display_table[1] =
{
    {
    "display_1",
    "display_1_canvas",
    display_1_theme_table,
    display_1_language_table,
    DISPLAY_1_THEME_TABLE_SIZE,
    DISPLAY_1_LANGUAGE_TABLE_SIZE,
    DISPLAY_1_STRING_TABLE_SIZE,
    800,                                     /* x resolution                   */
    480,                                     /* y resolution                   */
    &display_1_control_block,
    &display_1_canvas_control_block,
    &display_1_root_window,
    display_1_canvas_memory,                 /* canvas memory area             */
    768000,                                  /* canvas memory size in bytes    */
    0                                        /* rotation angle                 */
    }
};


UINT gx_studio_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_BUTTON *button = (GX_BUTTON *) control_block;
    status = gx_button_create(button, info->widget_name, parent, info->style, info->widget_id, &info->size);
    return status;
}

UINT gx_studio_text_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_TEXT_BUTTON *button = (GX_TEXT_BUTTON *) control_block;
    GX_TEXT_BUTTON_PROPERTIES *props = (GX_TEXT_BUTTON_PROPERTIES *) info->properties;
    status = gx_text_button_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        gx_text_button_font_set(button, props->font_id);
#if defined(GUIX_5_4_0_COMPATIBILITY)
        gx_text_button_text_color_set(button, props->normal_text_color_id, props->selected_text_color_id);
#else
        gx_text_button_text_color_set(button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
#endif
    }
    return status;
}

UINT gx_studio_multi_line_text_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_MULTI_LINE_TEXT_BUTTON *button = (GX_MULTI_LINE_TEXT_BUTTON *) control_block;
    GX_ML_TEXT_BUTTON_PROPERTIES *props = (GX_ML_TEXT_BUTTON_PROPERTIES *) info->properties;
    status = gx_multi_line_text_button_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        gx_text_button_font_set((GX_TEXT_BUTTON *) button, props->font_id);
#if defined(GUIX_5_4_0_COMPATIBILITY)
        gx_text_button_text_color_set((GX_TEXT_BUTTON *) button, props->normal_text_color_id, props->selected_text_color_id);
#else
        gx_text_button_text_color_set((GX_TEXT_BUTTON *) button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
#endif
    }
    return status;
}

UINT gx_studio_checkbox_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_CHECKBOX *button = (GX_CHECKBOX *) control_block;
    GX_TEXT_BUTTON *text_button = (GX_TEXT_BUTTON *) button;
    GX_CHECKBOX_PROPERTIES *props = (GX_CHECKBOX_PROPERTIES *) info->properties;
    status = gx_checkbox_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        gx_text_button_font_set(text_button, props->font_id);
#if defined(GUIX_5_4_0_COMPATIBILITY)
        gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id);
 #else
        gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
#endif

        if (props->unchecked_pixelmap_id ||
            props->checked_pixelmap_id ||
            props->unchecked_disabled_pixelmap_id ||
            props->checked_disabled_pixelmap_id)
        {
            gx_checkbox_pixelmap_set(button,
                                     props->unchecked_pixelmap_id,
                                     props->checked_pixelmap_id,
                                     props->unchecked_disabled_pixelmap_id,
                                     props->checked_disabled_pixelmap_id);
        }
    }
    return status;
}

UINT gx_studio_radio_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_RADIO_BUTTON *button = (GX_RADIO_BUTTON *) control_block;
    GX_TEXT_BUTTON *text_button = (GX_TEXT_BUTTON *) button;
    GX_RADIO_BUTTON_PROPERTIES *props = (GX_RADIO_BUTTON_PROPERTIES *) info->properties;
    status = gx_radio_button_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        gx_text_button_font_set(text_button, props->font_id);
#if defined(GUIX_5_4_0_COMPATIBILITY)
        gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id);
#else
        gx_text_button_text_color_set(text_button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
#endif

        if (props->off_pixelmap_id ||
            props->on_pixelmap_id ||
            props->off_disabled_pixelmap_id ||
            props->on_disabled_pixelmap_id)
        {
            gx_radio_button_pixelmap_set(button,
                                     props->off_pixelmap_id,
                                     props->on_pixelmap_id,
                                     props->off_disabled_pixelmap_id,
                                     props->on_disabled_pixelmap_id);
        }
    }
    return status;
}

UINT gx_studio_icon_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_ICON_BUTTON *button = (GX_ICON_BUTTON *) control_block;
    GX_ICON_BUTTON_PROPERTIES *props = (GX_ICON_BUTTON_PROPERTIES *) info->properties;
    status = gx_icon_button_create(button, info->widget_name, parent, props->pixelmap_id, info->style, info->widget_id, &info->size);
    return status;
}

UINT gx_studio_pixelmap_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_PIXELMAP_BUTTON *button = (GX_PIXELMAP_BUTTON *) control_block;
    GX_PIXELMAP_BUTTON_PROPERTIES *props = (GX_PIXELMAP_BUTTON_PROPERTIES *) info->properties;
    status = gx_pixelmap_button_create(button, info->widget_name, parent,
               props->normal_pixelmap_id,
               props->selected_pixelmap_id,
               props->disabled_pixelmap_id,
               info->style, info->widget_id, &info->size);
    return status;
}

UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_ICON *icon = (GX_ICON *) control_block;
    GX_ICON_PROPERTIES *props = (GX_ICON_PROPERTIES *) info->properties;
    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);
    if (props->selected_pixelmap_id)
    {
        gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
    }
    else
    {
        gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
    }
    return status;
}

UINT gx_studio_slider_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_SLIDER *slider = (GX_SLIDER *) control_block;
    GX_SLIDER_PROPERTIES *props = (GX_SLIDER_PROPERTIES *) info->properties;
    GX_SLIDER_INFO slider_info;
    slider_info.gx_slider_info_min_val = props->minval;
    slider_info.gx_slider_info_max_val = props->maxval;
    slider_info.gx_slider_info_current_val = props->current_val;
    slider_info.gx_slider_info_increment = props->increment;
    slider_info.gx_slider_info_min_travel = props->min_travel;
    slider_info.gx_slider_info_max_travel = props->max_travel;
    slider_info.gx_slider_info_needle_width = props->needle_width;
    slider_info.gx_slider_info_needle_height = props->needle_height;
    slider_info.gx_slider_info_needle_inset = props->needle_inset;
    slider_info.gx_slider_info_needle_hotspot_offset = props->needle_hotspot;
    status = gx_slider_create(slider,
                    info->widget_name,
                    parent,
                    props->tickmark_count,
                    &slider_info,
                    info->style,
                    info->widget_id,
                    &info->size);
    return status;
}

UINT gx_studio_pixelmap_slider_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_PIXELMAP_SLIDER *slider = (GX_PIXELMAP_SLIDER *) control_block;
    GX_PIXELMAP_SLIDER_PROPERTIES *props = (GX_PIXELMAP_SLIDER_PROPERTIES *) info->properties;
    GX_PIXELMAP_SLIDER_INFO pixelmap_info;
    GX_SLIDER_INFO slider_info;
    slider_info.gx_slider_info_min_val = props->min_val;
    slider_info.gx_slider_info_max_val = props->max_val;
    slider_info.gx_slider_info_current_val = props->current_val;
    slider_info.gx_slider_info_increment = props->increment;
    slider_info.gx_slider_info_min_travel = props->min_travel;
    slider_info.gx_slider_info_max_travel = props->max_travel;
    slider_info.gx_slider_info_needle_width = props->needle_width;
    slider_info.gx_slider_info_needle_height = props->needle_height;
    slider_info.gx_slider_info_needle_inset = props->needle_inset;
    slider_info.gx_slider_info_needle_hotspot_offset = props->needle_hotspot;
    pixelmap_info.gx_pixelmap_slider_info_lower_background_pixelmap = props->lower_pixelmap;
    pixelmap_info.gx_pixelmap_slider_info_upper_background_pixelmap = props->upper_pixelmap;
    pixelmap_info.gx_pixelmap_slider_info_needle_pixelmap = props->needle_pixelmap;
    status = gx_pixelmap_slider_create(slider,
                    info->widget_name,
                    parent,
                    &slider_info,
                    &pixelmap_info,
                    info->style,
                    info->widget_id,
                    &info->size);
    return status;
}

UINT gx_studio_progress_bar_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_PROGRESS_BAR *bar = (GX_PROGRESS_BAR *) control_block;
    GX_PROGRESS_BAR_INFO *bar_info = (GX_PROGRESS_BAR_INFO *) info->properties;
    status = gx_progress_bar_create(bar,
                    info->widget_name,
                    parent,
                    bar_info,
                    info->style,
                    info->widget_id,
                    &info->size);
    return status;
}

UINT gx_studio_sprite_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_SPRITE *sprite = (GX_SPRITE *) control_block;
    GX_SPRITE_PROPERTIES *props = (GX_SPRITE_PROPERTIES *) info->properties;
    status = gx_sprite_create(sprite, info->widget_name, parent,
               props->frame_list, props->frame_count,
               info->style, info->widget_id, &info->size);
    return status;
}

UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_PROMPT *prompt = (GX_PROMPT *) control_block;
    GX_PROMPT_PROPERTIES *props = (GX_PROMPT_PROPERTIES *) info->properties;
    status = gx_prompt_create(prompt, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        gx_prompt_font_set(prompt, props->font_id);
#if defined(GUIX_5_4_0_COMPATIBILITY)
        gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id);
#else
        gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
#endif
    }
    return status;
}

UINT gx_studio_pixelmap_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_PIXELMAP_PROMPT *pix_prompt = (GX_PIXELMAP_PROMPT *) control_block;
    GX_PROMPT *prompt = (GX_PROMPT *) pix_prompt;
    GX_PIXELMAP_PROMPT_PROPERTIES *props = (GX_PIXELMAP_PROMPT_PROPERTIES *) info->properties;
    status = gx_pixelmap_prompt_create(pix_prompt, info->widget_name, parent,
               props->string_id,
               props->fill_map_id,
               info->style, info->widget_id, &info->size);

    if (status == GX_SUCCESS)
    {
        gx_pixelmap_prompt_pixelmap_set(pix_prompt,
                                        props->left_map_id,
                                        props->fill_map_id,
                                        props->right_map_id,
                                        props->selected_left_map_id,
                                        props->selected_fill_map_id,
                                        props->selected_right_map_id);
        gx_prompt_font_set(prompt, props->font_id);
#if defined(GUIX_5_4_0_COMPATIBILITY)
        gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id);
#else
        gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
#endif
    }
    return status;
}

UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_WINDOW *window = (GX_WINDOW *) control_block;
    GX_WINDOW_PROPERTIES *props = (GX_WINDOW_PROPERTIES *) info->properties;
    status = gx_window_create(window, info->widget_name, parent, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        if (props->wallpaper_id)
        {
            gx_window_wallpaper_set(window, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
        }
    }
    return status;
}

UINT gx_studio_vertical_list_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_VERTICAL_LIST *list = (GX_VERTICAL_LIST *) control_block;
    GX_VERTICAL_LIST_PROPERTIES *props = (GX_VERTICAL_LIST_PROPERTIES *) info->properties;
    status = gx_vertical_list_create(list, info->widget_name, parent, props->total_rows,
                                     props->callback, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        if (props->wallpaper_id)
        {
            gx_window_wallpaper_set((GX_WINDOW *) list, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
        }
    }
    return status;
}

UINT gx_studio_horizontal_list_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_HORIZONTAL_LIST *list = (GX_HORIZONTAL_LIST *) control_block;
    GX_HORIZONTAL_LIST_PROPERTIES *props = (GX_HORIZONTAL_LIST_PROPERTIES *) info->properties;
    status = gx_horizontal_list_create(list, info->widget_name, parent, props->total_rows,
                                     props->callback, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        if (props->wallpaper_id)
        {
            gx_window_wallpaper_set((GX_WINDOW *) list, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
        }
    }
    return status;
}

UINT gx_studio_drop_list_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_DROP_LIST *list = (GX_DROP_LIST *) control_block;
    GX_DROP_LIST_PROPERTIES *props = (GX_DROP_LIST_PROPERTIES *) info->properties;
    status = gx_drop_list_create(list, info->widget_name, parent,
                                 props->total_rows, props->open_height,
                                 props->callback, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        if (props->pixelmap_id)
        {
            gx_drop_list_pixelmap_set(list, props->pixelmap_id);
        }
        if (props->wallpaper_id)
        {
            gx_window_wallpaper_set((GX_WINDOW *)&list->gx_drop_list_popup.gx_popup_list_list, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
        }
    }
    return status;
}

UINT gx_studio_text_input_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_STRING text;
    GX_SINGLE_LINE_TEXT_INPUT *input = (GX_SINGLE_LINE_TEXT_INPUT *) control_block;
    GX_PROMPT *prompt = (GX_PROMPT *) input;
    GX_SINGLE_LINE_TEXT_INPUT_PROPERTIES *props = (GX_SINGLE_LINE_TEXT_INPUT_PROPERTIES *) info->properties;
    status = gx_single_line_text_input_create(input, info->widget_name, parent, props->buffer, props->buffer_size, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        gx_prompt_font_set(prompt, props->font_id);
        gx_single_line_text_input_text_color_set(input, props->normal_text_color_id, props->selected_text_color_id,
                                                 props->disabled_text_color_id, props->readonly_text_color_id);
        gx_single_line_text_input_fill_color_set(input, input->gx_widget_normal_fill_color, input->gx_widget_selected_fill_color,
                                                 input->gx_widget_disabled_fill_color, props->readonly_fill_color_id);
        if (props->buffer && props->buffer_size > 0 && props->string_id)
        {
             gx_display_string_get_ext(runtime_allocate_16bpp_display_table[0].display, props->string_id, &text);

             if (text.gx_string_ptr)
             {
                 gx_single_line_text_input_text_set_ext(input, &text);
             }
        }
    }
    return status;
}

UINT gx_studio_multi_line_text_view_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_MULTI_LINE_TEXT_VIEW *view = (GX_MULTI_LINE_TEXT_VIEW *) control_block;
    GX_ML_TEXT_VIEW_PROPERTIES *props = (GX_ML_TEXT_VIEW_PROPERTIES *) info->properties;
    status = gx_multi_line_text_view_create(view, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        gx_multi_line_text_view_font_set(view, props->font_id);
#if defined(GUIX_5_4_0_COMPATIBILITY)
        gx_multi_line_text_view_text_color_set(view, props->normal_text_color_id, props->selected_text_color_id);
#else
        gx_multi_line_text_view_text_color_set(view, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
#endif
        gx_multi_line_text_view_whitespace_set(view, props->whitespace);
        gx_multi_line_text_view_line_space_set(view, props->line_space);
    }
    return status;
}

UINT gx_studio_multi_line_text_input_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_STRING text;
    GX_MULTI_LINE_TEXT_INPUT *input = (GX_MULTI_LINE_TEXT_INPUT *) control_block;
    GX_MULTI_LINE_TEXT_INPUT_PROPERTIES *props = (GX_MULTI_LINE_TEXT_INPUT_PROPERTIES *) info->properties;
    status = gx_multi_line_text_input_create(input, info->widget_name, parent, props->buffer, props->buffer_size, info->style, info->widget_id, &info->size);
    if (status == GX_SUCCESS)
    {
        gx_multi_line_text_view_font_set((GX_MULTI_LINE_TEXT_VIEW *) input, props->font_id);
        gx_multi_line_text_input_fill_color_set(input, info->normal_fill_color_id, info->selected_fill_color_id,
                                                info->disabled_fill_color_id, props->readonly_fill_color_id);
        gx_multi_line_text_input_text_color_set(input, props->normal_text_color_id, props->selected_text_color_id,
                                                props->disabled_text_color_id, props->readonly_text_color_id);
        gx_multi_line_text_view_whitespace_set((GX_MULTI_LINE_TEXT_VIEW *) input, props->whitespace);
        gx_multi_line_text_view_line_space_set((GX_MULTI_LINE_TEXT_VIEW *) input, props->line_space);
        if(props->buffer && (props->buffer_size > 0) && props->string_id)
        {
            gx_display_string_get_ext(runtime_allocate_16bpp_display_table[0].display, props->string_id, &text);
            if(text.gx_string_ptr)
            {
                gx_multi_line_text_input_text_set_ext(input, &text);
            }
        }
    }
    return status;
}

UINT gx_studio_horizontal_scrollbar_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_SCROLLBAR *scroll = (GX_SCROLLBAR *) control_block;
    GX_SCROLLBAR_APPEARANCE *appearance = (GX_SCROLLBAR_APPEARANCE *) info->properties;
    status = gx_horizontal_scrollbar_create(scroll, info->widget_name, parent, appearance, info->style);
    return status;
}

UINT gx_studio_vertical_scrollbar_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_SCROLLBAR *scroll = (GX_SCROLLBAR *) control_block;
    GX_SCROLLBAR_APPEARANCE *appearance = (GX_SCROLLBAR_APPEARANCE *) info->properties;
    status = gx_vertical_scrollbar_create(scroll, info->widget_name, parent, appearance, info->style);
    return status;
}

UINT gx_studio_circular_gauge_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
{
    UINT status;
    GX_CIRCULAR_GAUGE *gauge = (GX_CIRCULAR_GAUGE *) control_block;
    GX_CIRCULAR_GAUGE_PROPERTIES *props = (GX_CIRCULAR_GAUGE_PROPERTIES *) info->properties;
    GX_CIRCULAR_GAUGE_INFO gauge_info;
    gauge_info.gx_circular_gauge_info_needle_pixelmap = props->needle_pixelmap_id;
    gauge_info.gx_circular_gauge_info_needle_xpos = props->needle_xpos;
    gauge_info.gx_circular_gauge_info_needle_ypos = props->needle_ypos;
    gauge_info.gx_circular_gauge_info_needle_xcor = props->needle_xcor;
    gauge_info.gx_circular_gauge_info_needle_ycor = props->needle_ycor;
    gauge_info.gx_circular_gauge_info_animation_steps = props->animation_steps;
    gauge_info.gx_circular_gauge_info_animation_delay = props->animation_delay;
    gauge->gx_icon_normal_pixelmap = props->normal_pixelmap_id;
    gauge->gx_icon_selected_pixelmap = props->selected_pixelmap_id;
    status = gx_circular_gauge_create(gauge,
                    info->widget_name,
                    parent,
                    &gauge_info,
                    props->normal_pixelmap_id,
                    info->style,
                    info->widget_id,
                    info->size.gx_rectangle_left,
                    info->size.gx_rectangle_top);
    return status;
}
GX_WINDOW_PROPERTIES window_properties =
{
    0                                        /* wallpaper pixelmap id          */
};
GX_WINDOW_PROPERTIES window_window_1_properties =
{
    GX_PIXELMAP_ID__565RGB_COMPRESSED_FISH   /* wallpaper pixelmap id          */
};
GX_PIXELMAP_BUTTON_PROPERTIES window_pixelmap_button_1_properties =
{
    GX_PIXELMAP_ID_ALPHAMAP_COMPRESSED,      /* normal pixelmap id             */
    0,                                       /* selected pixelmap id           */
    0                                        /* disabled pixelmap id           */
};
GX_ICON_PROPERTIES window_icon_1_properties =
{
    GX_PIXELMAP_ID_PALETTE_ALPHA_DITHER_APPLE, /* normal pixelmap id           */
    0                                        /* selected pixelmap id           */
};
GX_RADIO_BUTTON_PROPERTIES window_radio_button_1_properties =
{
    GX_STRING_ID_STRING_5,                   /* string id                      */
    GX_FONT_ID_FONT_1BPP,                    /* font id                        */
    GX_COLOR_ID_BTN_TEXT,                    /* normal text color              */
    GX_COLOR_ID_BTN_TEXT,                    /* selected text color            */
    GX_COLOR_ID_BTN_TEXT,                    /* disabled text color            */
    GX_PIXELMAP_ID_RADIO_ON,                 /* off pixelmap id                */
    0,                                       /* on pixelmap id                 */
    0,                                       /* off disabled pixelmap id       */
    0                                        /* on disabled pixelmap id        */
};
GX_PIXELMAP_PROMPT_PROPERTIES window_prompt_1_properties =
{
    GX_STRING_ID_STRING_6,                   /* string id                      */
    GX_FONT_ID_FONT_4BPP,                    /* font id                        */
    GX_COLOR_ID_TEXT,                        /* normal text color              */
    GX_COLOR_ID_WINDOW_FILL,                 /* selected text color            */
    GX_COLOR_ID_TEXT,                        /* disabled text color            */
    GX_PIXELMAP_ID_RAW_PNG_FOOT,             /* left pixelmap id               */
    0,                                       /* fill pixelmap id               */
    0,                                       /* right pixelmap id              */
    0,                                       /* selected left pixelmap id      */
    0,                                       /* selected fill pixelmap id      */
    0                                        /* selected right pixelmap id     */
};
GX_PROMPT_PROPERTIES window_prompt_2_properties =
{
    GX_STRING_ID_STRING_7,                   /* string id                      */
    GX_FONT_ID_FONT_8BPP,                    /* font id                        */
    GX_COLOR_ID_TEXT,                        /* normal text color              */
    GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
    GX_COLOR_ID_TEXT                         /* disabled text color            */
};
GX_CHAR window_text_input_1_buffer[100];
GX_SINGLE_LINE_TEXT_INPUT_PROPERTIES window_text_input_1_properties =
{
    0,                                       /* string id                      */
    GX_FONT_ID_TEXT_INPUT,                   /* font id                        */
    GX_COLOR_ID_TEXT_INPUT_TEXT,             /* normal text color              */
    GX_COLOR_ID_TEXT_INPUT_TEXT,             /* selected text color            */
    GX_COLOR_ID_TEXT_INPUT_TEXT,             /* disabled text color            */
    GX_COLOR_ID_READONLY_FILL,               /* readonly fill color            */
    GX_COLOR_ID_READONLY_TEXT,               /* readonly text color            */
    window_text_input_1_buffer,              /* buffer                         */
    100,                                     /* buffer size                    */
};
GX_ML_TEXT_VIEW_PROPERTIES window_text_view_1_properties =
{
    GX_STRING_ID_STRING_9,                   /* string id                      */
    GX_FONT_ID_BUTTON,                       /* font id                        */
    GX_COLOR_ID_TEXT_INPUT_TEXT,             /* normal text color              */
    GX_COLOR_ID_TEXT_INPUT_TEXT,             /* selected text color            */
    GX_COLOR_ID_TEXT_INPUT_TEXT,             /* disabled text color            */
    0,                                       /* whitespace                     */
    0                                        /* line_space                     */
};
GX_CHAR window_text_input_2_buffer[100];
GX_MULTI_LINE_TEXT_INPUT_PROPERTIES window_text_input_2_properties =
{
    GX_STRING_ID_STRING_10,                  /* string id                      */
    GX_FONT_ID_TEXT_INPUT,                   /* font id                        */
    GX_COLOR_ID_TEXT_INPUT_TEXT,             /* normal text color              */
    GX_COLOR_ID_TEXT_INPUT_TEXT,             /* selected text color            */
    GX_COLOR_ID_TEXT_INPUT_TEXT,             /* disabled text color            */
    GX_COLOR_ID_READONLY_FILL,               /* readonly fill color            */
    GX_COLOR_ID_READONLY_TEXT,               /* readonly text color            */
    0,                                       /* whitespace                     */
    0,                                       /* line_space                     */
    window_text_input_2_buffer,              /* buffer                         */
    100                                      /* buffer size                    */
};
GX_TEXT_BUTTON_PROPERTIES window_button_2_properties =
{
    GX_STRING_ID_STRING_15,                  /* string id                      */
    GX_FONT_ID_FONT_1BPP,                    /* font id                        */
    GX_COLOR_ID_BTN_TEXT,                    /* normal text color              */
    GX_COLOR_ID_BTN_TEXT,                    /* selected text color            */
    GX_COLOR_ID_BTN_TEXT                     /* disabled text color            */
};
GX_ML_TEXT_BUTTON_PROPERTIES window_multi_line_button_1_properties =
{
    GX_STRING_ID_STRING_11,                  /* string id                      */
    GX_FONT_ID_BUTTON,                       /* font id                        */
    GX_COLOR_ID_BTN_TEXT,                    /* normal text color              */
    GX_COLOR_ID_BTN_TEXT,                    /* selected text color            */
    GX_COLOR_ID_BTN_TEXT                     /* disabled text color            */
};
GX_CHECKBOX_PROPERTIES window_checkbox_1_properties =
{
    GX_STRING_ID_STRING_12,                  /* string id                      */
    GX_FONT_ID_BUTTON,                       /* font id                        */
    GX_COLOR_ID_BTN_TEXT,                    /* normal text color              */
    GX_COLOR_ID_BTN_TEXT,                    /* selected text color            */
    GX_COLOR_ID_BTN_TEXT,                    /* disabled text color            */
    0,                                       /* unchecked pixelmap id          */
    0,                                       /* checked pixelmap id            */
    0,                                       /* unchecked disabled pixelmap id */
    0                                        /* checked disabled pixelmap id   */
};
GX_ICON_BUTTON_PROPERTIES window_icon_button_1_properties =
{
    GX_PIXELMAP_ID__565RGB_RAW_SAVE          /* pixelmap id                    */
};
GX_VERTICAL_LIST_PROPERTIES window_vertical_list_1_properties =
{
    0,                                       /* wallpaper id                   */
    GX_NULL,                                 /* callback function              */
    2                                        /* total rows                     */
};
GX_TEXT_BUTTON_PROPERTIES window_button_3_properties =
{
    GX_STRING_ID_STRING_1,                   /* string id                      */
    GX_FONT_ID_BUTTON,                       /* font id                        */
    GX_COLOR_ID_BTN_TEXT,                    /* normal text color              */
    GX_COLOR_ID_BTN_TEXT,                    /* selected text color            */
    GX_COLOR_ID_BTN_TEXT                     /* disabled text color            */
};
GX_HORIZONTAL_LIST_PROPERTIES window_horizontal_list_1_properties =
{
    0,                                       /* wallpaper id                   */
    GX_NULL,                                 /* callback function              */
    3                                        /* total columns                  */
};
GX_PROMPT_PROPERTIES window_prompt_3_properties =
{
    GX_STRING_ID_STRING_2,                   /* string id                      */
    GX_FONT_ID_PROMPT,                       /* font id                        */
    GX_COLOR_ID_TEXT,                        /* normal text color              */
    GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
    GX_COLOR_ID_TEXT                         /* disabled text color            */
};
GX_ICON_PROPERTIES window_icon_2_properties =
{
    GX_PIXELMAP_ID__4444ARGB_ALPHA_PATIENT,  /* normal pixelmap id             */
    0                                        /* selected pixelmap id           */
};
GX_DROP_LIST_PROPERTIES window_drop_list_1_properties =
{
    0,                                       /* widget pixelmap id             */
    0,                                       /* popup list wallpaper pixelmap id */
    GX_NULL,                                 /* callback function              */
    10,                                      /* total rows                     */
    50                                       /* open height                    */
};
GX_SLIDER_PROPERTIES window_slider_1_properties =
{
    10,                                      /* tickmark count                 */
    0,                                       /* mimimun value                  */
    100,                                     /* maximum value                  */
    50,                                      /* current value                  */
    10,                                      /* increment                      */
    0,                                       /* minimum travel                 */
    0,                                       /* maximum travel                 */
    5,                                       /* needle width                   */
    10,                                      /* needle height                  */
    5,                                       /* needle inset                   */
    2                                        /* needle hotspot                 */
};
GX_PIXELMAP_SLIDER_PROPERTIES window_pixelmap_slider_1_properties =
{
    0,                                       /* minimum value                  */
    100,                                     /* maximum value                  */
    70,                                      /* current value                  */
    10,                                      /* increment                      */
    0,                                       /* minimum travel                 */
    0,                                       /* maximum travel                 */
    5,                                       /* needle width                   */
    10,                                      /* needle height                  */
    0,                                       /* needle inset                   */
    8,                                       /* needle hotspot                 */
    GX_PIXELMAP_ID_PALETTE_RAW_ORANGEFILL_MIDDLE_HORIZONTAL, /* lower pixelmap id */
    GX_PIXELMAP_ID_RAW_PNG_COMPRESS_ALPHA_EMPTY_MIDDLD_H, /* upper pixelmap id */
    GX_PIXELMAP_ID_PALETTE_COMPRESS_I_IDICATOR_HORIZONTAL  /* needle pixelmap id */
};
GX_PROGRESS_BAR_INFO window_progress_bar_1_properties =
{
    0,                                       /* mimimun value                  */
    100,                                     /* maximum value                  */
    50,                                      /* current value                  */
    GX_FONT_ID_SYSTEM,                       /* font_id                        */
    GX_COLOR_ID_TEXT,                        /* normal text color              */
    GX_COLOR_ID_TEXT,                        /* selected text color            */
    GX_COLOR_ID_TEXT,                        /* disabled text color            */
    0                                        /* fill pixelmap                  */
};
GX_PIXELMAP_SLIDER_PROPERTIES window_pixelmap_slider_2_properties =
{
    0,                                       /* minimum value                  */
    100,                                     /* maximum value                  */
    50,                                      /* current value                  */
    10,                                      /* increment                      */
    0,                                       /* minimum travel                 */
    0,                                       /* maximum travel                 */
    5,                                       /* needle width                   */
    10,                                      /* needle height                  */
    0,                                       /* needle inset                   */
    6,                                       /* needle hotspot                 */
    GX_PIXELMAP_ID__4444ARGB_COMPRESS_ALPHA_ORANGEFILL_MIDDLE, /* lower pixelmap id */
    GX_PIXELMAP_ID_ALPHAMAP_RAW_EMPTYFILL_MIDDLE, /* upper pixelmap id         */
    GX_PIXELMAP_ID_PALETTE_COMPRESS_ALPHA_INDICATOR  /* needle pixelmap id     */
};
GX_SCROLLBAR_APPEARANCE  window_hscroll_1_properties =
{
    20,                                      /* scroll width                   */
    18,                                      /* thumb width                    */
    20,                                      /* thumb travel min               */
    20,                                      /* thumb travel max               */
    4,                                       /* thumb border style             */
    0,                                       /* scroll fill pixelmap           */
    0,                                       /* scroll thumb pixelmap          */
    0,                                       /* scroll up pixelmap             */
    0,                                       /* scroll down pixelmap           */
    GX_COLOR_ID_CANVAS,                      /* scroll thumb color             */
    GX_COLOR_ID_CANVAS,                      /* scroll thumb border color      */
    GX_COLOR_ID_SCROLL_BUTTON,               /* scroll button color            */
};
GX_SCROLLBAR_APPEARANCE  window_vertical_scroll_1_properties =
{
    20,                                      /* scroll width                   */
    18,                                      /* thumb width                    */
    20,                                      /* thumb travel min               */
    20,                                      /* thumb travel max               */
    4,                                       /* thumb border style             */
    0,                                       /* scroll fill pixelmap           */
    0,                                       /* scroll thumb pixelmap          */
    0,                                       /* scroll up pixelmap             */
    0,                                       /* scroll down pixelmap           */
    GX_COLOR_ID_CANVAS,                      /* scroll thumb color             */
    GX_COLOR_ID_CANVAS,                      /* scroll thumb border color      */
    GX_COLOR_ID_SCROLL_BUTTON,               /* scroll button color            */
};
GX_SPRITE_FRAME window_sprite_1_frame_list[2] =
{
    {
        GX_PIXELMAP_ID_FRAME_000,            /* pixelmap id                    */
        0,                                   /* x offset                       */
        0,                                   /* y offset                       */
        0,                                   /* frame delay                    */
        GX_SPRITE_BACKGROUND_NO_ACTION,      /* background operation           */
        255                                  /* alpha value                    */
    },
    {
        GX_PIXELMAP_ID_FRAME_001,            /* pixelmap id                    */
        0,                                   /* x offset                       */
        0,                                   /* y offset                       */
        5,                                   /* frame delay                    */
        GX_SPRITE_BACKGROUND_NO_ACTION,      /* background operation           */
        200                                  /* alpha value                    */
    }
};

GX_SPRITE_PROPERTIES window_sprite_1_properties =
{
    window_sprite_1_frame_list,              /* address of frame list          */
    2,                                       /* frame count                    */
};
GX_CIRCULAR_GAUGE_PROPERTIES window_gauge_1_properties =
{
    0,                                       /* start angle                    */
    30,                                      /* animation steps                */
    1,                                       /* animation delay                */
    137,                                     /* needle xpos                    */
    100,                                     /* needle yos                     */
    15,                                      /* needle xcor                    */
    37,                                      /* needle ycor                    */
    GX_PIXELMAP_ID__565RGB_COMPRESSED_ALPHA_GAUGE, /* normal pixelmap id       */
    0,                                       /* selected pixelmap id           */
    GX_PIXELMAP_ID__565RGB_ALPHA_NEEDLE      /* needle pixelmap id             */
};
GX_PROMPT_PROPERTIES window_prompt_4_properties =
{
    GX_STRING_ID_STRING_13,                  /* string id                      */
    GX_FONT_ID_PROMPT,                       /* font id                        */
    GX_COLOR_ID_TEXT,                        /* normal text color              */
    GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
    GX_COLOR_ID_TEXT                         /* disabled text color            */
};
GX_PROMPT_PROPERTIES window_prompt_5_properties =
{
    GX_STRING_ID_STRING_14,                  /* string id                      */
    GX_FONT_ID_PROMPT,                       /* font id                        */
    GX_COLOR_ID_TEXT,                        /* normal text color              */
    GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
    GX_COLOR_ID_TEXT                         /* disabled text color            */
};
GX_RADIO_BUTTON_PROPERTIES window_radio_button_2_properties =
{
    GX_STRING_ID_STRING_3,                   /* string id                      */
    GX_FONT_ID_BUTTON,                       /* font id                        */
    GX_COLOR_ID_BTN_TEXT,                    /* normal text color              */
    GX_COLOR_ID_BTN_TEXT,                    /* selected text color            */
    GX_COLOR_ID_BTN_TEXT,                    /* disabled text color            */
    0,                                       /* off pixelmap id                */
    0,                                       /* on pixelmap id                 */
    0,                                       /* off disabled pixelmap id       */
    0                                        /* on disabled pixelmap id        */
};
GX_CHECKBOX_PROPERTIES window_checkbox_2_properties =
{
    GX_STRING_ID_STRING_12,                  /* string id                      */
    GX_FONT_ID_BUTTON,                       /* font id                        */
    GX_COLOR_ID_BTN_TEXT,                    /* normal text color              */
    GX_COLOR_ID_BTN_TEXT,                    /* selected text color            */
    GX_COLOR_ID_BTN_TEXT,                    /* disabled text color            */
    0,                                       /* unchecked pixelmap id          */
    0,                                       /* checked pixelmap id            */
    0,                                       /* unchecked disabled pixelmap id */
    0                                        /* checked disabled pixelmap id   */
};

GX_CONST GX_STUDIO_WIDGET window_button_4_define =
{
    "button_4",
    GX_TYPE_BUTTON,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_BUTTON),                       /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_button_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {432, 273, 598, 296},                    /* widget size                    */
    GX_NULL,                                 /* no next widget                 */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) GX_NULL                         /* no extended properties         */
};

GX_CONST GX_STUDIO_WIDGET window_button_3_define =
{
    "button_3",
    GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_TEXT_BUTTON),                  /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_text_button_create,            /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {432, 249, 598, 272},                    /* widget size                    */
    &window_button_4_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_button_3_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_icon_2_define =
{
    "icon_2",
    GX_TYPE_ICON,                            /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_ICON),                         /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_icon_create,                   /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {482, 317, 519, 369},                    /* widget size                    */
    GX_NULL,                                 /* no next widget                 */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_icon_2_properties       /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_prompt_3_define =
{
    "prompt_3",
    GX_TYPE_PROMPT,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_PROMPT),                       /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_prompt_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {452, 317, 481, 369},                    /* widget size                    */
    &window_icon_2_define,                   /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_prompt_3_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_button_5_define =
{
    "button_5",
    GX_TYPE_BUTTON,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_BUTTON),                       /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_button_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {430, 317, 451, 369},                    /* widget size                    */
    &window_prompt_3_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) GX_NULL                         /* no extended properties         */
};

GX_CONST GX_STUDIO_WIDGET window_checkbox_2_define =
{
    "checkbox_2",
    GX_TYPE_CHECKBOX,                        /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_BUTTON_PUSHED|GX_STYLE_BUTTON_TOGGLE|GX_STYLE_TEXT_LEFT,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_CHECKBOX),                     /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_checkbox_create,               /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {319, 416, 422, 439},                    /* widget size                    */
    GX_NULL,                                 /* no next widget                 */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_checkbox_2_properties   /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_radio_button_2_define =
{
    "radio_button_2",
    GX_TYPE_RADIO_BUTTON,                    /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_BUTTON_RADIO|GX_STYLE_TEXT_LEFT,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_RADIO_BUTTON),                 /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_radio_button_create,           /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {514, 19, 593, 42},                      /* widget size                    */
    &window_checkbox_2_define,               /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_radio_button_2_properties /* extended properties          */
};

GX_CONST GX_STUDIO_WIDGET window_prompt_5_define =
{
    "prompt_5",
    GX_TYPE_PROMPT,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_PROMPT),                       /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_prompt_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {631, 161, 710, 184},                    /* widget size                    */
    &window_radio_button_2_define,           /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_prompt_5_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_prompt_4_define =
{
    "prompt_4",
    GX_TYPE_PROMPT,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_PROMPT),                       /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_prompt_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {442, 377, 521, 400},                    /* widget size                    */
    &window_prompt_5_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_prompt_4_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_gauge_1_define =
{
    "gauge_1",
    GX_TYPE_CIRCULAR_GAUGE,                  /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_CIRCULAR_GAUGE),               /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_circular_gauge_create,         /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {541, 261, 820, 540},                    /* widget size                    */
    &window_prompt_4_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_gauge_1_properties      /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_sprite_1_define =
{
    "sprite_1",
    GX_TYPE_SPRITE,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_SPRITE),                       /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_sprite_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {642, 189, 705, 252},                    /* widget size                    */
    &window_gauge_1_define,                  /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_sprite_1_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_vertical_scroll_1_define =
{
    "vertical_scroll_1",
    GX_TYPE_VERTICAL_SCROLL,                 /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_SCROLLBAR_RELATIVE_THUMB|GX_SCROLLBAR_END_BUTTONS|GX_SCROLLBAR_VERTICAL,   /* style flags */
    0,                                       /* status flags                   */
    sizeof(GX_SCROLLBAR),                    /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_vertical_scrollbar_create,     /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {771, 10, 790, 449},                     /* widget size                    */
    &window_sprite_1_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_vertical_scroll_1_properties /* extended properties       */
};

GX_CONST GX_STUDIO_WIDGET window_hscroll_1_define =
{
    "hscroll_1",
    GX_TYPE_HORIZONTAL_SCROLL,               /* widget type                    */
    ID_HSCROLL,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_SCROLLBAR_RELATIVE_THUMB|GX_SCROLLBAR_END_BUTTONS|GX_SCROLLBAR_HORIZONTAL,   /* style flags */
    0,                                       /* status flags                   */
    sizeof(GX_SCROLLBAR),                    /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_horizontal_scrollbar_create,     /* create function              */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {11, 450, 770, 469},                     /* widget size                    */
    &window_vertical_scroll_1_define,        /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_hscroll_1_properties    /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_pixelmap_slider_2_define =
{
    "pixelmap_slider_2",
    GX_TYPE_PIXELMAP_SLIDER,                 /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_SLIDER_VERTICAL|GX_STYLE_TILE_BACKGROUND,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_PIXELMAP_SLIDER),              /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_WIDGET_FILL,                 /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_pixelmap_slider_create,        /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {729, 28, 763, 153},                     /* widget size                    */
    &window_hscroll_1_define,                /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_pixelmap_slider_2_properties /* extended properties       */
};

GX_CONST GX_STUDIO_WIDGET window_progress_bar_1_define =
{
    "progress_bar_1",
    GX_TYPE_PROGRESS_BAR,                    /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_PROGRESS_PERCENT|GX_STYLE_PROGRESS_TEXT_DRAW,   /* style flags */
    0,                                       /* status flags                   */
    sizeof(GX_PROGRESS_BAR),                 /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_progress_bar_create,           /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {617, 108, 696, 131},                    /* widget size                    */
    &window_pixelmap_slider_2_define,        /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_progress_bar_1_properties /* extended properties          */
};

GX_CONST GX_STUDIO_WIDGET window_pixelmap_slider_1_define =
{
    "pixelmap_slider_1",
    GX_TYPE_PIXELMAP_SLIDER,                 /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TILE_BACKGROUND,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_PIXELMAP_SLIDER),              /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_WIDGET_FILL,                 /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_pixelmap_slider_create,        /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {617, 58, 706, 92},                      /* widget size                    */
    &window_progress_bar_1_define,           /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_pixelmap_slider_1_properties /* extended properties       */
};

GX_CONST GX_STUDIO_WIDGET window_slider_1_define =
{
    "slider_1",
    GX_TYPE_SLIDER,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_SHOW_NEEDLE,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_SLIDER),                       /* control block size             */
    GX_COLOR_ID_BTN_UPPER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_UPPER,                   /* disabled color id              */
    gx_studio_slider_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {619, 25, 698, 48},                      /* widget size                    */
    &window_pixelmap_slider_1_define,        /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_slider_1_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_drop_list_1_define =
{
    "drop_list_1",
    GX_TYPE_DROP_LIST,                       /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags      */
    0,                                       /* status flags                   */
    sizeof(GX_DROP_LIST),                    /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_WIDGET_FILL,                 /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_drop_list_create,              /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {434, 400, 534, 423},                    /* widget size                    */
    &window_slider_1_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_drop_list_1_properties  /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_horizontal_list_1_define =
{
    "horizontal_list_1",
    GX_TYPE_HORIZONTAL_LIST,                 /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags      */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_HORIZONTAL_LIST),              /* control block size             */
    GX_COLOR_ID_WINDOW_FILL,                 /* normal color id                */
    GX_COLOR_ID_WINDOW_FILL,                 /* selected color id              */
    GX_COLOR_ID_WINDOW_FILL,                 /* disabled color id              */
    gx_studio_horizontal_list_create,        /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {429, 316, 555, 370},                    /* widget size                    */
    &window_drop_list_1_define,              /* next widget definition         */
    &window_button_5_define,                 /* child widget definition        */
    0,                                       /* runtime control block          */
    (void *) &window_horizontal_list_1_properties /* extended properties       */
};

GX_CONST GX_STUDIO_WIDGET window_vertical_list_1_define =
{
    "vertical_list_1",
    GX_TYPE_VERTICAL_LIST,                   /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags      */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_VERTICAL_LIST),                /* control block size             */
    GX_COLOR_ID_WINDOW_FILL,                 /* normal color id                */
    GX_COLOR_ID_WINDOW_FILL,                 /* selected color id              */
    GX_COLOR_ID_WINDOW_FILL,                 /* disabled color id              */
    gx_studio_vertical_list_create,          /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {431, 248, 599, 304},                    /* widget size                    */
    &window_horizontal_list_1_define,        /* next widget definition         */
    &window_button_3_define,                 /* child widget definition        */
    0,                                       /* runtime control block          */
    (void *) &window_vertical_list_1_properties /* extended properties         */
};

GX_CONST GX_STUDIO_WIDGET window_icon_button_1_define =
{
    "icon_button_1",
    GX_TYPE_ICON_BUTTON,                     /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_HALIGN_CENTER|GX_STYLE_VALIGN_CENTER,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_ICON_BUTTON),                  /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_icon_button_create,            /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {723, 193, 754, 224},                    /* widget size                    */
    &window_vertical_list_1_define,          /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_icon_button_1_properties /* extended properties           */
};

GX_CONST GX_STUDIO_WIDGET window_checkbox_1_define =
{
    "checkbox_1",
    GX_TYPE_CHECKBOX,                        /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_BUTTON_TOGGLE|GX_STYLE_TEXT_LEFT,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_CHECKBOX),                     /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_checkbox_create,               /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {319, 388, 429, 411},                    /* widget size                    */
    &window_icon_button_1_define,            /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_checkbox_1_properties   /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_multi_line_button_1_define =
{
    "multi_line_button_1",
    GX_TYPE_MULTI_LINE_TEXT_BUTTON,          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_MULTI_LINE_TEXT_BUTTON),       /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_WINDOW_FILL,                 /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_multi_line_text_button_create,     /* create function            */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {321, 312, 400, 375},                    /* widget size                    */
    &window_checkbox_1_define,               /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_multi_line_button_1_properties /* extended properties     */
};

GX_CONST GX_STUDIO_WIDGET window_button_2_define =
{
    "button_2",
    GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_TEXT_BUTTON),                  /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_text_button_create,            /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {320, 280, 399, 303},                    /* widget size                    */
    &window_multi_line_button_1_define,      /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_button_2_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_button_1_define =
{
    "button_1",
    GX_TYPE_BUTTON,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_BUTTON),                       /* control block size             */
    GX_COLOR_ID_BTN_UPPER,                   /* normal color id                */
    GX_COLOR_ID_WINDOW_BORDER,               /* selected color id              */
    GX_COLOR_ID_BTN_UPPER,                   /* disabled color id              */
    gx_studio_button_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {319, 249, 398, 272},                    /* widget size                    */
    &window_button_2_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) GX_NULL                         /* no extended properties         */
};

GX_CONST GX_STUDIO_WIDGET window_text_input_2_define =
{
    "text_input_2",
    GX_TYPE_MULTI_LINE_TEXT_INPUT,           /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_LEFT,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_MULTI_LINE_TEXT_INPUT),        /* control block size             */
    GX_COLOR_ID_WINDOW_BORDER,               /* normal color id                */
    GX_COLOR_ID_WINDOW_BORDER,               /* selected color id              */
    GX_COLOR_ID_WINDOW_BORDER,               /* disabled color id              */
    gx_studio_multi_line_text_input_create,     /* create function             */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {515, 155, 606, 236},                    /* widget size                    */
    &window_button_1_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_text_input_2_properties /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_text_view_1_define =
{
    "text_view_1",
    GX_TYPE_MULTI_LINE_TEXT_VIEW,            /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_LEFT,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_MULTI_LINE_TEXT_VIEW),         /* control block size             */
    GX_COLOR_ID_BTN_BORDER,                  /* normal color id                */
    GX_COLOR_ID_BTN_BORDER,                  /* selected color id              */
    GX_COLOR_ID_BTN_BORDER,                  /* disabled color id              */
    gx_studio_multi_line_text_view_create,     /* create function              */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {515, 77, 601, 148},                     /* widget size                    */
    &window_text_input_2_define,             /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_text_view_1_properties  /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_text_input_1_define =
{
    "text_input_1",
    GX_TYPE_SINGLE_LINE_TEXT_INPUT,          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_LEFT,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_SINGLE_LINE_TEXT_INPUT),       /* control block size             */
    GX_COLOR_ID_SELECTED_FILL,               /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_SELECTED_FILL,               /* disabled color id              */
    gx_studio_text_input_create,             /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {321, 220, 460, 243},                    /* widget size                    */
    &window_text_view_1_define,              /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_text_input_1_properties /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_prompt_2_define =
{
    "prompt_2",
    GX_TYPE_PROMPT,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_PROMPT),                       /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_prompt_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {319, 180, 462, 213},                    /* widget size                    */
    &window_text_input_1_define,             /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_prompt_2_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_prompt_1_define =
{
    "prompt_1",
    GX_TYPE_PIXELMAP_PROMPT,                 /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_PIXELMAP_PROMPT),              /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_pixelmap_prompt_create,        /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {319, 20, 498, 168},                     /* widget size                    */
    &window_prompt_2_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_prompt_1_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_radio_button_1_define =
{
    "radio_button_1",
    GX_TYPE_RADIO_BUTTON,                    /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_BUTTON_PUSHED|GX_STYLE_BUTTON_RADIO|GX_STYLE_TEXT_LEFT,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_RADIO_BUTTON),                 /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_radio_button_create,           /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {514, 47, 602, 65},                      /* widget size                    */
    &window_prompt_1_define,                 /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_radio_button_1_properties /* extended properties          */
};

GX_CONST GX_STUDIO_WIDGET window_icon_1_define =
{
    "icon_1",
    GX_TYPE_ICON,                            /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_ICON),                         /* control block size             */
    GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
    GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
    GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
    gx_studio_icon_create,                   /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {24, 162, 218, 428},                     /* widget size                    */
    &window_radio_button_1_define,           /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_icon_1_properties       /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_pixelmap_button_1_define =
{
    "pixelmap_button_1",
    GX_TYPE_PIXELMAP_BUTTON,                 /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_PIXELMAP_BUTTON),              /* control block size             */
    GX_COLOR_ID_BTN_LOWER,                   /* normal color id                */
    GX_COLOR_ID_BTN_UPPER,                   /* selected color id              */
    GX_COLOR_ID_BTN_LOWER,                   /* disabled color id              */
    gx_studio_pixelmap_button_create,        /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {25, 30, 170, 107},                      /* widget size                    */
    &window_icon_1_define,                   /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_pixelmap_button_1_properties /* extended properties       */
};

GX_CONST GX_STUDIO_WIDGET window_window_1_define =
{
    "window_1",
    GX_TYPE_WINDOW,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THIN|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags      */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(GX_WINDOW),                       /* control block size             */
    GX_COLOR_ID_WINDOW_FILL,                 /* normal color id                */
    GX_COLOR_ID_WINDOW_FILL,                 /* selected color id              */
    GX_COLOR_ID_WINDOW_FILL,                 /* disabled color id              */
    gx_studio_window_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {14, 21, 311, 435},                      /* widget size                    */
    &window_pixelmap_button_1_define,        /* next widget definition         */
    GX_NULL,                                 /* no child widgets               */ 
    0,                                       /* runtime control block          */
    (void *) &window_window_1_properties     /* extended properties            */
};

GX_CONST GX_STUDIO_WIDGET window_define =
{
    "window",
    GX_TYPE_WINDOW,                          /* widget type                    */
    GX_ID_NONE,                              /* widget id                      */
    #if defined(GX_WIDGET_USER_DATA)
    0,                                       /* user data                      */
    #endif
    GX_STYLE_BORDER_THICK|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags     */
    GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
    sizeof(WINDOW_CONTROL_BLOCK),            /* control block size             */
    GX_COLOR_ID_SCROLL_FILL,                 /* normal color id                */
    GX_COLOR_ID_SCROLL_FILL,                 /* selected color id              */
    GX_COLOR_ID_SCROLL_FILL,                 /* disabled color id              */
    gx_studio_window_create,                 /* create function                */
    GX_NULL,                                 /* drawing function override      */
    GX_NULL,                                 /* event function override        */
    {6, 5, 795, 474},                        /* widget size                    */
    GX_NULL,                                 /* next widget                    */
    &window_window_1_define,                 /* child widget                   */
    0,                                       /* control block                  */
    (void *) &window_properties              /* extended properties            */
};
GX_CONST GX_STUDIO_WIDGET_ENTRY runtime_allocate_16bpp_widget_table[] =
{
    { &window_define, GX_NULL },
    {GX_NULL, GX_NULL}
};

static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
{
    UINT status = GX_SUCCESS;
    GX_WIDGET *widget = GX_NULL;
    GX_VALUE   list_count = 0;
    GX_VALUE   list_total_count = 0;

    if(parent && (parent->gx_widget_type == GX_TYPE_MENU))
    {
        list_total_count = ((GX_MENU *)parent)->gx_menu_list_total_count;
    }

    while(definition && status == GX_SUCCESS)
    {
        if (definition->create_function)
        {
            if (definition->style & GX_STYLE_DYNAMICALLY_ALLOCATED)
            {
                status = gx_widget_allocate(&widget, definition->control_block_size);
                if (status != GX_SUCCESS)
                {
                    return GX_NULL;
                }
            }
            else
            {
                if (control == GX_NULL)
                {
                    return GX_NULL;
                }
                widget = (GX_WIDGET *) (control + definition->control_block_offset);
            }

            status = definition->create_function(definition, widget, parent);

            if(list_count < list_total_count)
            {
                gx_menu_insert((GX_MENU *)parent, widget);
                ((GX_MENU *)parent)->gx_menu_list_total_count--;
                list_count++;
            }

            if (status == GX_SUCCESS)
            {
                if (definition->widget_type != GX_TYPE_TEMPLATE)
                {
#if defined(GUIX_5_4_0_COMPATIBILITY)
                    gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id);
#else
                    gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id, definition->disabled_fill_color_id);
#endif
                }

                if (!(definition->status & GX_STATUS_ACCEPTS_FOCUS))
                {
                    gx_widget_status_remove(widget, GX_STATUS_ACCEPTS_FOCUS);
                }

                if (definition->draw_function)
                {
                    gx_widget_draw_set(widget, definition->draw_function);
                }
                if (definition->event_function)
                {
                    gx_widget_event_process_set(widget, definition->event_function);
                }

                #if defined(GX_WIDGET_USER_DATA)
                widget->gx_widget_user_data = definition->user_data;
                #endif

                if (definition->child_widget)
                {
                    gx_studio_nested_widget_create(control, definition->child_widget, widget);
                }
            }
            definition = definition->next_widget;
        }
    }
    return widget;
}

GX_WIDGET *gx_studio_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
{
    GX_WIDGET *widget;
    widget = gx_studio_nested_widget_create(control, definition, GX_NULL);

    if (parent && widget)
    {
        gx_widget_attach(parent, widget);
    }
    return widget;
}

UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget)
{
    UINT status = GX_FAILURE;
    GX_CONST GX_STUDIO_WIDGET_ENTRY *entry = runtime_allocate_16bpp_widget_table;
    GX_WIDGET *widget = GX_NULL;

    while(entry->widget_information)
    {
        if (!strcmp(name, entry->widget_information->widget_name))
        {
            widget = gx_studio_widget_create((GX_BYTE *) entry->widget, entry->widget_information, parent);
            if (widget)
            {
                status = GX_SUCCESS;
            }
            break;
        }
        entry++;
    }

    if (new_widget)
    {
        *new_widget = widget;
    }
    return status;
}


UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *),
    GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root)
{
    GX_CONST GX_THEME *theme_ptr;
    GX_RECTANGLE size;

    GX_STUDIO_DISPLAY_INFO *display_info = &runtime_allocate_16bpp_display_table[display];


/* create the requested display                                                */

    gx_display_create(display_info->display,
                      display_info->name,
                      driver,
                      (GX_VALUE) display_info->x_resolution,
                      (GX_VALUE) display_info->y_resolution);


/* install the request theme                                                   */

    if(display_info->theme_table)
    {
        theme_ptr = display_info->theme_table[theme];
        if(theme_ptr)
        {
            gx_display_color_table_set(display_info->display, theme_ptr->theme_color_table, theme_ptr->theme_color_table_size);
            
/* install the color palette if required                                       */
            if (display_info->display->gx_display_driver_palette_set &&
                theme_ptr->theme_palette != NULL)
            {
                display_info->display->gx_display_driver_palette_set(display_info->display, theme_ptr->theme_palette, theme_ptr->theme_palette_size);
            }

            gx_display_font_table_set(display_info->display, theme_ptr->theme_font_table, theme_ptr->theme_font_table_size);
            gx_display_pixelmap_table_set(display_info->display, theme_ptr->theme_pixelmap_table, theme_ptr->theme_pixelmap_table_size);
            gx_system_scroll_appearance_set(theme_ptr->theme_vertical_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_vertical_scrollbar_appearance);
            gx_system_scroll_appearance_set(theme_ptr->theme_horizontal_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_horizontal_scrollbar_appearance);
        }
    }

/* Install the language table.                                                 */

    if(display_info->language_table)
    {
        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);
        gx_display_active_language_set(display_info->display, language);
    }

/* Set screen rotation angle.                                                  */

    display_info->display->gx_display_rotation_angle = display_info->rotation_angle;

/* create the canvas for this display                                          */

    gx_canvas_create(display_info->canvas,
                     display_info->canvas_name,
                     display_info->display,
                     GX_CANVAS_MANAGED | GX_CANVAS_VISIBLE,
                     display_info->x_resolution,
                     display_info->y_resolution,
                     display_info->canvas_memory,
                     display_info->canvas_memory_size);

/* Create the root window for this canvas                                      */

    gx_utility_rectangle_define(&size,
                                0, 0,
                                (GX_VALUE) (display_info->x_resolution - 1),
                                (GX_VALUE) (display_info->y_resolution - 1));

    gx_window_root_create(display_info->root_window,
                          display_info->name,
                          display_info->canvas, GX_STYLE_NONE, 0, &size);
    if (return_root)
    {
        *return_root = display_info->root_window;
    }
    return GX_SUCCESS;
}
#undef GUIX_STUDIO_GENERATED_FILE
