Index: trunk/doc/developer/lihata_format/root_menu.lht =================================================================== --- trunk/doc/developer/lihata_format/root_menu.lht (revision 16847) +++ trunk/doc/developer/lihata_format/root_menu.lht (revision 16848) @@ -37,6 +37,34 @@ } } } + ha:main_menu { + type=li + desc={root of the main pull-down menu system; ordered list of main menus} + li:children { + ha:MENUNAME { + type=ha + desc={main menu name, e.g. "File"} + li:children { + sy:m@dup = {/lht_tree_doc/comm/submenu/children/m} + sy:submenu = {/lht_tree_doc/comm/submenu} + } + } + } + } + ha:popups { + type=li + desc={collection of popup menus} + li:children { + ha:POPUPNAME { + type=ha + desc={popup menu name, e.g. "layer" for layer context menu} + li:children { + sy:m@dup = {/lht_tree_doc/comm/submenu/children/m} + sy:submenu = {/lht_tree_doc/comm/submenu} + } + } + } + } } } } @@ -61,5 +89,63 @@ ha:press-ctrl { type=li; desc={actions to execute on mouse button press when control is pressed} } } } + + ha:submenu { + type=li + desc={ordered list of menu items for a submenu} + li:children { + ha:m = {valtype=string; desc={mnemonic: single character that should be underlined and used as a hot key in the menu name}} + ha:- = {valtype=none; desc={horizontal separator}} + ha:@ANCHOR = {valtype=none; desc={an anchor is an invisible placeholder where a dynamically generated set of menu items should be inserted runtime}} + ha:SUBSUBMENUNAME = { + type=ha + desc={sub-submenu item: opens a new level of submenu when clicked} + li:children { + sy:m@dup = {/lht_tree_doc/comm/submenu/children/m} + sy:submenu = {/lht_tree_doc/comm/submenu} + } + } + ha:LEAFSUBMENUNAME = { + type=ha + desc={leaf submenu item: executes an action when clicked} + li:children { + sy:m@dup = {/lht_tree_doc/comm/submenu/children/m} + ha:a1 { + type=li + name=a + desc={list of alternative hotkey sequences to activate the menu} + } + ha:a2 { + valtype=string + name=a + desc={a single hotkey sequences to activate the menu} + } + ha:action1 { + type=li + name=action + desc={list of actions to execute when the menu is activated} + } + ha:action2 { + valtype=string + name=action + desc={a single action to execute when the menu is activated} + } + ha:tip { + valtype=string + desc={tooltip text} + } + ha:checked { + valtype=string + desc={the menu item has a checkbox; value is the action to execute to determine whether the menu item's checkbox is checked or not} + } + ha:update_on { + valtype=string + desc={path of a conf node that triggers re-evaluation of the checkbox state} + } + } + } + } + } } } + Index: trunk/doc/developer/lihata_format/tree.html =================================================================== --- trunk/doc/developer/lihata_format/tree.html (revision 16847) +++ trunk/doc/developer/lihata_format/tree.html (revision 16848) @@ -151,6 +151,14 @@    li:press     actions to execute on mouse button press when no modifier is pressed    li:press-shift     actions to execute on mouse button press when shift is pressed    li:press-ctrl     actions to execute on mouse button press when control is pressed +  li:main_menu     root of the main pull-down menu system; ordered list of main menus +   ha:MENUNAME     main menu name, e.g. "File" +    m string   mnemonic: single character that should be underlined and used as a hot key in the menu name +    li:submenu     ordered list of menu items for a submenu -> +  li:popups     collection of popup menus +   ha:POPUPNAME     popup menu name, e.g. "layer" for layer context menu +    m string   mnemonic: single character that should be underlined and used as a hot key in the menu name +    li:submenu     ordered list of menu items for a submenu ->

ha:geda-project-v1

@@ -533,6 +541,27 @@    termname flag   when set the names of pins are shown.    floater flag   subc part can be moved after subc placing +

li:submenu

+

+ +
type:name value ver description +
li:submenu     ordered list of menu items for a submenu +
 m string   mnemonic: single character that should be underlined and used as a hot key in the menu name +
 - none   horizontal separator +
 @ANCHOR none   an anchor is an invisible placeholder where a dynamically generated set of menu items should be inserted runtime +
 ha:SUBSUBMENUNAME     sub-submenu item: opens a new level of submenu when clicked +
  m string   mnemonic: single character that should be underlined and used as a hot key in the menu name +
  li:submenu     ordered list of menu items for a submenu -> +
 ha:LEAFSUBMENUNAME     leaf submenu item: executes an action when clicked +
  m string   mnemonic: single character that should be underlined and used as a hot key in the menu name +
  li:a     list of alternative hotkey sequences to activate the menu +
  a string   a single hotkey sequences to activate the menu +
  li:action     list of actions to execute when the menu is activated +
  action string   a single action to execute when the menu is activated +
  tip string   tooltip text +
  checked string   the menu item has a checkbox; value is the action to execute to determine whether the menu item's checkbox is checked or not +
  update_on string   path of a conf node that triggers re-evaluation of the checkbox state +

Types

Index: trunk/doc/developer/lihata_format/tree.txt =================================================================== --- trunk/doc/developer/lihata_format/tree.txt (revision 16847) +++ trunk/doc/developer/lihata_format/tree.txt (revision 16848) @@ -114,7 +114,7 @@ ha:menu -type:name value ver description +type:name value ver description ha: Menu file li:mouse mouse bindings li:left actions to execute on left button click @@ -146,6 +146,14 @@ li:press actions to execute on mouse button press when no modifier is pressed li:press-shift actions to execute on mouse button press when shift is pressed li:press-ctrl actions to execute on mouse button press when control is pressed + li:main_menu root of the main pull-down menu system; ordered list of main menus + ha:MENUNAME main menu name, e.g. "File" + m string mnemonic: single character that should be underlined and used as a hot key in the menu name + li:submenu ordered list of menu items for a submenu -> + li:popups collection of popup menus + ha:POPUPNAME popup menu name, e.g. "layer" for layer context menu + m string mnemonic: single character that should be underlined and used as a hot key in the menu name + li:submenu ordered list of menu items for a submenu -> ha:geda-project-v1 @@ -528,6 +536,26 @@ termname flag when set the names of pins are shown. floater flag subc part can be moved after subc placing +li:submenu + +type:name value ver description +li:submenu ordered list of menu items for a submenu + m string mnemonic: single character that should be underlined and used as a hot key in the menu name + - none horizontal separator + @ANCHOR none an anchor is an invisible placeholder where a dynamically generated set of menu items should be inserted runtime + ha:SUBSUBMENUNAME sub-submenu item: opens a new level of submenu when clicked + m string mnemonic: single character that should be underlined and used as a hot key in the menu name + li:submenu ordered list of menu items for a submenu -> + ha:LEAFSUBMENUNAME leaf submenu item: executes an action when clicked + m string mnemonic: single character that should be underlined and used as a hot key in the menu name + li:a list of alternative hotkey sequences to activate the menu + a string a single hotkey sequences to activate the menu + li:action list of actions to execute when the menu is activated + action string a single action to execute when the menu is activated + tip string tooltip text + checked string the menu item has a checkbox; value is the action to execute to determine whether the menu item's checkbox is checked or not + update_on string path of a conf node that triggers re-evaluation of the checkbox state + Types +--------------------------------------------------------------------------------------------------+