mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 22:55:08 +00:00
LibGUI: Make GCheckBox inherit from GAbstractButton.
This commit is contained in:
parent
21c56477b0
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