SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL::TextEngine Struct Referenceabstract

A text engine used to create text objects. More...

Inheritance diagram for SDL::TextEngine:
[legend]

Public Member Functions

constexpr TextEngine (TextEngineRaw resource) noexcept
 Constructs from raw TextEngine.
constexpr TextEngine (const TextEngine &other)=delete
 Copy constructor.
constexpr TextEngine (TextEngine &&other) noexcept
 Move constructor.
virtual ~TextEngine ()
 Destructor.
constexpr TextEngineoperator= (TextEngine &&other) noexcept
 Assignment operator.
TextEngineoperator= (const TextEngine &other)=delete
 Assignment operator.
virtual void Destroy ()=0
 frees up textEngine. Pure virtual
Text CreateText (FontRef font, std::string_view text)
 Create a text object from UTF-8 text and a text engine.
constexpr ResourceBase (RawPointer resource)
 Constructs from resource pointer.
constexpr ResourceBase (std::nullptr_t=nullptr)
 Constructs null/invalid.
Public Member Functions inherited from SDL::ResourceBase< TextEngineRaw >
constexpr ResourceBase (RawPointer resource)
 Constructs from resource pointer.
constexpr operator bool () const
 Converts to bool.
constexpr auto operator<=> (const ResourceBase &other) const=default
 Comparison.
constexpr RawConstPointer operator-> () const noexcept
 member access to underlying resource pointer.
constexpr RawPointer get () const noexcept
 Retrieves underlying resource pointer.
constexpr RawPointer release () noexcept
 Retrieves underlying resource pointer and clear this.

Additional Inherited Members

Public Types inherited from SDL::ResourceBase< TextEngineRaw >
using RawPointer
 The underlying raw pointer type.
using RawConstPointer
 The underlying const raw pointer type.

Detailed Description

A text engine used to create text objects.

This is a public interface that can be used by applications and libraries to perform customize rendering with text objects. See <SDL3_ttf/SDL_textengine.h> for details.

There are three text engines provided with the library:

Since
This struct is available since SDL_ttf 3.0.0.
Category:
Resource

Constructor & Destructor Documentation

◆ TextEngine()

SDL::TextEngine::TextEngine ( TextEngineRaw resource)
inlineexplicitconstexprnoexcept

Constructs from raw TextEngine.

Parameters
resourcea TextEngineRaw to be wrapped.

This assumes the ownership, call release() if you need to take back.

Member Function Documentation

◆ Destroy()

virtual void SDL::TextEngine::Destroy ( )
pure virtual

frees up textEngine. Pure virtual

Implemented in SDL::GPUTextEngine, SDL::RendererTextEngine, and SDL::SurfaceTextEngine.


The documentation for this struct was generated from the following file: