summaryrefslogtreecommitdiff
path: root/src/windows/profile/userinfopane.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-11-28 22:48:30 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2021-11-28 22:48:30 -0500
commite1703aea3fd597b23bde90e6c505278c517be611 (patch)
tree37d98fc90c9cd0844388bfb79beda2204f44af92 /src/windows/profile/userinfopane.hpp
parentfd53a76bf6f53a095a639765923a30f2206b2cd6 (diff)
parente02107feea8214a045e6faa969f00dcbc0d2b072 (diff)
downloadabaddon-portaudio-e1703aea3fd597b23bde90e6c505278c517be611.tar.gz
abaddon-portaudio-e1703aea3fd597b23bde90e6c505278c517be611.zip
merge master
Diffstat (limited to 'src/windows/profile/userinfopane.hpp')
-rw-r--r--src/windows/profile/userinfopane.hpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/windows/profile/userinfopane.hpp b/src/windows/profile/userinfopane.hpp
new file mode 100644
index 0000000..90a4d55
--- /dev/null
+++ b/src/windows/profile/userinfopane.hpp
@@ -0,0 +1,65 @@
+#pragma once
+#include <gtkmm.h>
+#include "discord/objects.hpp"
+
+class ConnectionItem : public Gtk::EventBox {
+public:
+ ConnectionItem(const ConnectionData &connection);
+
+private:
+ Gtk::Overlay m_overlay;
+ Gtk::Box m_box;
+ Gtk::Label m_name;
+ Gtk::Image *m_image = nullptr;
+ Gtk::Image *m_check = nullptr;
+};
+
+class ConnectionsContainer : public Gtk::Grid {
+public:
+ ConnectionsContainer();
+ void SetConnections(const std::vector<ConnectionData> &connections);
+};
+
+class NotesContainer : public Gtk::Box {
+public:
+ NotesContainer();
+ void SetNote(const std::string &note);
+
+private:
+ void UpdateNote();
+ bool OnNoteKeyPress(GdkEventKey *event);
+
+ Gtk::Label m_label;
+ Gtk::TextView m_note;
+
+ typedef sigc::signal<void, Glib::ustring> type_signal_update_note;
+ type_signal_update_note m_signal_update_note;
+
+public:
+ type_signal_update_note signal_update_note();
+};
+
+class BioContainer : public Gtk::Box {
+public:
+ BioContainer();
+ void SetBio(const std::string &bio);
+
+private:
+ Gtk::Label m_label;
+ Gtk::Label m_bio;
+};
+
+class ProfileUserInfoPane : public Gtk::Box {
+public:
+ ProfileUserInfoPane(Snowflake ID);
+ void SetProfile(const UserProfileData &data);
+
+ Snowflake UserID;
+
+private:
+ Gtk::Label m_created;
+
+ BioContainer m_bio;
+ NotesContainer m_note;
+ ConnectionsContainer m_conns;
+};