From 927acfb9fe9232ae05cdae165393a60e9419d30f Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 14 Mar 2021 17:59:52 -0500 Subject: add ability to create replies --- components/chatwindow.hpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'components/chatwindow.hpp') diff --git a/components/chatwindow.hpp b/components/chatwindow.hpp index 38437da..ba03b16 100644 --- a/components/chatwindow.hpp +++ b/components/chatwindow.hpp @@ -7,7 +7,7 @@ #include "completer.hpp" class ChatInput; -class TypingIndicator; +class ChatInputIndicator; class ChatWindow { public: ChatWindow(); @@ -30,11 +30,19 @@ protected: ChatMessageItemContainer *CreateMessageComponent(Snowflake id); // to be inserted into header's content box void ProcessNewMessage(Snowflake id, bool prepend); // creates and adds components + bool m_is_replying = false; + Snowflake m_replying_to; + + void StartReplying(Snowflake message_id); + void StopReplying(); + int m_num_rows = 0; std::unordered_map m_id_to_widget; Snowflake m_active_channel; + void OnInputSubmit(const Glib::ustring &text); + bool OnKeyPressEvent(GdkEventKey *e); void OnScrollEdgeOvershot(Gtk::PositionType pos); @@ -48,12 +56,12 @@ protected: ChatInput *m_input; Completer m_completer; - TypingIndicator *m_typing_indicator; + ChatInputIndicator *m_input_indicator; public: typedef sigc::signal type_signal_action_message_delete; typedef sigc::signal type_signal_action_message_edit; - typedef sigc::signal type_signal_action_chat_submit; + typedef sigc::signal type_signal_action_chat_submit; typedef sigc::signal type_signal_action_chat_load_history; typedef sigc::signal type_signal_action_channel_click; typedef sigc::signal type_signal_action_insert_mention; -- cgit v1.2.3