diff options
Diffstat (limited to 'Userland/Libraries/LibGUI/LinkLabel.h')
-rw-r--r-- | Userland/Libraries/LibGUI/LinkLabel.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/LinkLabel.h b/Userland/Libraries/LibGUI/LinkLabel.h index 36175936a7..80196c9f93 100644 --- a/Userland/Libraries/LibGUI/LinkLabel.h +++ b/Userland/Libraries/LibGUI/LinkLabel.h @@ -11,14 +11,19 @@ namespace GUI { class LinkLabel : public Label { - C_OBJECT(LinkLabel); + C_OBJECT_ABSTRACT(LinkLabel); public: + static ErrorOr<NonnullRefPtr<LinkLabel>> try_create(String text = {}); + Function<void()> on_click; private: explicit LinkLabel(String text = {}); + ErrorOr<void> create_actions(); + ErrorOr<void> create_menus(); + virtual void mousemove_event(MouseEvent&) override; virtual void mousedown_event(MouseEvent&) override; virtual void paint_event(PaintEvent&) override; @@ -30,7 +35,6 @@ private: virtual void did_change_text() override; void update_tooltip_if_needed(); - void setup_actions(); void set_hovered(bool); RefPtr<Menu> m_context_menu; |