Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu From: cloos@acsu.buffalo.edu (James H. Cloos) Newsgroups: comp.sys.handhelds Subject: Re: Putting GROB's into the menu keys Message-ID: <68657@eerie.acsu.Buffalo.EDU> Date: 3 Apr 91 21:01:00 GMT References: <9393@mentor.cc.purdue.edu> Sender: news@acsu.Buffalo.EDU Organization: State University of New York @ Buffalo Lines: 77 Nntp-Posting-Host: lictor.acsu.buffalo.edu In article <9393@mentor.cc.purdue.edu> ahernsd@mentor.cc.purdue.edu (Dynastar) writes: >I heard on this newsgroup that it is possible to create >an appropriatly sized GROB and place it into the CST >variable to create incredibly customized menu keys. > >Well, when I read this, I had just gotten my 48sx, so >I had little or no idea what the post was talking about. > >Now that I have a need of such a function (I want to put >gradient of g on a key. upside-down delta - g ), I wish >that I had saved the posting. > >Can anyone provide insight about this? > >Thanks for the help! > [I'll attempt to make a tutorial out of this: it can be edited and added to the FAQ when it--eventually--gets put together.] To begin with, familiarize yourself with the sections of chaper 15 of the Owner's Manual that deal with custom menus. Note that a string can be used to lable the key. For the purposes of the GROB discussion, lets define an example. the list { { "123" { 1 2 3 } } FRED { "WIL" a b c } } creates a menu with the lables [123], [FRED], and [WIL]. Hitting [123] puts a 1 on the stack, left-shift-[123] puts a 2, and right-shift[123] puts a 3 on the stack. [FRED] executes the ID (aka global name) 'FRED', (remember that undefined ID's just push themselves onto the stack), left-shift [FRED] will try to STO level1 into 'FRED', and right-shift [FRED] will try to RCL 'FRED's contents. Similarly, [WIL] will evaluate the ID 'a', left-[WIL] will STO into ID 'a', and right-[WIL] will RCL ID 'a'. Note that 'b' and 'c' are ignored. I find the distinction between the formats of [123] and [WIL] to be a common stumbling block. (Ie, the syntax of [WIL]'s entry is used when the syntax (& functionality) of [123]'s entry is desired.) Above, we used strings and ID's to lable the key. A LAM (lambda or local name) can also be used, as can a GROB. To work, the GROB must be have dimentions 21x8. Anything else is rejected. As an example, lets make a lable that is more informative than [123] above, but with the same functionality (ie unshifted is 1, left shifted is 2, and right shifted is 3). The GROB below: GROB 21 8 FFFFF13FFF91DE7F717F3F91BF7F711E7F91FF3EF1FFFFF1 which looks like: ##################### ## ############# ## # ## ###### ####### # ### ###### ##### ## ## ######## ####### # # ###### ##### ## ########## ######## ##################### gives a better picture (pardon the pun) of what the key does. So if you were to use the following as your argument to MENU or TMENU: { { GROB 21 8 FFFFF13FFF91DE7F717F3F91BF7F711E7F91FF3EF1FFFFF1 { 1 2 3 } } FRED { "WIL" a b c } } you would have the above GROB (I'll call it [213]) in position a, [FRED] in b, and [WIL] in c, working just like the [123][FRED][WIL] menu did. Notice that to have menu lables that are the same size as the built-in ones, the top row of pixels in the 21x8 GROB should be left blank, unlike what I did above. However, if all of your menus are icons, you might as well use all 8 pixel-rows. (Also note that in internal menus, the lable object can be anything that returns a string, GROB, ID, or LAM to the stack; this is how those boxes are included in the keys and toggled upon keypresses.) I hope this has been helpful. -JimC -- James H. Cloos, Jr. Phone: +1 716 673-1250 cloos@ACSU.Buffalo.EDU Snail: PersonalZipCode: 14048-0772, USA cloos@ub.UUCP Quote: <>