Documenting Link Widget.

This commit is contained in:
2025-06-15 23:50:07 -05:00
parent 3a0901693e
commit fa5b9e23cf

View File

@@ -16,9 +16,16 @@
namespace JUI {
/// Controls when Link widgets fire their Cicked callback. It can fire right when the widget is clicked, or when it is is released.
enum class LinkClickMode { Press, Release };
/// The Link widget is a specialization of the Text widget that has the appearance and behavior of a clickable link, such as in HTML.
class Link : public Text, public Clickable, public Hoverable {
public:
Event<> Clicked;
enum LinkClickMode ClickMode = LinkClickMode::Release;
/// This event is fired when the user clicks/releases the link.
Event<> Clicked;
Link() : Text(), Clickable(), Hoverable() {}
explicit Link(const std::string& content) : Link() {
this->Content(content);