summaryrefslogtreecommitdiff
path: root/windows/threadswindow.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-08-11 03:32:09 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2021-08-11 03:32:09 -0400
commit7ffded5b1373444cf3442d759a3bd8ae0940bd7d (patch)
tree575e6cfb5c610aa5d5271083cd769728df1885e9 /windows/threadswindow.hpp
parente01110c7393d5071ea271f1978b3a2ece59415ad (diff)
downloadabaddon-portaudio-7ffded5b1373444cf3442d759a3bd8ae0940bd7d.tar.gz
abaddon-portaudio-7ffded5b1373444cf3442d759a3bd8ae0940bd7d.zip
rest of view threads window
Diffstat (limited to 'windows/threadswindow.hpp')
-rw-r--r--windows/threadswindow.hpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/windows/threadswindow.hpp b/windows/threadswindow.hpp
new file mode 100644
index 0000000..a0c77e8
--- /dev/null
+++ b/windows/threadswindow.hpp
@@ -0,0 +1,60 @@
+#pragma once
+#include <gtkmm.h>
+#include "../discord/objects.hpp"
+
+class ActiveThreadsList : public Gtk::ScrolledWindow {
+public:
+ ActiveThreadsList(const ChannelData &channel);
+
+private:
+ Gtk::ListBox m_list;
+
+ using type_signal_thread_open = sigc::signal<void, Snowflake>;
+ type_signal_thread_open m_signal_thread_open;
+
+public:
+ type_signal_thread_open signal_thread_open();
+};
+
+class ArchivedThreadsList : public Gtk::ScrolledWindow {
+public:
+ ArchivedThreadsList(const ChannelData &channel);
+
+private:
+ Gtk::ListBox m_list;
+
+ void OnPublicFetched(DiscordError code, const ArchivedThreadsResponseData &data);
+
+ using type_signal_thread_open = sigc::signal<void, Snowflake>;
+ type_signal_thread_open m_signal_thread_open;
+
+public:
+ type_signal_thread_open signal_thread_open();
+};
+
+// view all threads in a channel
+class ThreadsWindow : public Gtk::Window {
+public:
+ ThreadsWindow(const ChannelData &channel);
+
+private:
+ Snowflake m_channel_id;
+
+ Gtk::StackSwitcher m_switcher;
+ Gtk::Stack m_stack;
+
+ Gtk::Box m_box;
+
+ ActiveThreadsList m_active;
+ ArchivedThreadsList m_archived;
+};
+
+class ThreadListRow : public Gtk::ListBoxRow {
+public:
+ ThreadListRow(const ChannelData &channel);
+
+ Snowflake ID;
+
+private:
+ Gtk::Label m_label;
+};