summaryrefslogtreecommitdiff
path: root/src/dialogs/friendpicker.hpp
blob: 9749dfa00a187f41439d34a35a07bf6c191e2532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
#include "discord/snowflake.hpp"

class FriendPickerDialog : public Gtk::Dialog {
public:
    FriendPickerDialog(Gtk::Window &parent);

    Snowflake GetUserID() const;

protected:
    void OnRowActivated(Gtk::ListBoxRow *row);
    void OnSelectionChange();

    Snowflake m_chosen_id;

    Gtk::ScrolledWindow m_main;
    Gtk::ListBox m_list;
    Gtk::ButtonBox m_bbox;

    Gtk::Button *m_ok_button;
    Gtk::Button *m_cancel_button;
};

class FriendPickerDialogItem : public Gtk::ListBoxRow {
public:
    FriendPickerDialogItem(Snowflake user_id);

    Snowflake ID;

private:
    Gtk::Box m_layout;
    Gtk::Image m_avatar;
    Gtk::Label m_name;
};