Foundry.TemplateManager

g Foundry.TemplateManager Foundry.TemplateManager GObject.Object GObject.Object GObject.Object->Foundry.TemplateManager

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

find_template (context, template_id)

list_code_templates (context)

list_project_templates ()

list_templates (context)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Foundry.TemplateManager(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Foundry.TemplateManagerClass

classmethod new()
Return type:

Foundry.TemplateManager

find_template(context, template_id)
Parameters:
Returns:

a [class`Dex`.Future] that resolves to a [class`Foundry`.Template] or rejects with error.

Return type:

Dex.Future

list_code_templates(context)
Parameters:

context (Foundry.Context or None) – a [class`Foundry`.Context] or None

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.CodeTemplate]

Return type:

Dex.Future

Queries all [class`Foundry`.TemplateProvider] for available [class`Foundry`.CodeTemplate].

The resulting module may not be fully populated by all providers by time it resolves. You may await the completion of all providers by awaiting [func`Foundry`.list_model_await] for the completion of all providers.

This allows the consumer to get a dynamically populating list model for user interfaces without delay.

list_project_templates()
Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.ProjectTemplate]

Return type:

Dex.Future

Queries all [class`Foundry`.TemplateProvider] for available [class`Foundry`.ProjectTemplate].

The resulting module may not be fully populated by all providers by time it resolves. You may await the completion of all providers by awaiting [func`Foundry`.list_model_await] for the completion of all providers.

This allows the consumer to get a dynamically populating list model for user interfaces without delay.

list_templates(context)
Parameters:

context (Foundry.Context or None) – a [class`Foundry`.Context] or None

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.Template].

Return type:

Dex.Future