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
FileChooser.hpp
Go to the documentation of this file.
1
9
10
#ifndef ECHOMAP_FILECHOOSER_HPP
11
#define ECHOMAP_FILECHOOSER_HPP
12
13
#if !defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
14
15
#include <sigc++/slot.h>
16
17
#include <
filesystem
>
18
19
#include "
../../notifications/native/RaiseFileChooserNotification.hpp
"
20
#include "
../IProjectPanel.hpp
"
21
#include "
FilesystemCombo.hpp
"
22
23
namespace
echomap
24
{
25
26
class
EchoMap
;
27
31
class
FileChooser
:
public
IProjectPanel
32
{
33
public
:
41
explicit
FileChooser
(
42
EchoMap
* app,
43
RaiseFileChooserNotification::SuccessCallbackT&& success_callback,
44
RaiseFileChooserNotification::CancelledCallbackT&& cancelled_callback
45
);
46
47
void
draw
()
noexcept
override
;
48
49
[[nodiscard]]
const
char
*
get_imgui_name
()
const
noexcept
override
;
50
51
void
change_active_project
(
const
Project
* new_project)
override
;
52
53
static
const
char
* get_imgui_stable_name()
noexcept
;
54
55
private
:
56
constexpr
static
ImVec2 default_modal_size{500.0f, 0.0f};
57
58
std::filesystem::path
expected_extension =
".json"
;
59
std::filesystem::path
chosen_path;
60
FilesystemCombo
file_combo;
61
62
std::string
panel_name;
63
bool
is_open =
false
;
64
EchoMap
* app;
65
RaiseFileChooserNotification::SuccessCallbackT success_callback;
66
RaiseFileChooserNotification::CancelledCallbackT cancelled_callback;
67
};
68
69
}
// namespace echomap
70
71
#endif
// __EMSCRIPTEN__
72
73
#endif
// ECHOMAP_FILECHOOSER_HPP
FilesystemCombo.hpp
FilesystemCombo specification.
IProjectPanel.hpp
IProjectPanel specification.
RaiseFileChooserNotification.hpp
RaiseFileChooserNotification specification.
std::string
echomap::EchoMap
The EchoMap maintains state for the application including WebGPU and Dear ImGui context,...
Definition
EchoMap.hpp:35
echomap::FileChooser::change_active_project
void change_active_project(const Project *new_project) override
Updates the active Project being described by the IPanel.
Definition
FileChooser.cpp:76
echomap::FileChooser::FileChooser
FileChooser(EchoMap *app, RaiseFileChooserNotification::SuccessCallbackT &&success_callback, RaiseFileChooserNotification::CancelledCallbackT &&cancelled_callback)
Create a new FileChooser modal for the given EchoMap instance.
Definition
FileChooser.cpp:19
echomap::FileChooser::draw
void draw() noexcept override
Draw the panel to the active rendering context.
Definition
FileChooser.cpp:32
echomap::FileChooser::get_imgui_name
const char * get_imgui_name() const noexcept override
Retrieves the name of the IPanel for Dear ImGui API functions.
Definition
FileChooser.cpp:71
echomap::FilesystemCombo
Provides a platform-independent Dear ImGui combo box for browsing the file-system and selecting files...
Definition
FilesystemCombo.hpp:32
echomap::IProjectPanel
An IPanel which can receive updates to the application-wide active Project.
Definition
IProjectPanel.hpp:24
echomap::Project
Definition
Project.hpp:26
filesystem
echomap
The main EchoMap outermost namespace for all non-exported symbols.
Definition
ActionController.hpp:20
std::filesystem::path
src
panels
native
FileChooser.hpp
Generated by
1.17.0