home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------------*/
-
- Along with this documentation file, you should also find 2 programs, MENUTEXT,
- and RESTORE. Together these programs allow you to customize the text of other
- people's menus; if you have ADD, you can also modify the keyboard shortcuts
- of a running program.
-
- /*------------------------------------------------------------------------*/
-
- MENUTEXT
- --------
- This program has been written to be "friendly" - it makes changes to the
- Intuition structures of a window's menu, but also changes the window in a
- way that could easily be detected by a program that had certain checks built
- in.
- You specify the window, the numbers of the menu, item, and sub-item,
- and replacement text. The program extrapolates from this how wide the hitbox
- of the menu should be (that's the space that gets reversed or "boxed in" while
- you move around in the menu), and adds some extra room so that keyboard
- shortcuts don't overlap the displayed text. I've been careful to see that
- you can't violate the rules of menu design and seperate a menu item from its
- submenu section.
-
- Sample usage:
-
- menutext Notepad 4 1 Dull ; change text of first item in fourth menu from
- ; "Plain" to "Dull"
-
- menutext VT100 1 1 Download_Ascii_File ; change first item of first menu
-
- But that is not very aesthetically pleasing, so...
-
- menutext VT100 1 1 -ask ; it will prompt for text, which *can* include
- ; spaces
-
- menutext VT100 2 1 5 Forget_it! ; note you can use 3 numbers to specify
- ; sub-menu position
-
- Restrictions: The window name you specify *is* case-sensitive.
- Only the first word of the window name is significant.
- No screen is specified; they are *all* searched.
- Only 44 characters of menu text are significant.
- With the "-ask" option, you may Guru if you enter >100 letters.
- If the window is closed before you run RESTORE, you will end
- up with little spots of allocated memory that you can never
- reclaim.
- *** Some windows may not be suitable for this. In technical terms,
- if the window's UserData is non-null, you may crash. In
- layman's terms, if you've never tried this on a window,
- you may get a big red flashing box. The Workbench window
- in particular seems to set its UserData to some random
- value.
- No attempt has been made to optimize or shrink this program;
- it still prints debugging information. Please let me know
- if you find a program which is incompatible.
-
- /*------------------------------------------------------------------------*/
-
- RESTORE
- -------
- If you have made changes to window "Foo" with MENUTEXT, you can restore
- the menu to its original state by saying "restore Foo". You will get some
- debugging info which tells you what definitions had been changed.
-
- *** If you run this program and specify a window which uses its UserData
- for anything else, you may crash. This will probably happen during MENUTEXT,
- though.
-
- If the width of a menu has been stretched by the addition of a long text
- string, it may stay stretched even after you restore it. Don't worry about
- this, it will go away if Intuition reconsiders its menu display - otherwise
- it can be ignored.
-
- ((c)) 1987, John Russell. Unlimited distribution, but donations to
- starving programmers welcome.
-
- John Russell
- 5 Alderdice Place
- St. John's, Newfoundland, Canada
- A1B 2P8
- (709) 726-7847
-
-
-