Logo Search packages:      
Sourcecode: matplotlib version File versions  Download package

def enthought::traits::ui::view_elements::ViewElements::filter_by (   self,
  klass = None 
)

Returns a sorted list of all names accessible from the ViewElements
    object that are of a specified (ViewElement) type.

Definition at line 103 of file view_elements.py.

00103                                         :
        """ Returns a sorted list of all names accessible from the ViewElements
            object that are of a specified (ViewElement) type.
        """
        if klass is None:
            import view
            klass = view.View
        result = []
        
        # Add each item in the search order which is of the right class and
        # which is not already in the result list:
        for ves in self._get_search_order():
            for name, ve in ves.content.items():
                if isinstance( ve, klass ) and (name not in result):
                    result.append( name )
                    
        # Sort the resulting list of names:
        result.sort()
        
        # Return the result:
        return result
        
    #---------------------------------------------------------------------------
    #  Handles the 'parents' list being updated:
    #---------------------------------------------------------------------------
        
    def _parents__changed ( self ):


Generated by  Doxygen 1.6.0   Back to index