struct EE::UI::UIDirectionHelper

Overview

#include <uidirection.hpp>

struct UIDirectionHelper {
    // methods

    static UIDirectionValue fromString(std::string_view str);
    static std::string toString(UIDirectionValue direction);
    static std::string toString(UIDirection direction);
    static UIDirection fromLocale(std::string_view locale);
};

Detailed Documentation

Methods

static UIDirectionValue fromString(std::string_view str)

Parses “ltr”, “rtl”, “inherit” and “auto” (treated as inherit). Defaults to Inherit.

static UIDirection fromLocale(std::string_view locale)

Returns:

The conventional UI direction of a BCP 47 / POSIX locale name, such as “ar”, “he_IL”, “fa-IR” or “ur.UTF-8”. Unknown locales resolve to left-to-right. This helper does not change any widget: applications decide when locale changes should update direction.