TextServerManager
继承: Object
A singleton for managing TextServer
implementations.
描述
TextServerManager is the API backend for loading, enumerating, and switching 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.
方法
void | add_interface ( interface: TextServer ) |
TextServer | find_interface ( name: String ) const1 |
TextServer | get_interface ( idx: int ) const1 |
int | get_interface_count ( ) const1 |
Array Dictionary | get_interfaces ( ) const1 |
TextServer | get_primary_interface ( ) const1 |
void | remove_interface ( interface: TextServer ) |
void | set_primary_interface ( index: TextServer ) |
信号
interface_added ( interface_name: StringName
)
Emitted when a new interface has been added.
interface_removed ( interface_name: StringName
)
Emitted when an interface is removed.
方法说明
void
add_interface ( interface: TextServer
)
Registers a TextServer
interface.
TextServer
find_interface ( name: String
) const1
Finds an interface by its name
.
TextServer
get_interface ( idx: int
) const1
Returns the interface registered at a given index.
int
get_interface_count ( ) const1
Returns the number of interfaces currently registered.
Array Dictionary
get_interfaces ( ) const1
Returns a list of available interfaces, with the index and name of each interface.
TextServer
get_primary_interface ( ) const1
Returns the primary TextServer
interface currently in use.
void
remove_interface ( interface: TextServer
)
Removes an interface. All fonts and shaped text caches should be freed before removing an interface.
void
set_primary_interface ( index: TextServer
)
Sets the primary TextServer
interface.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。