'Filter tool_panel contents for displaying for user.'

def tool_panel_contents(self, trans, **kwds):

    filter_method = self._build_filter_method(trans)
    for (_, item_type, elt) in self._tool_panel.panel_items_iter():
        elt = filter_method(elt, item_type)
        if elt:
            (yield elt)
