MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ event()

InspectResult MayaFlux::Portal::Forma::Inspector::event ( const std::shared_ptr< Vruta::Event > &  ev,
std::string_view  name,
Surface &  surface,
LayoutCursor &  cursor,
float  x_min = -0.95F,
float  x_max = 0.95F,
float  row_h = 0.05F 
)

Inspect a single Event by name and pointer.

Header is the event's registered name, or "(unnamed)" if empty. Body rows expose token and active state.

Definition at line 10 of file EventQuery.cpp.

16{
17 const std::string header_label = name.empty() ? "(unnamed)" : std::string(name);
18
19 std::vector<EntrySpec> entrys {
20 EntrySpec {
21 .label = "token",
22 .reader = [ev] {
23 return std::string(Reflect::enum_to_string(ev->get_processing_token()));
24 },
25 },
26 EntrySpec {
27 .label = "active",
28 .reader = [ev] { return ev->is_active() ? "true" : "false"; },
29 },
30 };
31
32 auto hbuf = make_header_buffer(surface.window());
33 auto rbufs = make_row_buffers(surface.window(), entrys.size());
34
35 auto group = make_entry_group(entrys, header_label, std::move(hbuf), rbufs,
36 surface, cursor, x_min, x_max, row_h, false);
37
38 InspectResult result;
39 result.group = std::move(group);
40 return result;
41}
std::string name
Definition VKDevice.cpp:123
std::shared_ptr< Buffers::FormaBuffer > make_header_buffer(const std::shared_ptr< Core::Window > &window) const
A "text"-slotted buffer, registered with the BufferManager.
Definition Inspector.cpp:11
std::vector< EntryBuffer > make_row_buffers(const std::shared_ptr< Core::Window > &window, size_t count) const
count row targets, slices of one "text"-slotted buffer, for make_entry_group's rows.
Definition Inspector.cpp:24
EntryGroup make_entry_group(std::span< const EntrySpec > entrys, std::string_view header_label, FormaTarget header_buf, std::span< const EntryBuffer > row_bufs, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, bool initially_open)
Construct a collapsible header followed by N entry rows under it.
Definition Entry.cpp:104
constexpr std::string_view enum_to_string(EnumType value) noexcept
Universal enum to string converter using magic_enum (original case)

References MayaFlux::Reflect::enum_to_string(), MayaFlux::Portal::Forma::InspectResult::group, MayaFlux::Portal::Forma::EntrySpec::label, MayaFlux::Portal::Forma::make_entry_group(), make_header_buffer(), make_row_buffers(), name, and MayaFlux::Portal::Forma::Surface::window().

Referenced by MayaFlux::Portal::Forma::inspect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: