ladybird/Userland/Libraries/LibGUI/CheckBox.h

39 lines
756 B
C
Raw Normal View History

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/AbstractButton.h>
namespace GUI {
class CheckBox : public AbstractButton {
C_OBJECT(CheckBox);
public:
virtual ~CheckBox() override;
virtual void click(unsigned modifiers = 0) override;
2021-04-04 18:12:17 +03:00
bool is_autosize() const { return m_autosize; }
void set_autosize(bool);
private:
explicit CheckBox(String = {});
2019-09-21 19:58:48 +03:00
2021-04-04 18:12:17 +03:00
void size_to_fit();
// These don't make sense for a check box, so hide them.
using AbstractButton::auto_repeat_interval;
using AbstractButton::set_auto_repeat_interval;
virtual void paint_event(PaintEvent&) override;
2021-04-04 18:12:17 +03:00
bool m_autosize { false };
};
}