Class: TextCursor

silkedit. TextCursor

QTextCursorに対応するクラス。


new TextCursor()

Members


<static, constant> MoveMode :number

Type:
  • number
Properties:
Name Type Default Description
MoveAnchor number
KeepAnchor number

<static, constant> MoveOperation :number

Type:
  • number
Properties:
Name Type Default Description
NoMove number NoMove
Start number Start
Up number Up
StartOfLine number StartOfLine
StartOfBlock number StartOfBlock
StartOfWord number StartOfWord
PreviousBlock number PreviousBlock
PreviousCharacter number PreviousCharacter
PreviousWord number PreviousWord
Left number Left
WordLeft number WordLeft
End number End
Down number Down
EndOfLine number EndOfLine
EndOfWord number EndOfWord
EndOfBlock number EndOfBlock
NextBlock number NextBlock
NextCharacter number NextCharacter
NextWord number NextWord
Right number Right
WordRight number WordRight
NextCell number NextCell
PreviousCell number PreviousCell
NextRow number NextRow
PreviousRow number PreviousRow

<static, constant> SelectionType :number

Type:
  • number
Properties:
Name Type Default Description
WordUnderCursor number WordUnderCursor
LineUnderCursor number LineUnderCursor
BlockUnderCursor number BlockUnderCursor
Document number Document

Methods


block()

Returns:
Type
module:silkedit.TextBlock

clearSelection()


insertText(text)

Parameters:
Name Type Description
text string

movePosition(operation [, mode] [, n])

Parameters:
Name Type Argument Default Description
operation module:silkedit.TextCursor.MoveOperation
mode module:silkedit.TextCursor.MoveMode <optional>
MoveAnchor
n number <optional>
1
Returns:
Type
boolean

position()

Returns:
Type
number

removeSelectedText()


selectedText()

Returns:
Type
string

setPosition(pos [, m])

Parameters:
Name Type Argument Default Description
pos number
m module:silkedit.TextCursor.MoveMode <optional>
MoveAnchor