InfText.RemoteDeleteOperation

g GObject.GInterface GObject.GInterface InfText.DeleteOperation InfText.DeleteOperation GObject.GInterface->InfText.DeleteOperation Infinity.AdoptedOperation Infinity.AdoptedOperation GObject.GInterface->Infinity.AdoptedOperation GObject.Object GObject.Object InfText.RemoteDeleteOperation InfText.RemoteDeleteOperation GObject.Object->InfText.RemoteDeleteOperation InfText.DeleteOperation->InfText.RemoteDeleteOperation Infinity.AdoptedOperation->InfText.RemoteDeleteOperation

Subclasses:

None

Methods

Inherited:

GObject.Object (37), InfText.DeleteOperation (5), Infinity.AdoptedOperation (8)

Structs:

GObject.ObjectClass (5)

class

new (position, length)

Virtual Methods

Inherited:

GObject.Object (7), InfText.DeleteOperation (2), Infinity.AdoptedOperation (7)

Properties

Name

Type

Flags

Short Description

length

int

r/w/co

The length of the deleted text

position

int

r/w/co

Position where to start deleting characters

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class InfText.RemoteDeleteOperation(**kwargs)
Bases:

GObject.Object, InfText.DeleteOperation, Infinity.AdoptedOperation

Abstract:

No

Structure:

InfText.RemoteDeleteOperationClass

classmethod new(position, length)
Parameters:
  • position (int) – The position at which to delete text.

  • length (int) – The number of characters to delete.

Returns:

A new InfText.RemoteDeleteOperation.

Return type:

InfText.RemoteDeleteOperation

Creates a new delete operation that, when applied, deletes length characters starting from position position. Note that this operation is not reversible because it does not know the text to delete and is therefore only used to transmit a delete operation through the network to reduce bandwidth usage. The remote part can then reconstruct the deleted text using Infinity.AdoptedOperation.apply_transformed().

However, it is easier to just use InfText.DefaultDeleteOperation if you want the operation to be reversible.

Property Details

InfText.RemoteDeleteOperation.props.length
Name:

length

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The length of the deleted text

InfText.RemoteDeleteOperation.props.position
Name:

position

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Position where to start deleting characters