Horizon
Loading...
Searching...
No Matches
close_utils.hpp
1#pragma once
2#include <gtkmm.h>
3#include "util/uuid.hpp"
4#include <set>
5
6namespace horizon {
7class ConfirmCloseDialog : public Gtk::MessageDialog {
8public:
9 ConfirmCloseDialog(Gtk::Window *parent);
10 struct WindowInfo {
12 bool close;
13 std::map<UUID, std::string> files_need_save;
14 };
15
16 using WindowMap = std::map<std::string, WindowInfo>;
17
18 void set_files(const WindowMap &files);
19 std::map<std::string, std::set<UUID>> get_files() const;
20
21 enum {
22 RESPONSE_SAVE = 1,
23 RESPONSE_NO_SAVE = 2,
24 };
25
26private:
27 class TreeColumns : public Gtk::TreeModelColumnRecord {
28 public:
29 TreeColumns()
30 {
31 Gtk::TreeModelColumnRecord::add(name);
32 Gtk::TreeModelColumnRecord::add(display_name);
33 Gtk::TreeModelColumnRecord::add(uuid);
34 Gtk::TreeModelColumnRecord::add(save);
35 Gtk::TreeModelColumnRecord::add(inconsistent);
36 Gtk::TreeModelColumnRecord::add(sensitive);
37 }
38 Gtk::TreeModelColumn<Glib::ustring> name;
39 Gtk::TreeModelColumn<Glib::ustring> display_name;
40 Gtk::TreeModelColumn<UUID> uuid;
41 Gtk::TreeModelColumn<bool> save;
42 Gtk::TreeModelColumn<bool> inconsistent;
43 Gtk::TreeModelColumn<bool> sensitive;
44 };
45 TreeColumns tree_columns;
46
47 Glib::RefPtr<Gtk::TreeStore> store;
48
49 Gtk::TreeView *tv = nullptr;
50};
51
52class ProcWaitDialog : public Gtk::Dialog {
53public:
55};
56} // namespace horizon
Definition close_utils.hpp:7
Definition pool-prj-mgr-app_win.hpp:22
Definition close_utils.hpp:52
Definition close_utils.hpp:10