Foundry.TextManager¶
- Subclasses:
None
Methods¶
- Inherited:
Foundry.Service (8), Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)
- Structs:
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
This signal is emitted whenever a [class`Foundry`.TextDocument] managed by the manager emits “saved”. |
Fields¶
- Inherited:
Class Details¶
- class Foundry.TextManager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Manages text documents and provides text editing services.
Foundry.TextManagercoordinates text buffer creation, document management, and provides a unified interface for text editing operations. It handles document loading, saving, and maintains relationships between files and their text representations.- apply_edits(edits, operation)¶
- Parameters:
edits (
Gio.ListModel) – a [iface`Gio`.ListModel] of [class`Foundry`.TextEdit]operation (
Foundry.OperationorNone) – a [class`Foundry`.Operation]
- Returns:
a [class`Dex`.Future] that resolves to any value or rejects with error.
- Return type:
Applies all of edits to the respective files.
- list_documents()¶
- Returns:
a [iface`Gio`.ListModel] of [class`Foundry`.TextDocument]
- Return type:
- load(file, operation, encoding)¶
- Parameters:
operation (
Foundry.Operation) – an operation for progress
- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.TextDocument].
- Return type:
Loads the file as a text document.
Signal Details¶
- Foundry.TextManager.signals.document_added(text_manager, object, p0)¶
- Signal Name:
document-added- Flags:
- Parameters:
text_manager (
Foundry.TextManager) – The object which received the signalobject (
Gio.File) –p0 (
Foundry.TextDocument) –
- Foundry.TextManager.signals.document_removed(text_manager, object)¶
- Signal Name:
document-removed- Flags:
- Parameters:
text_manager (
Foundry.TextManager) – The object which received the signalobject (
Gio.File) –
- Foundry.TextManager.signals.document_saved(text_manager, document)¶
- Signal Name:
document-saved- Flags:
- Parameters:
text_manager (
Foundry.TextManager) – The object which received the signaldocument (
Foundry.TextDocument) – a [class`Foundry`.TextDocument]
This signal is emitted whenever a [class`Foundry`.TextDocument] managed by the manager emits “saved”.
New in version 1.1.