示例#1
0
 def highlightSelectionInClipRect_(self, rect):
     if wrappermap.wrapper(self).draws_selection:
         if not self.gradientHighlight:
             return self.SuperClass.highlightSelectionInClipRect_(self,
                     rect)
         context = NSGraphicsContext.currentContext()
         focused = self.isDescendantOf_(self.window().firstResponder())
         for row in tablemodel.list_from_nsindexset(self.selectedRowIndexes()):
             self.drawBackgroundGradient(context, focused, row)
示例#2
0
 def get_selection(self):
     selection = self.tableview.selectedRowIndexes()
     return [self.model.iter_for_row(self.tableview, row)  \
             for row in tablemodel.list_from_nsindexset(selection)]