EditableTextProtocol

public protocol EditableTextProtocol

AtkEditableText should be implemented by UI components which contain text which the user can edit, via the AtkObject corresponding to that component (see AtkObject).

AtkEditableText is a subclass of AtkText, and as such, an object which implements AtkEditableText is by definition an AtkText implementor as well.

See also: AtkText

The EditableTextProtocol protocol exposes the methods and properties of an underlying AtkEditableText instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see EditableText. Alternatively, use EditableTextRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying AtkEditableText instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • editable_text_ptr Default implementation

    Typed pointer to the underlying AtkEditableText instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the AtkEditableText instance.

    Declaration

    Swift

    var editable_text_ptr: UnsafeMutablePointer<AtkEditableText>! { get }
  • Required Initialiser for types conforming to EditableTextProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

EditableText Interface: EditableTextProtocol extension (methods and fields)

  • copyText(startPos:endPos:) Extension method

    Copy text from start_pos up to, but not including end_pos to the clipboard.

    Declaration

    Swift

    @inlinable
    func copyText(startPos: Int, endPos: Int)
  • cutText(startPos:endPos:) Extension method

    Copy text from start_pos up to, but not including end_pos to the clipboard and then delete from the widget.

    Declaration

    Swift

    @inlinable
    func cutText(startPos: Int, endPos: Int)
  • deleteText(startPos:endPos:) Extension method

    Delete text start_pos up to, but not including end_pos.

    Declaration

    Swift

    @inlinable
    func deleteText(startPos: Int, endPos: Int)
  • Insert text at a given position.

    Declaration

    Swift

    @inlinable
    func insertText(string: UnsafePointer<gchar>!, length: Int, position: UnsafeMutablePointer<gint>!)
  • pasteText(position:) Extension method

    Paste text from clipboard to specified position.

    Declaration

    Swift

    @inlinable
    func pasteText(position: Int)
  • Sets the attributes for a specified range. See the ATK_ATTRIBUTE macros (such as ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes that can be set. Note that other attributes that do not have corresponding ATK_ATTRIBUTE macros may also be set for certain text widgets.

    Declaration

    Swift

    @inlinable
    func setRunAttributes(attribSet: UnsafeMutablePointer<AtkAttributeSet>!, startOffset: Int, endOffset: Int) -> Bool
  • setTextContents(string:) Extension method

    Set text contents of text.

    Declaration

    Swift

    @inlinable
    func setTextContents(string: UnsafePointer<gchar>!)