Public Member Functions | Public Attributes | Static Public Attributes
interactive_markers.menu_handler.MenuHandler Class Reference

Simple non-intrusive helper class which creates a menu and maps its entries to function callbacks. More...

List of all members.

Public Member Functions

def __init__
def apply
 Copy current menu state into the marker given by the specified name & divert callback for MENU_SELECT feedback to this manager.
def doInsert
def getCheckState
 Get the current state of an entry.
def getTitle
 Get the title for the given menu entry.
def insert
 Insert a new menu item.
def makeEntry
def processFeedback
def pushMenuEntries
def reApply
 Re-apply to all markers that this was applied to previously.
def setCheckState
 Specify if an entry is checked or can't be checked at all.
def setVisible
 Specify if an entry should be visible or hidden.

Public Attributes

 current_handle_
 entry_contexts_
 managed_markers_
 top_level_handles_

Static Public Attributes

int CHECKED = 1
int NO_CHECKBOX = 0
int UNCHECKED = 2

Detailed Description

Simple non-intrusive helper class which creates a menu and maps its entries to function callbacks.

Definition at line 51 of file menu_handler.py.


Constructor & Destructor Documentation

Definition at line 56 of file menu_handler.py.


Member Function Documentation

def interactive_markers.menu_handler.MenuHandler.apply (   self,
  server,
  marker_name 
)

Copy current menu state into the marker given by the specified name & divert callback for MENU_SELECT feedback to this manager.

Definition at line 105 of file menu_handler.py.

def interactive_markers.menu_handler.MenuHandler.doInsert (   self,
  title,
  command_type,
  command,
  feedback_cb 
)

Definition at line 178 of file menu_handler.py.

Get the current state of an entry.

Returns:
CheckState if the entry exists and has checkbox, None otherwise

Definition at line 96 of file menu_handler.py.

Get the title for the given menu entry.

Returns:
The title, None if menu entry does not exist.

Definition at line 131 of file menu_handler.py.

def interactive_markers.menu_handler.MenuHandler.insert (   self,
  title,
  parent = None,
  command_type = MenuEntry.FEEDBACK,
  command = "",
  callback = None 
)

Insert a new menu item.

Definition at line 63 of file menu_handler.py.

def interactive_markers.menu_handler.MenuHandler.makeEntry (   self,
  context,
  handle,
  parent_handle 
)

Definition at line 161 of file menu_handler.py.

Definition at line 138 of file menu_handler.py.

def interactive_markers.menu_handler.MenuHandler.pushMenuEntries (   self,
  handles_in,
  entries_out,
  parent_handle 
)

Definition at line 147 of file menu_handler.py.

Re-apply to all markers that this was applied to previously.

Definition at line 119 of file menu_handler.py.

def interactive_markers.menu_handler.MenuHandler.setCheckState (   self,
  handle,
  check_state 
)

Specify if an entry is checked or can't be checked at all.

Definition at line 86 of file menu_handler.py.

def interactive_markers.menu_handler.MenuHandler.setVisible (   self,
  handle,
  visible 
)

Specify if an entry should be visible or hidden.

Definition at line 77 of file menu_handler.py.


Member Data Documentation

Definition at line 53 of file menu_handler.py.

Definition at line 56 of file menu_handler.py.

Definition at line 56 of file menu_handler.py.

Definition at line 56 of file menu_handler.py.

Definition at line 52 of file menu_handler.py.

Definition at line 56 of file menu_handler.py.

Definition at line 54 of file menu_handler.py.


The documentation for this class was generated from the following file:


interactive_markers
Author(s): David Gossow
autogenerated on Sun Feb 3 2019 03:43:05