aboutsummaryrefslogtreecommitdiff
path: root/include/RoomNotificationsWindow.hpp
diff options
context:
space:
mode:
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