/* hello_world.uil -- Illustrate basic UIL programming concepts */ /* Convert to a UIDi, then run mrm.bac: uil hello_world.uil -o hello_world.uid */ module hello_world objects = { XmPushButton = gadget; } object main : XmForm { controls { XmLabel world; XmPushButton hello; XmPushButton bye; }; arguments { XmNshadowThickness = 0; XmNresizePolicy = XmRESIZE_GROW; }; }; value hello_string : "Hello, World!"; hello_font : font ('-adobe-helvetica-medium-r-*-*-*-140-*'); world_icon : icon ( ' ****** ', ' ** *** ** ', ' *** ** * * ', ' **** *** * ', ' * ********* ** ', '* ****** *** ***', '* ********* **', '* ********* **', '* ******** **', '* **** * *', '* ** * *', ' * ** * ', ' * ***** * ', ' * ******* * ', ' ********** ', ' ****** ' ); procedure quit(string); demo(string); object world : XmLabel { arguments { XmNlabelType = XmPIXMAP; XmNlabelPixmap = world_icon; ! Form constraint resources XmNleftAttachment = XmATTACH_FORM; XmNtopAttachment = XmATTACH_FORM; XmNbottomAttachment = XmATTACH_FORM; }; } ; object hello : XmPushButton { arguments { XmNlabelString = hello_string; XmNfontList = hello_font; XmNmarginHeight = 2; XmNmarginWidth = 3; ! Form constraint resources XmNleftAttachment = XmATTACH_WIDGET; XmNleftWidget = world; XmNtopAttachment = XmATTACH_FORM; XmNbottomAttachment = XmATTACH_FORM; }; callbacks { XmNactivateCallback = procedure quit("my_button"); }; }; object bye : XmPushButton { arguments { XmNlabelString = "Bye World"; XmNfontList = hello_font; XmNmarginHeight = 2; XmNmarginWidth = 3; ! Form constraint resources XmNleftAttachment = XmATTACH_WIDGET; XmNleftWidget = hello; XmNtopAttachment = XmATTACH_FORM; XmNbottomAttachment = XmATTACH_FORM; XmNrightAttachment = XmATTACH_FORM; }; callbacks { XmNactivateCallback = procedure demo("bye_button"); }; }; end module;