コード例 #1
0
    def normal_motion ( self, event ):
        """ Handles the mouse moving in normal mode.
        """
        self.state = 'normal'
        if len( self.factory.operations ) > 0:
            item        = self._item_at( event.x, event.y )
            active_item = self.active_item
            if item is not active_item:
                self.active_item = item
                inn( active_item ).refresh()
                inn( item ).refresh()

            self.mode = ('normal' if item is None else 'hover')

        return (self.active_item is not None)
コード例 #2
0
 def _mode_set ( self ):
     """ Handles the 'mode' facet being set.
     """
     inn( self.active_item ).refresh()
コード例 #3
0
 def normal_leave ( self ):
     """ Handles the mouse leaving the control in normal mode.
     """
     active_item, self.active_item = self.active_item, None
     inn( active_item ).refresh()