forked from aseprite/aseprite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlink_label.h
More file actions
37 lines (26 loc) · 768 Bytes
/
link_label.h
File metadata and controls
37 lines (26 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Aseprite UI Library
// Copyright (C) 2001-2017 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef UI_LINK_LABEL_H_INCLUDED
#define UI_LINK_LABEL_H_INCLUDED
#pragma once
#include "obs/signal.h"
#include "ui/label.h"
#include <string>
namespace ui {
class LinkLabel : public Label {
public:
LinkLabel(const std::string& urlOrText = "");
LinkLabel(const std::string& url, const std::string& text);
const std::string& url() const { return m_url; }
void setUrl(const std::string& url);
obs::signal<void()> Click;
protected:
bool onProcessMessage(Message* msg) override;
virtual void onClick();
std::string m_url;
};
} // namespace ui
#endif