def __init__(self, width, height, collection=None): # Temporary placeholder for kwargs of the update() method. self.__lastargs = None ScrolledWindow.__init__(self, width, height) self._spacing = 0 # The item cursor position within the list. self._cursor = None # Used for selections. self._last_direction = None self._signals[SIG_LISTCHANGED] = [] self._signals[SIG_SELECTCHANGED] = [] # Items and selection. self._itemcollection = None self._selectionmode = SELECTION_MULTIPLE if collection: self.set_items(collection) else: self._itemcollection = ListItemCollection() self._itemcollection.list_changed = self._list_has_changed self._itemcollection.item_changed = self._item_has_changed self.child = ListViewPort(self)