[Bf-committers] Pupmenu conventions. (Was: CVScommit:blender/source/blender/src edit.c)

Robert Wenzlaff bf-committers@blender.org
Wed, 8 Oct 2003 09:37:02 -0400

On Wednesday 08 October 2003 06:03 am, Ton Roosendaal wrote:
> Hi,
[. . .]
> No idea what you talk about. What is a 'hot char', a hotkey? Blender  
> hotkeys work with 'raw codes', it detects a button at your keyboard,  
> not which modifier is active.

Recapping briefly (for the time impared): 

1) The idea was to _add_ a highlighted character to menu items.  This 
highlighted char is what I called a "hot char".   (Yes, this takes new code.  
I offered to do it.)  

2) The hot char would invoke the menu item _instead_ of it's numeric position 
(1,2,3...).  To keep the old "famous" key combos valid, the hot char added 
would be it's old number (eg; "Cursor->grid (*4*)", where *x* shows 

3)  New items added to a menu would get letters for hot chars 
("Gri*b*nets->grid"), and could be inserted anywhere for logical grouping.   
The key combo of old items won't change since it would be specified 
independantly of position, and you can always tell that "Cursor->Grid (*4*)" 
is invoked by a 4 because it has a highlighted "4" in it. 

4) A menu string that provides _no_ hot chars, defaults to the old behavior 
(so we don't have to update all menu strings at once).  But if you add a hot 
char to one item in a menu string, you have to add them to all items in 
_that_ menu string, because the 2 systems could conflict if mixed in the same 

5) Determining which key/letter is highlighted is easier than trying to count 
the items to determine the invocation key, esp. when there's no visible 
indication that is how it works. 

6) The "hot char" mechanism is self explanitory.  (At least in use.  The 
specification, however,  seems to need a lot of explaining....)
Robert Wenzlaff                  rwenzlaff@soylent-green.com