HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
keyboard_focus_group.hpp
1// Copyright Take Vos 2021.
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
7namespace hi::inline v1 {
8
11enum class keyboard_focus_group {
15 normal = 1,
16
20 menu = 2,
21
26 toolbar = 4,
27
30 mouse = 8,
31
36 all = normal | menu | toolbar | mouse,
37};
38
39[[nodiscard]] constexpr keyboard_focus_group operator&(keyboard_focus_group const &lhs, keyboard_focus_group const &rhs) noexcept
40{
41 return static_cast<keyboard_focus_group>(to_underlying(lhs) & to_underlying(rhs));
42}
43
44[[nodiscard]] constexpr keyboard_focus_group operator|(keyboard_focus_group const &lhs, keyboard_focus_group const &rhs) noexcept
45{
46 return static_cast<keyboard_focus_group>(to_underlying(lhs) | to_underlying(rhs));
47}
48
49[[nodiscard]] constexpr bool any(keyboard_focus_group group) noexcept
50{
51 return to_bool(to_underlying(group));
52}
53
54} // namespace hi::inline v1
constexpr alignment operator|(horizontal_alignment lhs, vertical_alignment rhs) noexcept
Combine vertical and horizontal alignment.
Definition alignment.hpp:200