Package Pmv :: Module controlPanelCommands :: Class TreeViewWithCheckbuttons
[hide private]
[frames] | no frames]

Class TreeViewWithCheckbuttons

source code

mglutil.gui.BasicWidgets.Tk.TreeWidget.tree.TreeView --+
                                                       |
                                       KeySelectable --+
                                                       |
                                                      TreeViewWithCheckbuttons

Tree Widget class
    A TreeWiget contains tree nodes (object of Class Node). 
    Each node can have children. Nodes that do have children can be expanded 
and collapsed using the + - icon placed before de nodes' icon. Each no has an 
icon and a name. It is possible to associate an arbitrary Python object to each 
node. The node in the tree is the graphical representation of the object.



Instance Methods [hide private]
  __init__(self, master=None, name='Tree', multi_choice=False, width=800, height=200, treeWidth=140, treeHeight=100, historyWidth=100, historyHeight=100, mode='Extended', historyVisible=False, nohistory=False, mouseBinding=None, obj2Node=True, displayValue=False, offx=0, offy=0)
Constructor: Creates the canvas used to draw the tree
  handleControlKey(self, event)
  colHasButtton(self, column, klass)
returns True if a given column has check buttons for a given klass
  findFirstMatchNodeFromName(self, name)
walks the tree and find the first node whose fullname matches name
  selectFromString(self)
  setCallback(self, column, pmvcmd, iconName=None, balloonText=None, name='command', function=None, bValFunc=None)
define a callback for the checkbuttons in a given column.
  editColumn(self, column)
  initCallback(self, node, column)
  manageChildren(self, node, column)
  chainCommands(self, node, column)
  addNodeTree(self, obj)
recursively add a nodes for a hierarchy of objects rooted at obj

Inherited from mglutil.gui.BasicWidgets.Tk.TreeWidget.tree.TreeView: AddToHistoryList, ButtonAdd_cb, CollapseNode, DeleteFromHistoryList, Enter_cb, ExpandNode, GetSelected, LockHistoryItem, Select, UnLockHistoryItem, addNode, addNodeSet, cleanUpOnNodeDelete, clearSelection, collapseAllNodes, configureTopFrame_cb, copy, copyNode, deSelect, deleteAllChildren, deleteNode, deleteNode_byName, destroy, displayValueInTree, do_updateY, draw_new_root, expandAllNodes, expandPath, findNodeFromName, forget, handle_key, hide, lastVisibleNodeOf, moveNode, moveSelectionDown, moveSelectionUp, nextVisibleNodeOf, savePaneWidth_cb, scrollAll, scrollDown, scrollUp, scrollUpDown, selectNodes, setAction, show, showNode, undoSelect, updateY

Inherited from KeySelectable: keyUp_cb, key_cb, match, selectItem, timeOut


Method Details [hide private]

__init__(self, master=None, name='Tree', multi_choice=False, width=800, height=200, treeWidth=140, treeHeight=100, historyWidth=100, historyHeight=100, mode='Extended', historyVisible=False, nohistory=False, mouseBinding=None, obj2Node=True, displayValue=False, offx=0, offy=0)
(Constructor)

source code 
Constructor: Creates the canvas used to draw the tree
Overrides: mglutil.gui.BasicWidgets.Tk.TreeWidget.tree.TreeView.__init__
(inherited documentation)

handleControlKey(self, event)

source code 
None

colHasButtton(self, column, klass)

source code 
returns True if a given column has check buttons for a given klass

findFirstMatchNodeFromName(self, name)

source code 
walks the tree and find the first node whose fullname matches name

selectFromString(self)

source code 
None

setCallback(self, column, pmvcmd, iconName=None, balloonText=None, name='command', function=None, bValFunc=None)

source code 
define a callback for the checkbuttons in a given column.
pmvcmd is the Pmv command to run in the callback associated with the
       checkbuttons and used to get default values using the 'default form.
name is a string describing the command in that column, defaults to cmd.name
iconName is the name of the icon to be used for the button
balloonText is the tooltip, defaults to name.
function is an option callback to override the default callback.
         It gets called with  (node, column, pmvcmd)

editColumn(self, column)

source code 
None

initCallback(self, node, column)

source code 
None

manageChildren(self, node, column)

source code 
None

chainCommands(self, node, column)

source code 
None

addNodeTree(self, obj)

source code 
recursively add a nodes for a hierarchy of objects rooted at obj