Public Member Functions | Public Attributes | Static Public Attributes | List of all members
interactive_markers.menu_handler.MenuHandler Class Reference

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

Public Member Functions

def __init__ (self)
 
def 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. More...
 
def doInsert (self, title, command_type, command, feedback_cb)
 
def getCheckState (self, handle)
 Get the current state of an entry. More...
 
def getTitle (self, handle)
 Get the title for the given menu entry. More...
 
def insert (self, title, parent=None, command_type=MenuEntry.FEEDBACK, command="", callback=None)
 Insert a new menu item. More...
 
def makeEntry (self, context, handle, parent_handle)
 
def processFeedback (self, feedback)
 
def pushMenuEntries (self, handles_in, entries_out, parent_handle)
 
def reApply (self, server)
 Re-apply to all markers that this was applied to previously. More...
 
def setCheckState (self, handle, check_state)
 Specify if an entry is checked or can't be checked at all. More...
 
def setVisible (self, handle, visible)
 Specify if an entry should be visible or hidden. More...
 

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

◆ __init__()

def interactive_markers.menu_handler.MenuHandler.__init__ (   self)

Definition at line 56 of file menu_handler.py.

Member Function Documentation

◆ apply()

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.

◆ doInsert()

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

Definition at line 178 of file menu_handler.py.

◆ getCheckState()

def interactive_markers.menu_handler.MenuHandler.getCheckState (   self,
  handle 
)

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.

◆ getTitle()

def interactive_markers.menu_handler.MenuHandler.getTitle (   self,
  handle 
)

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.

◆ insert()

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.

◆ makeEntry()

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

Definition at line 161 of file menu_handler.py.

◆ processFeedback()

def interactive_markers.menu_handler.MenuHandler.processFeedback (   self,
  feedback 
)

Definition at line 138 of file menu_handler.py.

◆ pushMenuEntries()

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

Definition at line 147 of file menu_handler.py.

◆ reApply()

def interactive_markers.menu_handler.MenuHandler.reApply (   self,
  server 
)

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

Definition at line 119 of file menu_handler.py.

◆ setCheckState()

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.

◆ setVisible()

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

◆ CHECKED

int interactive_markers.menu_handler.MenuHandler.CHECKED = 1
static

Definition at line 53 of file menu_handler.py.

◆ current_handle_

interactive_markers.menu_handler.MenuHandler.current_handle_

Definition at line 59 of file menu_handler.py.

◆ entry_contexts_

interactive_markers.menu_handler.MenuHandler.entry_contexts_

Definition at line 58 of file menu_handler.py.

◆ managed_markers_

interactive_markers.menu_handler.MenuHandler.managed_markers_

Definition at line 60 of file menu_handler.py.

◆ NO_CHECKBOX

int interactive_markers.menu_handler.MenuHandler.NO_CHECKBOX = 0
static

Definition at line 52 of file menu_handler.py.

◆ top_level_handles_

interactive_markers.menu_handler.MenuHandler.top_level_handles_

Definition at line 57 of file menu_handler.py.

◆ UNCHECKED

int interactive_markers.menu_handler.MenuHandler.UNCHECKED = 2
static

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, William Woodall
autogenerated on Fri Oct 27 2023 02:31:54