mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-08 10:01:53 +00:00
LibGUI: Make GCheckBox inherit from GAbstractButton.
This commit is contained in:
parent
21c56477b0
commit
677794f30d
Notes:
sideshowbarker
2024-07-19 13:58:21 +09:00
Author: https://github.com/awesomekling
Commit: 677794f30d
9 changed files with 25 additions and 97 deletions
|
@ -6,6 +6,8 @@ class GAbstractButton : public GWidget {
|
|||
public:
|
||||
virtual ~GAbstractButton() override;
|
||||
|
||||
Function<void(bool)> on_checked;
|
||||
|
||||
void set_text(const String&);
|
||||
const String& text() const { return m_text; }
|
||||
|
||||
|
@ -19,8 +21,8 @@ public:
|
|||
bool is_being_pressed() const { return m_being_pressed; }
|
||||
|
||||
virtual void click() = 0;
|
||||
|
||||
virtual const char* class_name() const override { return "GAbstractButton"; }
|
||||
virtual bool accepts_focus() const override { return true; }
|
||||
|
||||
protected:
|
||||
explicit GAbstractButton(GWidget* parent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue