TextView

class TextView: NSTextView

The text view for the editor

Override functions

  • Draw a background behind the current fragment

    Declaration

    Swift

    override func draw(_ dirtyRect: CGRect)

    Parameters

    dirtyRect

    The current rect of the editor

  • Handle double-click on directives to edit them

    Declaration

    Swift

    override func mouseDown(with event: NSEvent)

    Parameters

    event

    The mouse click event

  • Set the selection to the characters in an array of ranges in response to user action

    Declaration

    Swift

    override func setSelectedRange(
        _ charRange: NSRange,
        affinity: NSSelectionAffinity,
        stillSelecting stillSelectingFlag: Bool
    )

Custom functions