[squeak-dev] Is there a pull-right hierarchical menu in Squeak?
tim at rowledge.org
Mon Jun 1 18:04:16 UTC 2020
> On 2020-05-31, at 11:53 PM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> If you are using ToolBuilder directly to construct menus (i.e. PluggableMenuSpec), there is -- unfortunately -- no way to add sub-menus. However, almost all tools that go through ToolBuilder construct their menus via a callback from the actual widgets (e.g., PluggableListMorph in Morphic, PluggableListView in MVC), which then arrives as "someMenu" in your model's menu-construction method. That "someMenu" will then be a MenuMorph (in Morphic) or CustomMenu (in MVC). See above for that case. :-)
On my list of things to attack one day is cleaning up the horrendous mess of menu building via toolbuilder. Maybe by the time I get to it somebody else will have solved it for me.
> That latter, most frequent way, to construct menus does not add sub-menus but this .... very special ;-) ... "more..." menu item at the end of the list.
... which is possibly the nastiest way one could do it. If you have to have menus with more than ~9 items, a well thought out hierarchical menu is the least awful approach. If you arrange for it to work well then it is possible to make even complex hierarchies seem natural; see for example, how RISC OS does the job.
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
C for sinking, java for drinking, Smalltalk for thinking
More information about the Squeak-dev