From a51a54bc5979a2491f152abc47ad54e6b63f27c8 Mon Sep 17 00:00:00 2001 From: Dylam De La Torre Date: Tue, 23 Nov 2021 05:21:56 +0100 Subject: Restructure source and resource files (#46) importantly, res is now res/res and css is now res/css --- src/windows/profile/userinfopane.hpp | 65 ++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/windows/profile/userinfopane.hpp (limited to 'src/windows/profile/userinfopane.hpp') 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 +#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 &connections); +}; + +class NotesContainer : public Gtk::Box { +public: + NotesContainer(); + void SetNote(const std::string ¬e); + +private: + void UpdateNote(); + bool OnNoteKeyPress(GdkEventKey *event); + + Gtk::Label m_label; + Gtk::TextView m_note; + + typedef sigc::signal 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; +}; -- cgit v1.2.3