TTF_SubStringFlags(3type)

✨ TTF_SubStringFlags ✨

okay bestie, welcome to the TTF_SubStringFlags page from the SDL_ttf3 datatypes era πŸ’– this is a lil type page, not a function page, so buckle up for flags and vibes only.

🌸 NAME 🌸

TTF_SubStringFlags β€” the flags for TTF_SubString πŸŽ€


πŸ¦‹ HEADER FILE πŸ¦‹

Defined in SDL3_ttf/SDL_ttf.h β€” that's where you go to find it, no cap.


✨ SYNOPSIS ✨

#include "SDL3_ttf/SDL_ttf.h"

typedef Uint32 TTF_SubStringFlags;

#define TTF_SUBSTRING_DIRECTION_MASK    0x000000FF  /**< The mask for the flow direction for this substring */
#define TTF_SUBSTRING_TEXT_START        0x00000100  /**< This substring contains the beginning of the text */
#define TTF_SUBSTRING_LINE_START        0x00000200  /**< This substring contains the beginning of line `line_index` */
#define TTF_SUBSTRING_LINE_END          0x00000400  /**< This substring contains the end of line `line_index` */
#define TTF_SUBSTRING_TEXT_END          0x00000800  /**< This substring contains the end of the text */

so it's literally just a Uint32 wearing a fancy name πŸ’… and then a whole lil squad of #defines living inside it. let's meet them one by one, they're all icons:

  • TTF_SUBSTRING_DIRECTION_MASK β€” 0x000000FF β€” the mask for the flow direction for this substring 🧭 (iykyk, you mask the direction bits out of the flags)
  • TTF_SUBSTRING_TEXT_START β€” 0x00000100 β€” this substring contains the beginning of the text πŸŒ…
  • TTF_SUBSTRING_LINE_START β€” 0x00000200 β€” this substring contains the beginning of line line_index πŸ“
  • TTF_SUBSTRING_LINE_END β€” 0x00000400 β€” this substring contains the end of line line_index 🏁
  • TTF_SUBSTRING_TEXT_END β€” 0x00000800 β€” this substring contains the end of the text πŸŒ‡
not me staring at these hex values like they're a mood ring. they're not, bestie, they're bit flags. do not freestyle them. πŸ™ˆ

πŸ’œ AVAILABILITY πŸ’œ

this datatype has been available since SDL_ttf 3.0.0 ⭐ so if you're on anything older, that's a no from her.


πŸ‘‘ SEE ALSO πŸ‘‘

like, go read TTF_SubString(3type) next, it's the main character this whole flag situation is serving 🫢


and that's the whole page, bestie!! written by the SDL_ttf girlies, version SDL_ttf 3.2.2, for TTF_SubStringFlags(3type) β€” slay, ate, no crumbs, periodt πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from