EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
IPanel.hpp
Go to the documentation of this file.
1
7
8#ifndef ECHOMAP_PANEL_HPP
9#define ECHOMAP_PANEL_HPP
10
11#include <webgpu/webgpu_cpp.h>
12// ReSharper disable once CppUnusedIncludeDirective - False positive. Required for flags.
13#include <implot.h>
14
15namespace echomap
16{
17
18class Project;
19
26class IPanel
27{
28public:
29 virtual ~IPanel() = default;
30
34 virtual void draw() noexcept = 0;
35
41 [[nodiscard]] virtual const char* get_imgui_name() const noexcept = 0;
42
48 virtual void update_gpu(
49 const wgpu::CommandEncoder& command_encoder
50 )
51 {
52 std::ignore = command_encoder;
53 }
54
55protected:
56 constexpr static ImVec2 button_size{80.0f, 20.0f};
57
58 // NOLINTBEGIN(*-signed-bitwise) - Intended ImGui API usage.
59 static constexpr auto table_flags =
60 ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg;
61 // NOLINTEND(*-signed-bitwise)
62};
63
64} // namespace echomap
65
66#endif // ECHOMAP_PANEL_HPP
Represents a panel or window on the GUI.
Definition IPanel.hpp:27
virtual void draw() noexcept=0
Draw the panel to the active rendering context.
virtual const char * get_imgui_name() const noexcept=0
Retrieves the name of the IPanel for Dear ImGui API functions.
virtual void update_gpu(const wgpu::CommandEncoder &command_encoder)
Delegate work to the GPU via the WebGPU platform.
Definition IPanel.hpp:48
The main EchoMap outermost namespace for all non-exported symbols.