14#include <lagrange/ui/api.h>
15#include <lagrange/ui/Entity.h>
16#include <lagrange/ui/components/Selection.h>
17#include <lagrange/ui/components/SelectionContext.h>
25LA_UI_API
bool deselect_all(Registry& registry);
26LA_UI_API
bool dehover_all(Registry& registry);
29inline bool is_selected(
const Registry& registry, Entity e)
31 return registry.all_of<Selected>(e);
34inline bool is_hovered(
const Registry& registry, Entity e)
36 return registry.all_of<Hovered>(e);
39inline decltype(
auto) selected_view(Registry& registry)
41 return registry.view<Selected>();
44inline decltype(
auto) hovered_view(Registry& registry)
46 return registry.view<Hovered>();
49LA_UI_API
bool is_child_selected(
const Registry& registry, Entity e,
bool recursive =
true);
50LA_UI_API
bool is_child_hovered(
const Registry& registry, Entity e,
bool recursive =
true);
53LA_UI_API std::vector<Entity> collect_selected(
const Registry& registry);
54LA_UI_API std::vector<Entity> collect_hovered(
const Registry& registry);
57LA_UI_API
bool set_selected(
60 SelectionBehavior behavior = SelectionBehavior::SET);
62LA_UI_API
bool set_hovered(Registry& registry, Entity e, SelectionBehavior behavior = SelectionBehavior::SET);
64LA_UI_API
bool select(Registry& registry, Entity e);
66LA_UI_API
bool deselect(Registry& registry, Entity e);
68LA_UI_API
bool hover(Registry& registry, Entity e);
70LA_UI_API
bool dehover(Registry& registry, Entity e);
73LA_UI_API SelectionContext& get_selection_context(Registry& r);
75LA_UI_API
const SelectionContext& get_selection_context(
const Registry& r);
79LA_UI_API SelectionBehavior selection_behavior(
const Keybinds& keybinds);
80LA_UI_API
bool are_selection_keys_down(
const Keybinds& keybinds);
81LA_UI_API
bool are_selection_keys_pressed(
const Keybinds& keybinds);
82LA_UI_API
bool are_selection_keys_released(
const Keybinds& keybinds);
85LA_UI_API SelectionBehavior selection_behavior(
const Registry& r);
86LA_UI_API
bool are_selection_keys_down(
const Registry& r);
87LA_UI_API
bool are_selection_keys_pressed(
const Registry& r);
88LA_UI_API
bool are_selection_keys_released(
const Registry& r);
Lagrange UI Viewer and mini 3D engine.
Definition: AcceleratedPicking.h:22
Main namespace for Lagrange.
Definition: AABBIGL.h:30