summaryrefslogtreecommitdiff
path: root/components/friendslist.hpp
diff options
context:
space:
mode:
authorDylam De La Torre <DyXel04@gmail.com>2021-11-23 05:21:56 +0100
committerGitHub <noreply@github.com>2021-11-23 04:21:56 +0000
commita51a54bc5979a2491f152abc47ad54e6b63f27c8 (patch)
treece67092b2f6df366033a65a6111e4650866766b2 /components/friendslist.hpp
parentd88079000a79e6bcbe51c5a2868d57b303b5fcb6 (diff)
downloadabaddon-portaudio-a51a54bc5979a2491f152abc47ad54e6b63f27c8.tar.gz
abaddon-portaudio-a51a54bc5979a2491f152abc47ad54e6b63f27c8.zip
Restructure source and resource files (#46)
importantly, res is now res/res and css is now res/css
Diffstat (limited to 'components/friendslist.hpp')
-rw-r--r--components/friendslist.hpp92
1 files changed, 0 insertions, 92 deletions
diff --git a/components/friendslist.hpp b/components/friendslist.hpp
deleted file mode 100644
index 460ad32..0000000
--- a/components/friendslist.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-#pragma once
-#include <gtkmm.h>
-#include "discord/objects.hpp"
-
-class FriendsListAddComponent : public Gtk::Box {
-public:
- FriendsListAddComponent();
-
-private:
- void Submit();
- bool OnKeyPress(GdkEventKey *e);
-
- Gtk::Label m_label;
- Gtk::Label m_status;
- Gtk::Entry m_entry;
- Gtk::Button m_add;
- Gtk::Box m_box;
-
- bool m_requesting = false;
-};
-
-class FriendsListFriendRow;
-class FriendsList : public Gtk::Box {
-public:
- FriendsList();
-
-private:
- FriendsListFriendRow *MakeRow(const UserData &user, RelationshipType type);
-
- void OnRelationshipAdd(const RelationshipAddData &data);
- void OnRelationshipRemove(Snowflake id, RelationshipType type);
-
- void OnActionAccept(Snowflake id);
- void OnActionRemove(Snowflake id);
-
- void PopulateRelationships();
-
- enum FilterMode {
- FILTER_FRIENDS,
- FILTER_ONLINE,
- FILTER_PENDING,
- FILTER_BLOCKED,
- };
-
- FilterMode m_filter_mode;
-
- int ListSortFunc(Gtk::ListBoxRow *a, Gtk::ListBoxRow *b);
- bool ListFilterFunc(Gtk::ListBoxRow *row);
-
- FriendsListAddComponent m_add;
- Gtk::RadioButtonGroup m_group;
- Gtk::ButtonBox m_buttons;
- Gtk::ScrolledWindow m_scroll;
- Gtk::ListBox m_list;
-};
-
-class FriendsListFriendRow : public Gtk::ListBoxRow {
-public:
- FriendsListFriendRow(RelationshipType type, const UserData &str);
-
- Snowflake ID;
- RelationshipType Type;
- Glib::ustring Name;
- PresenceStatus Status;
-
-private:
- void UpdatePresenceLabel();
- void OnPresenceUpdate(const UserData &user, PresenceStatus status);
-
- Gtk::Label *m_status_lbl;
-
- Gtk::Menu m_menu;
- Gtk::MenuItem m_remove; // or cancel or ignore
- Gtk::MenuItem m_accept; // incoming
-
- using type_signal_remove = sigc::signal<void>;
- using type_signal_accept = sigc::signal<void>;
- type_signal_remove m_signal_remove;
- type_signal_accept m_signal_accept;
-
-public:
- type_signal_remove signal_action_remove();
- type_signal_accept signal_action_accept();
-};
-
-class FriendsListWindow : public Gtk::Window {
-public:
- FriendsListWindow();
-
-private:
- FriendsList m_friends;
-};