parameters: (self)
docstring: Binds all the necessary events for navigation, sizing,
          drawing.
docstring_summary: Binds all the necessary events for navigation, sizing,
          drawing.
docstring_tokens: Binds all the necessary events for navigation sizing drawing .
function: def BindEvents(self):
          """Binds all the necessary events for navigation, sizing,
          drawing.
          """
          # refresh window by doing a Render
          self.Bind(wx.EVT_PAINT, self.OnPaint)
          # turn off background erase to reduce flicker
          self.Bind(wx.EVT_ERASE_BACKGROUND, lambda e: None)
  
          # Bind the events to the event converters
          self.Bind(wx.EVT_RIGHT_DOWN, self.OnButtonDown)
          self.Bind(wx.EVT_LEFT_DOWN, self.OnButtonDown)
          self.Bind(wx.EVT_MIDDLE_DOWN, self.OnButtonDown)
          self.Bind(wx.EVT_RIGHT_UP, self.OnButtonUp)
          self.Bind(wx.EVT_LEFT_UP, self.OnButtonUp)
          self.Bind(wx.EVT_MIDDLE_UP, self.OnButtonUp)
          self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)
          self.Bind(wx.EVT_MOTION, self.OnMotion)
  
          self.Bind(wx.EVT_ENTER_WINDOW, self.OnEnter)
          self.Bind(wx.EVT_LEAVE_WINDOW, self.OnLeave)
  
          # If we use EVT_KEY_DOWN instead of EVT_CHAR, capital versions
          # of all characters are always returned.  EVT_CHAR also performs
          # other necessary keyboard-dependent translations.
          self.Bind(wx.EVT_CHAR, self.OnKeyDown)
          self.Bind(wx.EVT_KEY_UP, self.OnKeyUp)
  
          self.Bind(wx.EVT_SIZE, self.OnSize)
  
          # the wx 2.8.7.1 documentation states that you HAVE to handle
          # this event if you make use of CaptureMouse, which we do.
          if _useCapture and hasattr(wx, 'EVT_MOUSE_CAPTURE_LOST'):
              self.Bind(wx.EVT_MOUSE_CAPTURE_LOST,
                      self.OnMouseCaptureLost)
function_tokens: def BindEvents ( self ) : # refresh window by doing a Render self . Bind ( wx . EVT_PAINT , self . OnPaint ) # turn off background erase to reduce flicker self . Bind ( wx . EVT_ERASE_BACKGROUND , lambda e : None ) # Bind the events to the event converters self . Bind ( wx . EVT_RIGHT_DOWN , self . OnButtonDown ) self . Bind ( wx . EVT_LEFT_DOWN , self . OnButtonDown ) self . Bind ( wx . EVT_MIDDLE_DOWN , self . OnButtonDown ) self . Bind ( wx . EVT_RIGHT_UP , self . OnButtonUp ) self . Bind ( wx . EVT_LEFT_UP , self . OnButtonUp ) self . Bind ( wx . EVT_MIDDLE_UP , self . OnButtonUp ) self . Bind ( wx . EVT_MOUSEWHEEL , self . OnMouseWheel ) self . Bind ( wx . EVT_MOTION , self . OnMotion ) self . Bind ( wx . EVT_ENTER_WINDOW , self . OnEnter ) self . Bind ( wx . EVT_LEAVE_WINDOW , self . OnLeave ) # If we use EVT_KEY_DOWN instead of EVT_CHAR, capital versions # of all characters are always returned.  EVT_CHAR also performs # other necessary keyboard-dependent translations. self . Bind ( wx . EVT_CHAR , self . OnKeyDown ) self . Bind ( wx . EVT_KEY_UP , self . OnKeyUp ) self . Bind ( wx . EVT_SIZE , self . OnSize ) # the wx 2.8.7.1 documentation states that you HAVE to handle # this event if you make use of CaptureMouse, which we do. if _useCapture and hasattr ( wx , 'EVT_MOUSE_CAPTURE_LOST' ) : self . Bind ( wx . EVT_MOUSE_CAPTURE_LOST , self . OnMouseCaptureLost )