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9,9,9,9,9,9,9,8,8,9,9,9,9,9,1,8,9,9,8,9,8,9,1 }; void func_1 (void) { Ihandle *_item_1, *_item_2, *mnu, *_bt_1, *_bt_2, *_tg_1, *_frm_1, *_text_1, *_ml_1, *_vbox_1, *_list_1, *_list_2, *_hbox_1, *_cnv_1, *_vbox_2, *dlg, *img; img = IupImage(32,32, img_bits); IupSetHandle ("img", img); IupSetAttribute (img, "0", "0 0 0"); IupSetAttribute (img, "1", "192 192 192"); IupSetAttribute (img, "2", "128 128 0"); IupSetAttribute (img, "1", "128 0 0"); IupSetAttribute (img, "2", "0 128 0"); IupSetAttribute (img, "3", "128 128 0"); IupSetAttribute (img, "4", "0 0 128"); IupSetAttribute (img, "5", "128 0 128"); IupSetAttribute (img, "6", "0 128 128"); IupSetAttribute (img, "7", "192 192 192"); IupSetAttribute (img, "8", "128 128 128"); IupSetAttribute (img, "9", "255 0 0"); IupSetAttribute (img, "10", "0 255 0"); IupSetAttribute (img, "11", "255 255 0"); IupSetAttribute (img, "12", "0 0 255"); IupSetAttribute (img, "13", "255 0 255"); IupSetAttribute (img, "14", "0 255 255"); IupSetAttribute (img, "15", "255 255 255"); _item_1 = IupItem( "Item-1 Checked", "do_nothing" ); IupSetAttribute(_item_1,IUP_VALUE,"ON"); IupSetHandle("_item_1",_item_1); _item_2 = IupItem( "Item-2 Disabled", "do_nothing" ); IupSetAttribute(_item_2,IUP_ACTIVE,"NO"); IupSetHandle("_item_2",_item_2); mnu = IupMenu( IupSubmenu("SubMenu-1",IupMenu( _item_1, IupSeparator( ), IupItem( "Item-2", "do_nothing" ),NULL)), IupItem( "Item-1", "do_nothing" ), _item_2,NULL); IupSetHandle("mnu",mnu); _bt_1 = IupButton( "", "do_nothing" ); IupSetAttribute(_bt_1,IUP_IMAGE,"img"); IupSetHandle("_bt_1",_bt_1); _bt_2 = IupButton( "Button3 Disabled", "do_nothing" ); IupSetAttribute(_bt_2,IUP_ACTIVE,"NO"); IupSetHandle("_bt_2",_bt_2); _tg_1 = IupToggle( "Toggle", "do_nothing" ); IupSetAttribute(_tg_1,IUP_VALUE,"ON"); IupSetHandle("_tg_1",_tg_1); _frm_1 = IupFrame( IupVbox( _tg_1, IupRadio( IupVbox( IupToggle( "Toggle1 in Radio", "do_nothing" ), IupToggle( "Toggle2 in Radio", "do_nothing" ),NULL)),NULL)); IupSetAttribute(_frm_1,IUP_TITLE,"Frame"); IupSetHandle("_frm_1",_frm_1); _text_1 = IupText( "do_nothing" ); IupSetAttribute(_text_1,IUP_VALUE,"Text"); IupSetAttribute(_text_1,IUP_SIZE,"60x"); IupSetHandle("_text_1",_text_1); _ml_1 = IupMultiLine( "do_nothing" ); IupSetAttribute(_ml_1,IUP_VALUE,"Multiline"); IupSetAttribute(_ml_1,IUP_EXPAND,"YES"); IupSetAttribute(_ml_1,IUP_SIZE,"30x60"); IupSetHandle("_ml_1",_ml_1); _vbox_1 = IupVbox( IupLabel( "Label" ), _text_1, _ml_1,NULL); IupSetAttribute(_vbox_1,IUP_ALIGNMENT,"ALEFT"); IupSetHandle("_vbox_1",_vbox_1); _list_1 = IupList( "do_nothing" ); IupSetAttribute(_list_1,"3","List-3"); IupSetAttribute(_list_1,IUP_EXPAND,"YES"); IupSetAttribute(_list_1,IUP_VALUE,"2"); IupSetAttribute(_list_1,"1","List-1"); IupSetAttribute(_list_1,"2","List-2"); IupSetHandle("_list_1",_list_1); _list_2 = IupList( "do_nothing" ); IupSetAttribute(_list_2,"3","Drop List-3"); IupSetAttribute(_list_2,IUP_DROPDOWN,"YES"); IupSetAttribute(_list_2,IUP_EXPAND,"YES"); IupSetAttribute(_list_2,IUP_VALUE,"2"); IupSetAttribute(_list_2,"1","Drop List-1"); IupSetAttribute(_list_2,"2","Drop List-2"); IupSetHandle("_list_2",_list_2); _hbox_1 = IupHbox( _frm_1, _vbox_1, IupVbox( _list_1, _list_2,NULL),NULL); IupSetAttribute(_hbox_1,IUP_ALIGNMENT,"ATOP"); IupSetHandle("_hbox_1",_hbox_1); _cnv_1 = IupCanvas( "do_nothing" ); IupSetAttribute(_cnv_1,IUP_POSX,"0.0"); IupSetAttribute(_cnv_1,IUP_POSY,"0.0"); IupSetAttribute(_cnv_1,IUP_BGCOLOR,"128 255 0"); IupSetHandle("_cnv_1",_cnv_1); _vbox_2 = IupVbox( IupHbox( IupButton( "Button1", "do_nothing" ), _bt_1, _bt_2,NULL), _hbox_1, _cnv_1,NULL); IupSetAttribute(_vbox_2,IUP_MARGIN,"5x5"); IupSetAttribute(_vbox_2,IUP_ALIGNMENT,"ARIGHT"); IupSetAttribute(_vbox_2,IUP_GAP,"5"); IupSetHandle("_vbox_2",_vbox_2); dlg = IupDialog(_vbox_2); IupSetAttribute(dlg,IUP_MENU,"mnu"); IupSetAttribute(dlg,IUP_SIZE,"270x150"); IupSetAttribute(dlg,IUP_TITLE,"Dialog"); IupSetHandle("dlg",dlg); }