HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
ttauri
l10n.hpp
1
// Copyright Take Vos 2020.
2
// Distributed under the Boost Software License, Version 1.0.
3
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5
#pragma once
6
7
namespace
tt {
8
12
class
l10n
{
13
public
:
14
l10n
() noexcept : msgid() {}
15
l10n
(
l10n
const
&)
noexcept
=
default
;
16
l10n
(
l10n
&&)
noexcept
=
default
;
17
l10n
&operator=(
l10n
const
&)
noexcept
=
default
;
18
l10n
&operator=(
l10n
&&)
noexcept
=
default
;
19
20
[[nodiscard]]
operator
bool()
const
noexcept
21
{
22
return
!msgid.
empty
();
23
}
24
25
l10n
(std::u8string_view msgid) noexcept : msgid(msgid) {}
26
l10n
(std::string_view msgid)
noexcept
27
{
28
this->msgid = std::u8string(
reinterpret_cast<
char8_t
const
*
>
(msgid.data()), msgid.size());
29
}
30
31
private
:
32
std::u8string msgid;
33
34
friend
class
label
;
35
};
36
37
}
tt::l10n
A localizable string.
Definition
l10n.hpp:12
tt::label
A localized text + icon label.
Definition
label.hpp:76
std::basic_string::empty
T empty(T... args)
Generated on Mon Apr 22 2024 12:53:42 for HikoGUI by
1.10.0