Picture MDEF 1.1 - by Carl W. Bell
Copyright © 1994-1997 Baylor University

Note: If you got here using a web search engine, you can find the program here.

This code is not public domain, but may be freely used for any purpose. It is provided "as is". Use at your own risk. So there. You don't even have to give me (or Baylor University) credit but I won't complain if you do so anyway... :-) If you do use it in your program, please let me know so that I can notify you if there is an update.

This MDEF allows one to include "arbitrary picture" menus in an app. The picture that is displayed is stored as a resource within the application. The orginal intent was to add function key and keypad menus to NCSA Telnet for those users with old keyboards w/out the function keys or who remap the function keys to some other purpose but still need that "Insert Here" key to work.

The MDEF uses a 'PRCT' resource that sets up rectangular areas in the picture that correspond to menu items. The picture and "picture rects" resources should have resource IDs the same as the menu's ID. (That's the menu ID and NOT the menu's resource ID...)

The MDEF does not support disabling of individual menu items. If any of the items are disabled, then the entire menu is disabled. This might be "fixed" in a future version.

In case the ResEdit TMPL for 'PRCT' is missing, here is what it looks like:

1) *****
Label        *****
Type         LSTB

2) *****
Label        A Rect
Type         RECT

3) *****
Label        *****
Type         LSTE

4) *****

There should be an entry for each rectangular area in the picture that has a corresponding menu item. The rectangles are offset from the top-left corner of the picture's picFrame when drawn. For example, the rect { 0, 0, 10, 10 } will be drawn flush up against the top-left corner of the picture when the menu is drawn. The MDEF doesn't frame anything - it just inverts. So if you want frames around items in the menu, they will need to be included in the picture itself.

Version 1.0

Version 1.1

To do:

If you have any questions, comments, (constructive) criticism, or bug reports please let me know. You can contact me at the address(es) below.

-cb

Carl_Bell@baylor.edu
Carl Bell's Web Page
Stuff I've Written

Snail Mail:

Carl W. Bell
Academic and Research Computing Services
Baylor University Electronic Library
One Bear Place #97148
Waco, TX 76798
Phone:
(254) 710-4065
Baylor's Fine Print:

This software, data and/or documentation contain trade secrets and confidential information which are proprietary to Baylor University. Their use or disclosure in whole or in part without the express written permission of Baylor University is prohibited.

This software, data and/or documentation are also unpublished works protected under the copyright laws of the United States of America. If these works become published, the following notice shall apply:

Copyright © 1994-1997 Baylor University
All Rights Reserved
The name of Baylor University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE, DATA AND/OR DOCUMENTATION ARE PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

When permission has been granted to make copies of this software, data and/or documentation, the above notices must be retained on all copies.

Permission is hereby granted for non-commercial use and distribution of Picture MDEF.