aboutsummaryrefslogtreecommitdiff
path: root/include/RoomNotificationsWindow.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-11-09 09:46:43 +0100
committerdec05eba <dec05eba@protonmail.com>2018-11-09 09:46:47 +0100
commit5fab9a3a2cf048330f687dda48c76c95a3a67d98 (patch)
tree1be0385ef62f5fbf0794d98a697e0ff11fe7a510 /include/RoomNotificationsWindow.hpp
parent118277121c8b1767a78f76d19c44aea496121b34 (diff)
Add room joining
Diffstat (limited to 'include/RoomNotificationsWindow.hpp')
-rw-r--r--include/RoomNotificationsWindow.hpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/RoomNotificationsWindow.hpp b/include/RoomNotificationsWindow.hpp
new file mode 100644
index 0000000..e4e29f5
--- /dev/null
+++ b/include/RoomNotificationsWindow.hpp
@@ -0,0 +1,36 @@
+#pragma once
+
+#include <dchat/Room.hpp>
+#include <gtkmm/stack.h>
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/liststore.h>
+#include <unordered_map>
+
+namespace dchat
+{
+ class ChatWindow;
+
+ class RoomNotificationsWindow : public Gtk::Stack
+ {
+ public:
+ RoomNotificationsWindow(ChatWindow *chatWindow);
+
+ void addInviteRequest(const InviteUserRequest &request);
+ private:
+ class RoomNotifications : public Gtk::ScrolledWindow
+ {
+ public:
+ Glib::RefPtr<Gtk::ListStore> listStore;
+ Gtk::TreeModelColumn<Glib::ustring> userPublicKeyColumn;
+ Gtk::TreeModelColumn<Glib::ustring> messageColumn;
+ Gtk::TreeModel::ColumnRecord columns;
+ std::unordered_map<std::string, InviteUserRequest> inviteRequests;
+ };
+
+ RoomNotifications* createRoomNotifications();
+
+ std::unordered_map<Room*, RoomNotifications*> roomNotificationsMap;
+
+ ChatWindow *chatWindow;
+ };
+} \ No newline at end of file