Adding a command menu to Stringscope
I'm enhancing Stringscope with a permanent command menu and a prompt area. The menu, an item of which holds a submenu, attaches to the right side of the main window, the prompt area to the top of the main window above the title bar. This is what the main window looks like now:
This way of arranging menus and secondary windows by attaching them to a main window is typical of Interlisp programs with a GUI. The system supports this design with functions like the ones I used, CREATEMENUEDWINDOW
to create and attach a menu and GETPROMPTWINDOW
for doing the same with a prompt window.
The menu comprises these initial items and subitems:
Get
: reads the strings of a new fileFind
: searches for strings matching a specific textSort
: sorts the strings in the following order
Ascending
Descending
Set threshold
: changes the minimum length of stringsReset
: redisplays the strings read from the current file
The prompt window is an area for displaying status messages and receiving user input such as the name of a new file to read.
So far the Stringscope code sets up the menu and the prompt window. The menu handling function, however, is just a stub that prints to the main prompt window the selected menu item.
The next step will be to implement the commands the menu calls.
Discuss...
Email | Reply @amoroso@fosstodon.org