HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
TTauriIcons.hpp
1// Copyright 2020 Pokitec
2// All rights reserved.
3
4#pragma once
5
6#include "TTauri/Text/FontID.hpp"
7#include "TTauri/Text/FontGlyphIDs.hpp"
8#include "TTauri/Text/FontBook.hpp"
9
10namespace tt {
11
12inline FontID TTauriIcons_font_id = FontID{};
13
14enum class TTauriIcon : char32_t {
15 MinimizeWindow = 0xf301,
16 MaximizeWindowMS = 0xf302,
17 RestoreWindowMS = 0xf303,
18 CloseWindow = 0xf304,
19 RestoreWindowMacOS = 0xf305,
20 MaximizeWindowMacOS = 0xf306,
21};
22
23inline FontGlyphIDs to_FontGlyphIDs(TTauriIcon rhs) noexcept {
24 tt_assume(TTauriIcons_font_id);
25 tt_assume(fontBook);
26
27 return fontBook->find_glyph(TTauriIcons_font_id, Grapheme{static_cast<char32_t>(rhs)});
28}
29
30
31
32}
FontGlyphIDs find_glyph(FontID font_id, Grapheme grapheme) const noexcept
Find a glyph using the given code-point.