[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Also (heirarchical menus)
- To: osiris@cs.utexas.edu
- Subject: Re: Also (heirarchical menus)
- From: "Mark A. Tapia" <markt@dgp.toronto.edu>
- Date: Wed, 28 Jul 1993 09:54:39 -0400
- Cc: info-mcl@cambridge.apple.com
On Wed Jul 28 02:58:03 1993 osiris@cs.utexas.edu writes:
Is there any way to put a check mark next to a heirarchical menu?
This would be quite useful.
There are indeed ways to put checkmarks of particular kinds next to
a menu item. This normally indicates that the menu-item can be
toggled. Selecting it once turns the option on; selecting it again
turns the option off. The arrow character is normally used to
indicate that a menu-item is also a menu.
Use the set-menu-item-check-mark method for a menu-item to
associate a character with a menu-item:
SET-MENU-ITEM-CHECK-MARK item mark
[Primary method]
sets the character to be used as a check mark beside the menu item. If
mark is t, then a standard check mark symbol appears beside the
command. If it is a character or ASCII value, then the corresponding
character appears next to the menu item. The function returns mark. If
mark is nil, no check mark appears next to the command.
If you want to associate a check-mark character with a menu-item
that "stays" with the menu-item and appears whenever the item is
toggled on, then examine the code available by anonymous-ftp from
cambridge.apple.com in pub/MCL2/contrib/menu-enhancements.sit.hqx.
Unbinhex it and de-archive the file. Follow the instructions.
The following code will add a checked menu-item to the menu *menu*
(setq item (make-instance 'menus::check-mark-item :mark mark))
;; mark is either a character, an integer (0 - 255) corresponding
;; to the char-code of the character or a string of which the first
;; character will be used
(set-menu-item-check-mark item t)
(add-menu-items *menu* item)
mark