EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
MapSourcesModal.hpp
Go to the documentation of this file.
1
9
10#ifndef ECHOMAP_INDIVIDUALUPLOADMODAL_HPP
11#define ECHOMAP_INDIVIDUALUPLOADMODAL_HPP
12
13#include <filesystem>
14#include <string>
15
16#include "IWebPanel.hpp"
17
18namespace echomap
19{
20
21class EchoMap;
22class SignalFactory;
23
24template <class Range>
26 std::ranges::input_range<Range> && std::convertible_to<std::ranges::range_reference_t<Range>, SignalFactory*>;
27
34class MapSourcesModal final : public IWebPanel
35{
36public:
37 explicit MapSourcesModal(
38 EchoMap* app,
39 const PartialProject* project
40 );
41
42 void draw() noexcept override;
43
44 [[nodiscard]] const char* get_imgui_name() const noexcept override;
45
46 void reshow() noexcept;
47
56 void change_active_project(const PartialProject* new_project) override;
57
58 static const char* get_imgui_stable_name() noexcept;
59
60private:
61 constexpr static ImVec2 upload_button_frame_padding{0.0f, 0.0f};
62 constexpr static ImVec2 default_modal_size{500.0f, 300.0f};
63
64 void draw_preamble() const noexcept;
65
66 bool draw_table_entry(
67 const std::filesystem::path& external_path,
69 SignalFactoryRange auto&& factories
70 ) const noexcept;
71
72 void draw_buttons(bool are_all_mapped);
73
74 std::string panel_name;
75 EchoMap* app;
76 const PartialProject* project;
77 bool should_open = true;
78};
79
80} // namespace echomap
81
82#endif // ECHOMAP_INDIVIDUALUPLOADMODAL_HPP
IWebPanel specification.
The EchoMap maintains state for the application including WebGPU and Dear ImGui context,...
Definition EchoMap.hpp:35
An IPanel which can receive updates to the application-wide unloaded PartialProject.
Definition IWebPanel.hpp:26
void draw() noexcept override
Draw the panel to the active rendering context.
void change_active_project(const PartialProject *new_project) override
Do nothing.
const char * get_imgui_name() const noexcept override
Retrieves the name of the IPanel for Dear ImGui API functions.
A Project with semantics for expressing an incomplete set of owned Signal objects.
Provides various convenience functions for constructing Signal objects in exotic ways.
The main EchoMap outermost namespace for all non-exported symbols.