# Dump an item and it's children recursively def dump_children(space, menu, item) s = "" s += "#{space}#{item}#{menu.action(item).title}#{menu.action(item).shortcut}\n" menu.items(item).each { |child| s += dump_children("  #{space}", menu, child) } return s end # Get the menu object app = RBA::Application.instance mw = app.main_window menu = mw.menu # Create the HTML page s = "

Menu item structure

\n" s += "\n" s += "\n" menu.items("").each { |item| s += dump_children("", menu, item) } s += "
PathTitleShortcut
\n" # And show this base in the HTML browser dialog text = RBA::BrowserSource::new_html( s ) browser = RBA::BrowserDialog::new browser.set_source( text ) browser.set_home( "int:" ) browser.exec # If this dialog is closed, start the application app.exec