HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
font_id.hpp
1// Distributed under the Boost Software License, Version 1.0.
2// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
3
4#pragma once
5
6#include "../utility/utility.hpp"
7#include "../macros.hpp"
8#include <cstdint>
9#include <compare>
10#include <limits>
11
12hi_export_module(hikogui.font : font_id);
13
14hi_export namespace hi {
15inline namespace v1 {
16
17class font;
18
23class font_id : public tagged_id<font_id, uint32_t, std::numeric_limits<uint32_t>::max()> {
24public:
25 using super = tagged_id<font_id, uint32_t, std::numeric_limits<uint32_t>::max()>;
26 using super::super;
27
32 [[nodiscard]] font *operator->() const;
33};
34
35} // namespace v1
36}
37
38template<>
39struct std::hash<hi::font_id> {
40 [[nodiscard]] size_t operator()(hi::font_id rhs) const noexcept
41 {
43 }
44};
The HikoGUI namespace.
Definition array_generic.hpp:21
The HikoGUI API version 1.
Definition array_generic.hpp:22
@ font
A font or font-size has changed.
Definition style_modify_mask.hpp:47
An identifier for a font-family that was registered with HikoGUI.
Definition font_id.hpp:23
font * operator->() const
Dereference to a font-object.
Definition font_book.hpp:386
T operator()(T... args)