TitleMenu 3.04 (2003-05-25)

written by Vincent Lefèvre

Description

Menus and Title Bar

This utility allows to bring up a menu consisting of a directory and its ancestors by clicking on the title bar of a window with the Menu button. There are two kinds of menus:

Document Menus
Such a menu is defined when the first word of a window title is a filename with a full pathname. It is the case of a filer window or of a window containing a document (document window of a text editor such as Zap or StrongED, or of the Draw application, for instance). The menu consists of the directory containing the concerned file and all its ancestors.
Application Menus
Such a menu is defined when the task that owns the window has set an Application$Dir variable, giving the application directory. The menu consists of this application directory and all its ancestors; moreover, if this directory contains a !Help file, then the menu will have an additional item Help to get help on this application.

The document menu is the default menu, but this can be changed thanks to modes. The other menu can be brought up by pressing a special key (by default, Shift).

Selecting a menu item will open the corresponding directory or will display the help on the application. These menus have other two items:

Close Icon

A click on the close icon with the Menu button allows to open the first directory of the corresponding menu, without using this menu (in a filer window, this is equivalent to an Open parent). This feature can be disabled by changing the current mode.

Special Key

A special key allows to bring up the other menu but the one chosen in preference. This special key can be changed with the *TitleMenuSKey command; give the key code (from 0 to 127) in argument. The command with no argument returns the current key code. The main key codes are given by the following table:

ShiftCtrlAlt
L & R012
Left345
Right678

You can also use the right button of the mouse: code 11.

Note: these codes correspond to those used for the SWI OS_Byte 121.

Obey$Dir List

There exists another method to know the directory of an application: when the application is started, the directory can be read in the Obey$Dir variable. As this method isn't completely sure (even though it seems to be better), it isn't enabled by default; in particular, the directory will be incorrect if the application isn't started from an Obey file. To enable or disable this method, use the modes.

The *TitleMenuODL command gives the list of the tasks that had their Obey$Dir variable memorized. The *TitleMenuRemove command allows to remove a task from this list (the task handle is given in argument).

Modes

You can either display or change the current mode with the *TitleMenuMode command. The mode is an integer in the range 0 to 255, and 0 is the default mode. The different possibilities are given below.

If you wish to set the mode when starting TitleMenu, add a space and the mode value at the end of the RMRun line, in the !TitleMenu.!Run file. If the Obey$Dir list is enabled, it is strongly advised to start TitleMenu at the end of the boot sequence.

Information Box

You can click on the program name TitleMenu or on the author Vincent Lefèvre. If a web browser is loaded, this will bring you on my web site.

Clashes

There is a clash with Christian Flöter's MouseAxess module. To be able to use TitleMenu and MouseAxess at the same time, you need to disable the MouseAxess feature related to the title bar by modifying the MouseAxess module. The following modification on MouseAxess 0.17 seems to work, but as usual, do that at your own risk.

MouseAxess 0.17e:

         Offset   Hex word    Code
------------------------------------------------
Change    1E58    E3740004    CMN R4,#4
 into     1E58    EA000003    B   &00001E6C
------------------------------------------------
Change    1ED8    E3740004    CMN R4,#4
 into     1ED8    EA000001    B   &00001EE4
------------------------------------------------

MouseAxess 0.17j:

         Offset   Hex word    Code
------------------------------------------------
Change    1E60    E3740004    CMN R4,#4
 into     1E60    EA000004    B   &00001E78
------------------------------------------------
Change    1EEC    E3740004    CMN R4,#4
 into     1EEC    EA000001    B   &00001EF8
------------------------------------------------

Licence and Distribution

TitleMenu is freeware. Use it at your own risk. You may freely distribute it under the condition that the files are not modified or removed and that you do not make any profit. The assembly source is supplied so that you can modify it for yourself if you want to. If you wish to distribute a modified version, please contact me before doing so.

You can find the latest version of my software on my Risc PC web page. From there, you can also download:

For any contact about TitleMenu, use the following address: titlemenu@vinc17.org


Vincent Lefèvre <vincent@vinc17.org>