'@todo: docstring'

def processRule(self, rules, row, col, matrix):

    startcol = col
    endcol = col
    endrow = row
    action = 'rows'
    self.widgetsInList = []
    for element in rules:
        row = endrow
        col = startcol
        self.nextrow = row
        self.nextcol = col
        if isinstance(element, list):
            (endrow, endcol) = self.processList(element, row, col, matrix, action)
        elif isinstance(element, dict):
            (endrow, endcol) = self.processDict(element, rules, row, col, matrix, action)
        if (self.layout != None):
            if (self.widgetsInList == []):
                self.layout.addBlock((row, col), (endrow, endcol))
            else:
                self.layout.addTempBlock((row, col), (endrow, endcol), self.widgetsInList)
                self.widgetsInList = []
    return (endrow, endcol)
