EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
echomap::MenuPanel Class Referencefinal
Inheritance diagram for echomap::MenuPanel:
[legend]

Public Member Functions

void draw () noexcept override
 Draw the panel to the active rendering context.
const char * get_imgui_name () const noexcept override
 Retrieves the name of the IPanel for Dear ImGui API functions.
void change_active_project (const Project *new_project) override
 Updates the active Project being described by the IPanel.
Public Member Functions inherited from echomap::IPanel
virtual void update_gpu (const wgpu::CommandEncoder &command_encoder)
 Delegate work to the GPU via the WebGPU platform.

Private Attributes

std::string panel_name = "Menu"

Additional Inherited Members

Static Protected Attributes inherited from echomap::IPanel
static constexpr ImVec2 button_size {80.0f, 20.0f}
static constexpr auto table_flags

Detailed Description

Definition at line 15 of file MenuPanel.hpp.

Member Function Documentation

◆ change_active_project()

void echomap::MenuPanel::change_active_project ( const Project * new_project)
overridevirtual

Updates the active Project being described by the IPanel.

Parameters
new_projectAn observing pointer to the new active Project.

Implements echomap::IProjectPanel.

Definition at line 67 of file MenuPanel.cpp.

70{
71 std::ignore = new_project;
72}

◆ draw()

void echomap::MenuPanel::draw ( )
overridevirtualnoexcept

Draw the panel to the active rendering context.

Implements echomap::IPanel.

Definition at line 14 of file MenuPanel.cpp.

15{
16 if (ImGui::BeginMainMenuBar()) {
17 if (ImGui::BeginMenu("File")) {
18 ImGui::MenuItem("New Project");
19 if (ImGui::BeginMenu("Open Project")) {
20
21
22 if (ImGui::MenuItem("... from filesystem"))
24
25 if (ImGui::BeginMenu("... from example repository")) {
26 ImGui::MenuItem("Example 1", nullptr, false, false);
27 ImGui::MenuItem("Example 2", nullptr, false, false);
28 ImGui::MenuItem("Example 3", nullptr, false, false);
29 ImGui::EndMenu();
30 }
31 ImGui::EndMenu();
32 }
33 ImGui::MenuItem("Export Project", nullptr, false, false);
34
35 ImGui::Separator();
36 ImGui::MenuItem("Import Signal", nullptr, false, false);
37 ImGui::MenuItem("Import Sensor Metadata", nullptr, false, false);
38
39 ImGui::EndMenu();
40 }
41
42 if (ImGui::BeginMenu("Control")) {
43 ImGui::MenuItem("Start localisation", nullptr, false, false);
44 ImGui::MenuItem("Stop localisation", nullptr, false, false);
45
46 ImGui::Separator();
47 ImGui::MenuItem("Configure Algorithm Parameters");
48 ImGui::EndMenu();
49 }
50
51 if (ImGui::BeginMenu("Help")) {
52 ImGui::MenuItem("Application Logs");
53 ImGui::MenuItem("Platform Information");
54 ImGui::MenuItem("About");
55 ImGui::EndMenu();
56 }
57
58 ImGui::EndMainMenuBar();
59 }
60}

◆ get_imgui_name()

const char * echomap::MenuPanel::get_imgui_name ( ) const
nodiscardoverridevirtualnoexcept

Retrieves the name of the IPanel for Dear ImGui API functions.

Returns
The human-readable name of the window as a NULL-terminated C string.

Implements echomap::IPanel.

Definition at line 62 of file MenuPanel.cpp.

63{
64 return panel_name.c_str();
65}

Member Data Documentation

◆ panel_name

std::string echomap::MenuPanel::panel_name = "Menu"
private

Definition at line 25 of file MenuPanel.hpp.


The documentation for this class was generated from the following files: