hello_world.uil
来自「安装DDD之前」· UIL 代码 · 共 91 行
UIL
91 行
/* Written by Dave Brennan. * Copyright 1994, O'Reilly & Associates, Inc. * Permission to use, copy, and modify this program without * restriction is hereby granted, as long as this copyright * notice appears in each copy of the program source code. * This program is freely distributable without licensing fees and * is provided without guarantee or warrantee expressed or implied. * This program is -not- in the public domain. *//* hello_world.uil -- Illustrate basic UIL programming concepts */ module hello_world objects = { XmPushButton = gadget; } value form_margin : 3; ! Value for all-around form margins.object hello_main : XmForm { controls { XmLabel world; XmPushButton hello; }; arguments { XmNshadowThickness = 0; XmNresizePolicy = XmRESIZE_GROW; XmNmarginHeight = form_margin; XmNmarginWidth = form_margin; };};value hello_string : "Hello, World!"; hello_font : font ('-adobe-helvetica-medium-r-normal-*-*-140-*'); world_colors : color_table (background color = '*', foreground color = ' '); world_icon : icon (color_table = world_colors, ' ****** ', ' ** *** ** ', ' *** ** * * ', ' **** *** * ', ' * ********* ** ', '* ****** *** ***', '* ********* **', '* ********* **', '* ******** **', '* **** * *', '* ** * *', ' * ** * ', ' * ***** * ', ' * ******* * ', ' ********** ', ' ****** ' );procedure quit (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; XmNrightAttachment = XmATTACH_FORM; }; callbacks { XmNactivateCallback = procedure quit ("Goodbye!"); };}; end module;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?