-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProjectMgr.hpp
97 lines (66 loc) · 2.09 KB
/
ProjectMgr.hpp
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef WAYROUND_I2P_20241210_171354_648725
#define WAYROUND_I2P_20241210_171354_648725
#include <memory>
#include <gtkmm.h>
#include "forward_declarations.hpp"
#include "utils.hpp"
namespace wayround_i2p::ccedit
{
class ProjectMgr
{
public:
static ProjectMgr_shared create(Controller_shared controller);
protected:
ProjectMgr(Controller_shared controller);
public:
~ProjectMgr();
Controller_shared getController();
void show();
void destroy();
Gtk::Window *getWindowPtr();
Gtk::Window &getWindowRef();
private:
ProjectMgr_shared own_ptr;
RunOnce destroyer;
// controller should not possibly be destroyed before any other window
// of ccedit, so it is always shared inside of ccedit windows
Controller_shared controller;
Gtk::Window win;
Gtk::ScrolledWindow project_list_sw;
Gtk::ColumnView project_list_view;
Glib::RefPtr<Gtk::MultiSelection>
project_list_view_selection;
Gtk::Box main_box;
Gtk::Box button_box;
Gtk::Box button_box_separator;
// todo: better names for buttons
Gtk::Box bb1;
Gtk::Button btn_add_proj;
Gtk::Button btn_rm_proj;
Gtk::Button btn_edit_proj;
Gtk::Box bb2;
Gtk::Button btn_open_proj;
Gtk::Box bb3;
Gtk::Button btn_open_global;
Gtk::Box bb5;
Gtk::Button btn_quit;
void add_columns();
void table_cell_setup(
const Glib::RefPtr<Gtk::ListItem> &list_item,
Gtk::Align halign
);
void table_name_cell_bind(const Glib::RefPtr<Gtk::ListItem> &list_item);
void table_name_cell_unbind(const Glib::RefPtr<Gtk::ListItem> &list_item);
void table_path_cell_bind(const Glib::RefPtr<Gtk::ListItem> &list_item);
void table_path_cell_unbind(const Glib::RefPtr<Gtk::ListItem> &list_item);
void on_btn_add_click();
void on_btn_rm_click();
void on_btn_edit_click();
void on_btn_open_click();
void on_btn_open_global_click();
void on_btn_quit_click();
void on_destroy_sig();
bool on_signal_close_request();
};
} // namespace wayround_i2p::ccedit
#endif