class_docstr: A canvas widget that displays a single Tree.
  ``TreeWidget`` manages a group of ``TreeSegmentWidgets`` that are
  used to display a Tree.
  
  Attributes:
  
    - ``node_attr``: Sets the attribute ``attr`` on all of the
      node widgets for this ``TreeWidget``.
    - ``node_attr``: Sets the attribute ``attr`` on all of the
      leaf widgets for this ``TreeWidget``.
    - ``loc_attr``: Sets the attribute ``attr`` on all of the
      location widgets for this ``TreeWidget`` (if it was built from
      a Tree).  Note that a location widget is a ``TextWidget``.
  
    - ``xspace``: The amount of horizontal space to leave between
      subtrees when managing this widget.  Default value is 10.
    - ``yspace``: The amount of space to place between the node and
      its children when managing this widget.  Default value is 15.
  
    - ``line_color``: The color of the lines connecting each expanded
      node to its subtrees.
    - ``roof_color``: The color of the outline of the triangular roof
      for collapsed trees.
    - ``roof_fill``: The fill color for the triangular roof for
      collapsed trees.
    - ``width``
  
    - ``orientation``: Determines whether the tree branches downwards
      or rightwards.  Possible values are ``'horizontal'`` and
      ``'vertical'``.  The default value is ``'vertical'`` (i.e.,
      branch downwards).
  
    - ``shapeable``: whether the subtrees can be independently
      dragged by the user.  THIS property simply sets the
      ``DRAGGABLE`` property on all of the ``TreeWidget``'s tree
      segments.
    - ``draggable``: whether the widget can be dragged by the user.
class_docstr_tok: ["A","canvas","widget","that","displays","a","single","Tree",".","``","TreeWidget","``","manages","a","group","of","``","TreeSegmentWidgets","``","that","are","used","to","display","a","Tree",".","Attributes",":","-","``","node_attr","``",":","Sets","the","attribute","``","attr","``","on","all","of","the","node","widgets","for","this","``","TreeWidget","``",".","-","``","node_attr","``",":","Sets","the","attribute","``","attr","``","on","all","of","the","leaf","widgets","for","this","``","TreeWidget","``",".","-","``","loc_attr","``",":","Sets","the","attribute","``","attr","``","on","all","of","the","location","widgets","for","this","``","TreeWidget","``","(","if","it","was","built","from","a","Tree",")",".","Note","that","a","location","widget","is","a","``","TextWidget","``",".","-","``","xspace","``",":","The","amount","of","horizontal","space","to","leave","between","subtrees","when","managing","this","widget",".","Default","value","is","10",".","-","``","yspace","``",":","The","amount","of","space","to","place","between","the","node","and","its","children","when","managing","this","widget",".","Default","value","is","15",".","-","``","line_color","``",":","The","color","of","the","lines","connecting","each","expanded","node","to","its","subtrees",".","-","``","roof_color","``",":","The","color","of","the","outline","of","the","triangular","roof","for","collapsed","trees",".","-","``","roof_fill","``",":","The","fill","color","for","the","triangular","roof","for","collapsed","trees",".","-","``","width","``","-","``","orientation","``",":","Determines","whether","the","tree","branches","downwards","or","rightwards",".","Possible","values","are","``","'horizontal","'","``","and","``","'vertical","'","``",".","The","default","value","is","``","'vertical","'","``","(","i.e.",",","branch","downwards",")",".","-","``","shapeable","``",":","whether","the","subtrees","can","be","independently","dragged","by","the","user",".","THIS","property","simply","sets","the","``","DRAGGABLE","``","property","on","all","of","the","``","TreeWidget","``","'s","tree","segments",".","-","``","draggable","``",":","whether","the","widget","can","be","dragged","by","the","user","."]
docstr: Add a binding to all nodes.
code: def bind_drag_nodes(self, callback, button=1):
      """
      Add a binding to all nodes.
      """
      for node in self._nodes:
          node.bind_drag(callback, button)
      for node in self._nodes:
          node.bind_drag(callback, button)
  
imports: from tkinter import IntVar, Menu, Tk
  from nltk.draw.util import BoxWidget, CanvasFrame, CanvasWidget, OvalWidget, ParenWidget, TextWidget
  from nltk.tree import Tree
  from nltk.util import in_idle
label_desc: Use image node_id 9 for calling the TreeWidget obj's underlying member method code with example usage: obj.bind_drag_nodes(callback, button) without return types