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
32 all = normal | menu | toolbar,
33};
34
35[[nodiscard]] constexpr keyboard_focus_group operator&(keyboard_focus_group const &lhs, keyboard_focus_group const &rhs) noexcept
36{
37 return static_cast<keyboard_focus_group>(to_underlying(lhs) & to_underlying(rhs));
38}
39
40[[nodiscard]] constexpr keyboard_focus_group operator|(keyboard_focus_group const &lhs, keyboard_focus_group const &rhs) noexcept
41{
42 return static_cast<keyboard_focus_group>(to_underlying(lhs) | to_underlying(rhs));
43}
44
45[[nodiscard]] constexpr bool any(keyboard_focus_group group) noexcept
46{
47 return static_cast<bool>(to_underlying(group));
48}
49
50} // namespace hi::inline v1
constexpr alignment operator|(horizontal_alignment lhs, vertical_alignment rhs) noexcept
Combine vertical and horizontal alignment.
Definition alignment.hpp:200