Skip to content

Latest commit

 

History

History
188 lines (110 loc) · 7.67 KB

class_textservermanager.rst

File metadata and controls

188 lines (110 loc) · 7.67 KB
github_url:hide

TextServerManager

Inherits: :ref:`Object<class_Object>`

A singleton for managing :ref:`TextServer<class_TextServer>` implementations.

.. rst-class:: classref-introduction-group

Description

TextServerManager is the API backend for loading, enumerating, and switching :ref:`TextServer<class_TextServer>`s.

Note: Switching text server at runtime is possible, but will invalidate all fonts and text buffers. Make sure to unload all controls, fonts, and themes before doing so.

.. rst-class:: classref-reftable-group

Methods

void :ref:`add_interface<class_TextServerManager_method_add_interface>` ( :ref:`TextServer<class_TextServer>` interface )
:ref:`TextServer<class_TextServer>` :ref:`find_interface<class_TextServerManager_method_find_interface>` ( :ref:`String<class_String>` name ) |const|
:ref:`TextServer<class_TextServer>` :ref:`get_interface<class_TextServerManager_method_get_interface>` ( :ref:`int<class_int>` idx ) |const|
:ref:`int<class_int>` :ref:`get_interface_count<class_TextServerManager_method_get_interface_count>` ( ) |const|
:ref:`Dictionary[]<class_Dictionary>` :ref:`get_interfaces<class_TextServerManager_method_get_interfaces>` ( ) |const|
:ref:`TextServer<class_TextServer>` :ref:`get_primary_interface<class_TextServerManager_method_get_primary_interface>` ( ) |const|
void :ref:`remove_interface<class_TextServerManager_method_remove_interface>` ( :ref:`TextServer<class_TextServer>` interface )
void :ref:`set_primary_interface<class_TextServerManager_method_set_primary_interface>` ( :ref:`TextServer<class_TextServer>` index )
.. rst-class:: classref-section-separator


.. rst-class:: classref-descriptions-group

Signals

.. rst-class:: classref-signal

interface_added ( :ref:`StringName<class_StringName>` interface_name )

Emitted when a new interface has been added.

.. rst-class:: classref-item-separator


.. rst-class:: classref-signal

interface_removed ( :ref:`StringName<class_StringName>` interface_name )

Emitted when an interface is removed.

.. rst-class:: classref-section-separator


.. rst-class:: classref-descriptions-group

Method Descriptions

.. rst-class:: classref-method

void add_interface ( :ref:`TextServer<class_TextServer>` interface )

Registers a :ref:`TextServer<class_TextServer>` interface.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`TextServer<class_TextServer>` find_interface ( :ref:`String<class_String>` name ) |const|

Finds an interface by its name.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`TextServer<class_TextServer>` get_interface ( :ref:`int<class_int>` idx ) |const|

Returns the interface registered at a given index.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`int<class_int>` get_interface_count ( ) |const|

Returns the number of interfaces currently registered.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`Dictionary[]<class_Dictionary>` get_interfaces ( ) |const|

Returns a list of available interfaces, with the index and name of each interface.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`TextServer<class_TextServer>` get_primary_interface ( ) |const|

Returns the primary :ref:`TextServer<class_TextServer>` interface currently in use.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

void remove_interface ( :ref:`TextServer<class_TextServer>` interface )

Removes an interface. All fonts and shaped text caches should be freed before removing an interface.

.. rst-class:: classref-item-separator


.. rst-class:: classref-method

void set_primary_interface ( :ref:`TextServer<class_TextServer>` index )

Sets the primary :ref:`TextServer<class_TextServer>` interface.