Interface

Atk-1.0AtkEditableTextInterface

Interface for implementing EditableText. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_copy_text(start_pos: number, end_pos: number): void;
    vfunc_cut_text(start_pos: number, end_pos: number): void;
    vfunc_delete_text(start_pos: number, end_pos: number): void;
    vfunc_insert_text(string: string, length: number, position: number): void;
    vfunc_paste_text(position: number): void;
    vfunc_set_run_attributes(
        attrib_set: SList,
        start_offset: number,
        end_offset: number,
    ): boolean;
    vfunc_set_text_contents(string: string): void;
}

Hierarchy (View Summary)

Index

Methods

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

    Parameters

    • start_pos: number

      start position

    • end_pos: number

      end position

    Returns void

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

    Parameters

    • start_pos: number

      start position

    • end_pos: number

      end position

    Returns void

  • Delete text start_pos up to, but not including end_pos.

    Parameters

    • start_pos: number

      start position

    • end_pos: number

      end position

    Returns void

  • Insert text at a given position.

    Parameters

    • string: string

      the text to insert

    • length: number

      the length of text to insert, in bytes

    • position: number

      The caller initializes this to the position at which to insert the text. After the call it points at the position after the newly inserted text.

    Returns void

  • Paste text from clipboard to specified position.

    Parameters

    • position: number

      position to paste

    Returns void

  • 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.

    Parameters

    • attrib_set: SList
    • start_offset: number

      start of range in which to set attributes

    • end_offset: number

      end of range in which to set attributes

    Returns boolean

  • Set text contents of text.

    Parameters

    • string: string

      string to set for text contents of text

    Returns void