EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
ErrorModal.hpp
Go to the documentation of this file.
1
7
8#ifndef ECHOMAP_ERRORMODAL_HPP
9#define ECHOMAP_ERRORMODAL_HPP
10
11#include <sigc++/slot.h>
12
13#include <string>
14
15#include "IPanel.hpp"
16
17namespace echomap
18{
19
26class ErrorModal final : public IPanel
27{
28 using DismissedCallbackT = sigc::slot<void()>;
29
30public:
37 explicit ErrorModal(
38 std::string_view message,
39 DismissedCallbackT&& dismissed_callback
40 );
41
54 std::string_view new_prefix,
55 const std::runtime_error& exception,
56 DismissedCallbackT&& dismissed_callback
57 );
58
59 void draw() noexcept override;
60
61 [[nodiscard]] const char* get_imgui_name() const noexcept override;
62
63 static const char* get_imgui_stable_name() noexcept;
64
65private:
66 std::string prefix = "An unknown error occurred.";
68 std::string panel_name;
69 DismissedCallbackT dismissed_callback;
70};
71
72} // namespace echomap
73
74#endif // ECHOMAP_ERRORMODAL_HPP
Panel interface specification.
void draw() noexcept override
Draw the panel to the active rendering context.
ErrorModal(std::string_view message, DismissedCallbackT &&dismissed_callback)
Raise the modal given a simple unformatted message.
const char * get_imgui_name() const noexcept override
Retrieves the name of the IPanel for Dear ImGui API functions.
Represents a panel or window on the GUI.
Definition IPanel.hpp:27
The main EchoMap outermost namespace for all non-exported symbols.