Wimp_CreateMenu helper
Theo Markettos (89) 919 posts |
Just to note down an idea before I forget it… Iconbar menus are supposed to open at y=max(base_of_screen+96,mouse_pointer_y), but so many apps screw this up. ‘96’ is a bit of an arbitrary number and it might change if, say, the height of the iconbar were to be enlarged (see Retina Display thread). So have some kind of helper that does the necessary without the programmer having to know this calculation and other similar things, like producing a menu to the right of a ‘click here for menu’ icon. Programmers shouldn’t have to do calculations with arbitrary OS-defined constants. Maybe these could be flags to Wimp_CreateMenu? |
Jeffrey Lee (213) 6048 posts |
Or shrunk – on portables a smaller iconbar (or perhaps just smaller icons) could result in a useful amount of extra screen real estate. At the very least, I think we need a call to allow the height (or position of top edge) of the iconbar to be read. |
Leo (448) 82 posts |
This actually came up at ROUGOL last night. Whilst we were playing around with the RPi disc image we noticed a couple of applications that were getting the menu height wrong..
One suggestion was having an option to use the ‘small’ icons on the Iconbar instead of the normal sized ones. |
Rick Murray (539) 13806 posts |
Warning: Ugly hack follows…
(^_^) Perhaps the Wimp_ReadSysInfo (or whatever it is) should be expanded to provide a pointer to a data block that can be looked at, such as: blk%!0 = Iconbar height blk%!4 = Screen height (discounting iconbar) blk%!8 = Title bar height blk%!12 = Scroll bar width blk%!16 = Y offset to open iconbar menus blk%!20 = Wimp flags: bit 0 = Windows have iconise buttons bit 1 = Windows can go off-screen bit 2 = Windows toggled max don't cover iconbar etc, there's other stuff but I don't recall right now |
Chris Hall (132) 3554 posts |
Whilst we were playing around with the RPi disc image we noticed a couple of applications that were getting the menu height wrong.. In my defence, the application !SignalBox was set up so that the menu obtained here could include images – this required the inter-line spacing of the menu to be changed and all my subsequent apps (MultiTask, Cat) have had this left unchanged. Didn’t know about the 96 unit from bottom rule (was it there in RISC OS 2?). |
Sprow (202) 1155 posts |
Style Guide, page 92, “For icon bar menus, the base of the menu must be 96 OS units from the bottom of the screen.” so certainly decreed in 1993, I don’t have anything as early as RISC OS 2. |
nemo (145) 2529 posts |
Yes, the iconbar menu should open just above a normally-placed icon. Preventing such menus opening below that should be easy enough, but there’s a million and one other things one might do at the same time:
etc :-) |
edwardx (1628) 37 posts |
There’s no need for ugly hacks to read the iconbar height. !blk% = -2 SYS "Wimp_GetWindowOutline",,blk% iconbar_height% = blk%!16 |
Chris Hall (132) 3554 posts |
SignalBox now updated to version 42.92 to (finally) correct the menu item height (after some [further] persuasion from Sprow) and the icon bar icon grey background vice transparent. Also now contains the full version (96Mbytes, compressed to 14Mbytes). A kludged version (42.91) for ARMiniX to make the SOUND commands work correctly prior to the TEMPO fix on 28 June 2014 is still distributed in parallel but more recent versions of RISC OS on Pandaboard will work correctly with either the 42.9 version (2007) or the 42.92 version (2014). |