EchoMap
2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Toggle main menu visibility
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
17
namespace
echomap
18
{
19
26
class
ErrorModal
final :
public
IPanel
27
{
28
using
DismissedCallbackT = sigc::slot<void()>;
29
30
public
:
37
explicit
ErrorModal
(
38
std::string_view
message,
39
DismissedCallbackT&& dismissed_callback
40
);
41
53
ErrorModal
(
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
65
private
:
66
std::string
prefix =
"An unknown error occurred."
;
67
std::optional<std::string>
detail;
68
std::string
panel_name;
69
DismissedCallbackT dismissed_callback;
70
};
71
72
}
// namespace echomap
73
74
#endif
// ECHOMAP_ERRORMODAL_HPP
IPanel.hpp
Panel interface specification.
std::string
std::string_view
echomap::ErrorModal::draw
void draw() noexcept override
Draw the panel to the active rendering context.
Definition
ErrorModal.cpp:49
echomap::ErrorModal::ErrorModal
ErrorModal(std::string_view message, DismissedCallbackT &&dismissed_callback)
Raise the modal given a simple unformatted message.
Definition
ErrorModal.cpp:17
echomap::ErrorModal::get_imgui_name
const char * get_imgui_name() const noexcept override
Retrieves the name of the IPanel for Dear ImGui API functions.
Definition
ErrorModal.cpp:70
echomap::IPanel
Represents a panel or window on the GUI.
Definition
IPanel.hpp:27
echomap
The main EchoMap outermost namespace for all non-exported symbols.
Definition
ActionController.hpp:20
std::optional
std::runtime_error
string
src
panels
ErrorModal.hpp
Generated by
1.17.0