summaryrefslogtreecommitdiff
path: root/components/chatinput.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-01-12 20:13:10 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2021-01-12 20:13:10 -0500
commit2d4edd7239d340ecfa8f7c0ce5c600dfa1a734e0 (patch)
treeb7b71d5e3844d9ed0ff4e00bf5977f926ac08844 /components/chatinput.hpp
parent64e9e712a12050f2237186c7f752b37fc203cabb (diff)
downloadabaddon-portaudio-2d4edd7239d340ecfa8f7c0ce5c600dfa1a734e0.tar.gz
abaddon-portaudio-2d4edd7239d340ecfa8f7c0ce5c600dfa1a734e0.zip
pull out chat input into its own component, rename some stuff
Diffstat (limited to 'components/chatinput.hpp')
-rw-r--r--components/chatinput.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/components/chatinput.hpp b/components/chatinput.hpp
new file mode 100644
index 0000000..a01b6ab
--- /dev/null
+++ b/components/chatinput.hpp
@@ -0,0 +1,23 @@
+#pragma once
+#include <gtkmm.h>
+
+class ChatInput : public Gtk::ScrolledWindow {
+public:
+ ChatInput();
+
+ void InsertText(const Glib::ustring &text);
+ Glib::RefPtr<Gtk::TextBuffer> GetBuffer();
+ bool ProcessKeyPress(GdkEventKey *event);
+
+private:
+
+ Gtk::TextView m_textview;
+
+public:
+ typedef sigc::signal<void, Glib::ustring> type_signal_submit;
+
+ type_signal_submit signal_submit();
+
+private:
+ type_signal_submit m_signal_submit;
+};