69 template <IsDxlibUpdatable T>
70 void Register(
const std::shared_ptr<T>& gui_ptr,
int priority)
77 RegisterGui(gui_ptr, priority);
81 RegisterClickable(gui_ptr, priority);
85 RegisterDraggable(gui_ptr, priority);
89 RegisterWheelHandler(gui_ptr, priority);
102 void Activate(
const std::shared_ptr<const Mouse>& mouse_ptr);
110 struct Priority final
112 constexpr Priority(
const int p,
const int o) noexcept :
120 bool operator<(
const Priority& other)
const noexcept
122 if (priority == other.priority)
124 return order < other.order;
128 return priority < other.priority;
136 void RegisterGui(
const std::shared_ptr<IDxlibGui> gui_ptr,
int priority);
137 void RegisterClickable(
138 const std::shared_ptr<IDxlibClickable> clickable_ptr,
int priority);
139 void RegisterDraggable(
140 const std::shared_ptr<IDxlibDraggable> draggable_ptr,
int priority);
141 void RegisterWheelHandler(
142 const std::shared_ptr<IDxlibWheelHandler> wheel_handler_ptr,
int priority);
146 void ActivateClickable(
const std::shared_ptr<const Mouse> mouse_ptr);
147 void ActivateDraggable(
const std::shared_ptr<const Mouse> mouse_ptr);
148 void ActivateWheelHandler(
const std::shared_ptr<const Mouse> mouse_ptr);
150 std::map<Priority, std::shared_ptr<IDxlibGui> > gui_ptrs_;
151 std::map<Priority, std::shared_ptr<IDxlibClickable> > clickable_ptrs_;
152 std::map<Priority, std::shared_ptr<IDxlibDraggable> > draggable_ptrs_;
153 std::map<Priority, std::shared_ptr<IDxlibWheelHandler> > wheel_handler_ptrs_;
156 std::optional<Priority> now_dragging_gui_key_{ std::nullopt };
158 bool is_terminal_opened_{
false };