API Documentation
Static Public Member Functions | List of all members
nkWinUi::AlignmentUtils Class Referencefinal

Holds static utility functions to interact with the ALIGNMENT enum class values. More...

Static Public Member Functions

static nkMemory::StringView enumToString (ALIGNMENT toConvert)
 
static ALIGNMENT stringToEnum (nkMemory::StringView toConvert)
 

Detailed Description

Holds static utility functions to interact with the ALIGNMENT enum class values.

Member Function Documentation

◆ enumToString()

static nkMemory::StringView nkWinUi::AlignmentUtils::enumToString ( ALIGNMENT  toConvert)
static

Converts an ALIGNMENT value to a string representation. Value range is :

Enum value String value
ALIGNMENT::TOP_LEFT 'TOP_LEFT'
ALIGNMENT::CENTER 'CENTER'
ALIGNMENT::BOTTOM_RIGHT 'BOTTOM_RIGHT'
Parameters
toConvertThe value to convert to a string.
Returns
The value represented as a string.

◆ stringToEnum()

static ALIGNMENT nkWinUi::AlignmentUtils::stringToEnum ( nkMemory::StringView  toConvert)
static

Converts a string to an ALIGNMENT value. Value range is :

String value Enum value
'TOP_LEFT' ALIGNMENT::TOP_LEFT
'CENTER' ALIGNMENT::CENTER
'BOTTOM_RIGHT' / Anything else ALIGNMENT::BOTTOM_RIGHT'
Parameters
toConvertThe string to convert.
Returns
The value of ALIGNMENT the strings translates into. Defaults to ALIGNMENT::BOTTOM_RIGHT if the string has no translation attached.

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