public static function newRow(array $attrs = array()) {
        if (!empty(self::$row_data))
            self::$rows[count(self::$rows) - 1][] = self::$row_data;
        self::$row_data = array();
        self::$rows[][] = $attrs;
        return count(self::$rows);
    }