aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-01-27 16:23:26 +0100
committerdec05eba <dec05eba@protonmail.com>2020-08-19 00:14:44 +0200
commit61c3ec1e6e8f26f6d1efc271794e791ecde8f1e2 (patch)
treeaaa7d7c88f20b5972cf85514ea5c5990ea1a6a9c /include
parenta089da2e943ee4e0237a370b9372f232970c22b3 (diff)
Use rich text for messages
Diffstat (limited to 'include')
-rw-r--r--include/ChatMessage.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/ChatMessage.hpp b/include/ChatMessage.hpp
index a50a799..9f628c0 100644
--- a/include/ChatMessage.hpp
+++ b/include/ChatMessage.hpp
@@ -4,17 +4,23 @@
#include <dchat/types.hpp>
#include <gtkmm/grid.h>
#include <gtkmm/label.h>
+#include <gtkmm/textview.h>
namespace dchat
{
+ void applyRichText(Gtk::TextView *textView, const Glib::ustring &text);
+
class ChatMessage : public Gtk::Grid
{
public:
ChatMessage(const Glib::ustring &username, const Glib::ustring &text, uint32_t timestampSeconds);
+ void appendText(const Glib::ustring &text);
+
DynamicImage avatar;
Gtk::Label username;
- Gtk::Label text;
uint32_t timestampSeconds;
+ private:
+ Gtk::TextView text;
};
}