diff --git a/src/gui/link_label.cpp b/src/gui/link_label.cpp index 66f2594e4..f5b299182 100644 --- a/src/gui/link_label.cpp +++ b/src/gui/link_label.cpp @@ -25,6 +25,11 @@ LinkLabel::LinkLabel(const char* url, const char* text) { } +void LinkLabel::setUrl(const char* url) +{ + m_url = url; +} + bool LinkLabel::onProcessMessage(Message* msg) { switch (msg->type) { diff --git a/src/gui/link_label.h b/src/gui/link_label.h index 05abec40a..cbb48624c 100644 --- a/src/gui/link_label.h +++ b/src/gui/link_label.h @@ -15,18 +15,20 @@ class LinkLabel : public CustomLabel { - std::string m_url; - public: LinkLabel(const char* urlOrText); LinkLabel(const char* url, const char* text); + const char* getUrl() const { return m_url.c_str(); } + void setUrl(const char* url); + Signal0 Click; protected: bool onProcessMessage(Message* msg) OVERRIDE; void onPaint(PaintEvent& ev) OVERRIDE; + std::string m_url; }; #endif