mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
LibGUI: Propagate construction errors in LinkLabel
This commit is contained in:
parent
91bafc2653
commit
b17d4a0ced
2 changed files with 26 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue