manual:chapter7:custmenu

This is an old revision of the document!


The menu engine in newRPL retains the basic concepts of the one used in userRPL but provides new features such as help messages and dynamical menu appearance.

The most important command used to display a custom menu is TMENU which displays the menu on the active menu area. It accepts either an integer or a list: the former is used to display a preset system menu but here we will discuss about the latter, which allows to display a full customized menu.


The DISPLAY field


The ACTION field


The HELP field


newRPL has two menu areas available to the user which can be exploited to create a two-level menu structure. Since newRPL allows the user to choose either MENU 1 or MENU 2 as active area, it is more convenient to refer to the two menus not in absolute terms but in chronological terms; in other words, three commands are available to display a custom menu:

  • the already mentioned TMENU which displays the menu on the active menu area as controlled by flag -11;
  • TMENULST which displays the menu on the area that was used last, be it the active or the secondary area;
  • TMENUOTHR which displays the menu on the area that was not used last, be it the active or the secondary area.

In this way an application can easily create a two-level menu hierarchy and have both levels displayed on the screen at once. Of course, such a structure must be traversed also backwards, therefore three suitable commands are provided:

  • MENUBK which displays the previous menu on the active menu area;
  • MENUBKLST which displays the previous menu on the area that was used last;
  • MENUBKOTHR which displays the previous menu on the area that was not used last.

Finally, to retrieve on the stack the definitions of the custom menus the following commands are provided:

  • manual/chapter7/custmenu.1634040479.txt.gz
  • Last modified: 2021/10/12 05:07
  • by jojo1973