summaryrefslogtreecommitdiff
path: root/src/components/chatinput.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-08-07 02:16:20 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2022-08-07 02:16:20 -0400
commit344f2694141aa0cc8fc214dfd8ce2011df1a8079 (patch)
tree6e26f329402a1627cb130110174c57370f722a45 /src/components/chatinput.hpp
parent3487353fc79abb32481282be9d3ba4d54730b1e2 (diff)
downloadabaddon-portaudio-344f2694141aa0cc8fc214dfd8ce2011df1a8079.tar.gz
abaddon-portaudio-344f2694141aa0cc8fc214dfd8ce2011df1a8079.zip
add file picker to chat input
Diffstat (limited to 'src/components/chatinput.hpp')
-rw-r--r--src/components/chatinput.hpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/components/chatinput.hpp b/src/components/chatinput.hpp
index d8484b8..82ea2fd 100644
--- a/src/components/chatinput.hpp
+++ b/src/components/chatinput.hpp
@@ -95,6 +95,30 @@ private:
type_signal_image_paste m_signal_image_paste;
};
+// file upload, text
+class ChatInputTextContainer : public Gtk::Overlay {
+public:
+ ChatInputTextContainer();
+
+ // not proxying everythign lol!!
+ ChatInputText &Get();
+
+private:
+ void ShowFileChooser();
+ bool GetChildPosition(Gtk::Widget *child, Gdk::Rectangle &pos);
+
+ Gtk::EventBox m_upload_ev;
+ Gtk::Image m_upload_img;
+ ChatInputText m_input;
+
+public:
+ using type_signal_add_attachment = sigc::signal<void, Glib::RefPtr<Gio::File>>;
+ type_signal_add_attachment signal_add_attachment();
+
+private:
+ type_signal_add_attachment m_signal_add_attachment;
+};
+
class ChatInput : public Gtk::Box {
public:
ChatInput();
@@ -113,7 +137,7 @@ private:
Gtk::Revealer m_attachments_revealer;
ChatInputAttachmentContainer m_attachments;
- ChatInputText m_input;
+ ChatInputTextContainer m_input;
public:
using type_signal_submit = sigc::signal<bool, ChatSubmitParams>;