-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProjectSelectorForFile.cpp
70 lines (59 loc) · 1.28 KB
/
ProjectSelectorForFile.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include "ProjectSelectorForFile.hpp"
namespace wayround_i2p::ccedit
{
ProjectSelectorForFile_shared ProjectSelectorForFile::create(
std::deque<std::string> names,
std::filesystem::path pth
)
{
auto ret = ProjectSelectorForFile_shared();
ret->own_ptr = ret;
return ret;
}
ProjectSelectorForFile::ProjectSelectorForFile(
std::deque<std::string> names,
std::filesystem::path pth
) :
destroyer(
[this]()
{
win.destroy();
own_ptr.reset();
}
),
names(names),
pth(pth)
{
win.signal_destroy().connect(
[this]()
{ on_destroy_sig(); }
);
win.signal_close_request().connect(
[this]() -> bool
{ return on_signal_close_request(); },
true
);
}
ProjectSelectorForFile::~ProjectSelectorForFile()
{
}
void ProjectSelectorForFile::show()
{
win.present();
}
void ProjectSelectorForFile::destroy()
{
destroyer.run();
}
void ProjectSelectorForFile::on_destroy_sig()
{
std::cout << "FindFile::on_destroy_sig()" << std::endl;
destroyer.run();
}
bool ProjectSelectorForFile::on_signal_close_request()
{
std::cout << "FindFile::on_signal_close_request()" << std::endl;
destroyer.run();
return false;
}
} // namespace wayround_i2p::ccedit