Foundry.TextFormatter

g Foundry.Contextual Foundry.Contextual Foundry.TextFormatter Foundry.TextFormatter Foundry.Contextual->Foundry.TextFormatter GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

GObject.ObjectClass (5)

can_format_range ()

dup_buffer ()

dup_document ()

format ()

format_range (begin, end)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

do_can_format_range ()

do_format ()

do_format_range (begin, end)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

buffer

Foundry.TextBuffer

r

document

Foundry.TextDocument

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Foundry.Contextual

r

Class Details

class Foundry.TextFormatter(**kwargs)
Bases:

Foundry.Contextual

Abstract:

Yes

Structure:

Foundry.TextFormatterClass

Abstract base class for plugins to implement custom text formatting.

can_format_range()
Returns:

True if the formatter can handle format_range requests

Return type:

bool

Determines if the formatter can do range formatting of the document.

dup_buffer()
Return type:

Foundry.TextBuffer or None

dup_document()
Return type:

Foundry.TextDocument

format()
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error

Return type:

Dex.Future

format_range(begin, end)
Parameters:
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error

Return type:

Dex.Future

do_can_format_range() virtual
Returns:

True if the formatter can handle format_range requests

Return type:

bool

Determines if the formatter can do range formatting of the document.

do_format() virtual
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error

Return type:

Dex.Future

do_format_range(begin, end) virtual
Parameters:
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error

Return type:

Dex.Future

Property Details

Foundry.TextFormatter.props.buffer
Name:

buffer

Type:

Foundry.TextBuffer

Default Value:

None

Flags:

READABLE

Foundry.TextFormatter.props.document
Name:

document

Type:

Foundry.TextDocument

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY