Add LinkLabel::get/setUrl().

This commit is contained in:
David Capello 2011-07-20 21:51:39 -03:00
parent 4e2c4f530d
commit c7cf74228b
2 changed files with 9 additions and 2 deletions

View File

@ -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) {

View File

@ -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<void> Click;
protected:
bool onProcessMessage(Message* msg) OVERRIDE;
void onPaint(PaintEvent& ev) OVERRIDE;
std::string m_url;
};
#endif