7#include "tab_delegate.hpp"
8#include "../observable.hpp"
12#include <unordered_map>
14namespace hi::inline v1 {
26 _value_cbt = this->value.subscribe([&](
auto...) {
33 hi_axiom(not tab_indices.contains(key));
34 tab_indices[key] = index;
39 auto it = tab_indices.
find(*value);
40 if (it == tab_indices.
end()) {
43 return static_cast<ssize_t>(it->second);
48 typename decltype(value)::token_type _value_cbt;
51template<
typename Value>
54template<
typename Value>
57 using value_type = observable_argument_t<std::remove_cvref_t<Value>>;
58 return std::make_unique<default_tab_delegate<value_type>>(std::forward<Value>(value));
#define hi_forward(x)
Forward a value, based on the decltype of the value.
Definition required.hpp:29
An observable value.
Definition observable.hpp:359
Definition default_tab_delegate.hpp:17
Definition tab_delegate.hpp:13
A graphical element that shows only one of a predefined set of mutually exclusive child widgets.
Definition tab_widget.hpp:32