From ff8e353290c0b443c0ec68ee3fc4e137a7025f27 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sun, 23 Jul 2017 03:45:40 +0200 Subject: Add proxy log window Both GTK and QT log windows will scroll down to the last row whenever a new row is appended. --- src/gui_htmlattrtext.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gui_htmlattrtext.hh') diff --git a/src/gui_htmlattrtext.hh b/src/gui_htmlattrtext.hh index 91e1cc1..96b0447 100644 --- a/src/gui_htmlattrtext.hh +++ b/src/gui_htmlattrtext.hh @@ -7,10 +7,23 @@ class HtmlAttributedText : public AttributedText { public: + class Listener { + public: + virtual ~Listener() {} + + virtual void changed(HtmlAttributedText* text) = 0; + + protected: + Listener() {} + }; + static HtmlAttributedText* create(); virtual std::string html() const = 0; + virtual void add_listener(Listener* listener) = 0; + virtual void remove_listener(Listener* listener) = 0; + protected: HtmlAttributedText() {} }; -- cgit v1.2.3-70-g09d2