示例#1
0
def getSelection(window=None):
    global m_selection
    global m_document
    if window is None:
        window = getWindow()
    m_selection = SelectionImpl.getSelection(window)
    m_document = getDocument(window)
示例#2
0
文件: Selection.py 项目: Afey/pyjs
def getSelection(window=None):
    global m_selection
    global m_document
    if window is None:
        window = getWindow()
    m_selection = SelectionImpl.getSelection(window)
    m_document = getDocument(window)
示例#3
0
文件: Selection.py 项目: Afey/pyjs
def getRange():
    jsRange = SelectionImpl.getJSRange(m_document, m_selection)
    if jsRange is None:
        return None
    res = Range(m_document, jsRange)
    res.ensureEndPoints()

    return res
示例#4
0
def getRange():
    jsRange = SelectionImpl.getJSRange(m_document, m_selection)
    if jsRange is None:
        return None
    res = Range(m_document, jsRange)
    res.ensureEndPoints()

    return res
示例#5
0
文件: Selection.py 项目: Afey/pyjs
def clear():
    SelectionImpl.clear(m_selection)
示例#6
0
文件: Selection.py 项目: Afey/pyjs
def setRange(newSelection):
    if newSelection.getDocument() == m_document:
        SelectionImpl.setJSRange(m_selection, newSelection.getJSRange())
示例#7
0
def clear():
    SelectionImpl.clear(m_selection)
示例#8
0
def setRange(newSelection):
    if newSelection.getDocument() == m_document:
        SelectionImpl.setJSRange(m_selection, newSelection.getJSRange())