diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-16 04:16:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-16 04:16:48 +0000 |
commit | 49bbc926e76147d2f380685d4635ebcdf2163f8f (patch) | |
tree | 740be513f52752cf25479bede9e8e2231bf0ffa6 /src/components/chatinput.hpp | |
parent | 52a340e3666e4081b5f284c320404d06ac37b2f3 (diff) | |
parent | 52b52eb489caa64e6cea978f2c6917a55fa70979 (diff) | |
download | abaddon-portaudio-49bbc926e76147d2f380685d4635ebcdf2163f8f.tar.gz abaddon-portaudio-49bbc926e76147d2f380685d4635ebcdf2163f8f.zip |
Merge pull request #192 from uowuo/message-editing
Improve message editing
Diffstat (limited to 'src/components/chatinput.hpp')
-rw-r--r-- | src/components/chatinput.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/chatinput.hpp b/src/components/chatinput.hpp index bc6a45d..a3c9742 100644 --- a/src/components/chatinput.hpp +++ b/src/components/chatinput.hpp @@ -129,6 +129,7 @@ public: ChatInput(); void InsertText(const Glib::ustring &text); + void Clear(); Glib::RefPtr<Gtk::TextBuffer> GetBuffer(); bool ProcessKeyPress(GdkEventKey *event); void AddAttachment(const Glib::RefPtr<Gio::File> &file); @@ -139,6 +140,11 @@ public: void StartReplying(); void StopReplying(); + void StartEditing(const Message &message); + void StopEditing(); + + bool IsEmpty(); + private: bool AddFileAsImageAttachment(const Glib::RefPtr<Gio::File> &file); bool CanAttachFiles(); @@ -149,6 +155,8 @@ private: Snowflake m_active_channel; + bool m_is_editing = false; + public: using type_signal_submit = sigc::signal<bool, ChatSubmitParams>; using type_signal_escape = sigc::signal<void>; |