TextServerManager

package
v0.0.0-...-c858641 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

graphics.gd/classdb/TextServerManager is the API backend for loading, enumerating, and switching [graphics.gd/classdb/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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddInterface

func AddInterface(intf TextServer.Instance)

Registers a graphics.gd/classdb/TextServer interface.

func Advanced

func Advanced() class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

func FindInterface

func FindInterface(name string) TextServer.Instance

Finds an interface by its 'name'.

func GetInterface

func GetInterface(idx int) TextServer.Instance

Returns the interface registered at a given index.

func GetInterfaceCount

func GetInterfaceCount() int

Returns the number of interfaces currently registered.

func GetInterfaces

func GetInterfaces() []map[int]string

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

func GetPrimaryInterface

func GetPrimaryInterface() TextServer.Instance

Returns the primary graphics.gd/classdb/TextServer interface currently in use.

func OnInterfaceAdded

func OnInterfaceAdded(cb func(interface_name string), flags ...Signal.Flags)

func OnInterfaceRemoved

func OnInterfaceRemoved(cb func(interface_name string), flags ...Signal.Flags)

func RemoveInterface

func RemoveInterface(intf TextServer.Instance)

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

func SetPrimaryInterface

func SetPrimaryInterface(index TextServer.Instance)

Sets the primary graphics.gd/classdb/TextServer interface.

Types

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.TextServerManager

Instance of the class with convieniently typed arguments and results.

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) ID

func (self Instance) ID() ID

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL