mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
b425de18cc
Use this in GSpinBox to implement auto-increment / auto-decrement while you are pressing down the respective buttons. :^)
23 lines
622 B
C++
23 lines
622 B
C++
#pragma once
|
|
|
|
#include <AK/AKString.h>
|
|
#include <AK/Function.h>
|
|
#include <LibGUI/GAbstractButton.h>
|
|
|
|
class GCheckBox : public GAbstractButton {
|
|
public:
|
|
GCheckBox(const StringView&, GWidget* parent);
|
|
explicit GCheckBox(GWidget* parent);
|
|
virtual ~GCheckBox() override;
|
|
|
|
virtual void click() override;
|
|
|
|
virtual const char* class_name() const override { return "GCheckBox"; }
|
|
|
|
private:
|
|
// These don't make sense for a check box, so hide them.
|
|
using GAbstractButton::auto_repeat_interval;
|
|
using GAbstractButton::set_auto_repeat_interval;
|
|
|
|
virtual void paint_event(GPaintEvent&) override;
|
|
};
|