From 7ffded5b1373444cf3442d759a3bd8ae0940bd7d Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 11 Aug 2021 03:32:09 -0400 Subject: rest of view threads window --- windows/threadswindow.hpp | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 windows/threadswindow.hpp (limited to 'windows/threadswindow.hpp') 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 +#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; + 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; + 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; +}; -- cgit v1.2.3