interactive_markers.menu_handler module
- class interactive_markers.menu_handler.EntryContext
Bases:
object
- class interactive_markers.menu_handler.MenuHandler
Bases:
object
Creates a menu and maps its entries to function callbacks.
- CHECKED = 1
- NO_CHECKBOX = 0
- UNCHECKED = 2
- apply(server, marker_name)
Copy current menu state into the marker given by the specified name.
Divert callback for MENU_SELECT feedback to this manager.
- doInsert(title, command_type, command, feedback_cb)
Insert without adding a top-level entry.
- entry_contexts_: Dict[int, EntryContext]
- getCheckState(handle)
Get the current state of an entry.
- Returns:
CheckState if the entry exists and has checkbox, None otherwise.
- getTitle(handle)
Get the title for the given menu entry.
- Returns:
The title, None if menu entry does not exist.
- insert(title, parent=None, command_type=visualization_msgs.msg.MenuEntry.FEEDBACK, command='', callback=None)
Insert a new menu item.
- makeEntry(context, handle, parent_handle)
- managed_markers_: Set[str]
- processFeedback(feedback)
Call registered callback functions for given feedback command.
- pushMenuEntries(handles_in, entries_out, parent_handle)
Create and push MenuEntry objects from handles_in onto entries_out.
Calls itself recursively to add the entire menu tree.
- reApply(server)
Re-apply to all markers that this was applied to previously.
- setCheckState(handle, check_state)
Specify if an entry is checked or can’t be checked at all.
- setVisible(handle, visible)
Specify if an entry should be visible or hidden.
- top_level_handles_: List[int]