def addBookmark(self, start, end=None, name=None, data=None): newBook = TextBookmark(start, end, name, data) for b in self._bookmarks: if b.start > start: self._bookmarks.insert(self._bookmarks.index(b), newBook) return newBook self._bookmarks.append(newBook) return newBook
def _cloneImpl(self, **kwargs): return TextBookmark._cloneImpl(self, blockDef=self._blockDef)
def __init__(self, blockDef, start, end =None, data =None, **kwargs): """Creates a new instance of TextBlock.""" name = kwargs.get('name', blockDef.name) TextBookmark.__init__(self, start, end, name, data) self._blockDef = blockDef
def __init__(self, blockDef, start, end=None, data=None, **kwargs): """Creates a new instance of TextBlock.""" name = kwargs.get('name', blockDef.name) TextBookmark.__init__(self, start, end, name, data) self._blockDef = blockDef