2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
2022-02-26 10:50:04 -07:00
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
2020-01-18 09:38:21 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
|
2019-04-10 05:52:15 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-02-06 20:33:02 +01:00
|
|
|
#include <LibGUI/Widget.h>
|
2019-04-10 05:52:15 +02:00
|
|
|
|
2020-02-02 15:07:41 +01:00
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
|
|
class GroupBox : public Widget {
|
|
|
|
|
C_OBJECT(GroupBox)
|
2019-04-10 05:52:15 +02:00
|
|
|
public:
|
2022-02-26 10:50:04 -07:00
|
|
|
virtual ~GroupBox() override = default;
|
2019-04-10 05:52:15 +02:00
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
ByteString title() const { return m_title; }
|
2021-11-11 00:55:02 +01:00
|
|
|
void set_title(StringView);
|
2021-09-28 15:42:25 +02:00
|
|
|
virtual Margins content_margins() const override;
|
2019-04-10 05:52:15 +02:00
|
|
|
|
|
|
|
|
protected:
|
2021-11-11 00:55:02 +01:00
|
|
|
explicit GroupBox(StringView title = {});
|
2019-09-21 16:13:04 +02:00
|
|
|
|
2020-02-02 15:07:41 +01:00
|
|
|
virtual void paint_event(PaintEvent&) override;
|
2021-09-28 15:59:07 +02:00
|
|
|
virtual void fonts_change_event(FontsChangeEvent&) override;
|
2019-04-10 05:52:15 +02:00
|
|
|
|
|
|
|
|
private:
|
2023-12-16 17:49:34 +03:30
|
|
|
ByteString m_title;
|
2019-04-10 05:52:15 +02:00
|
|
|
};
|
2020-02-02 15:07:41 +01:00
|
|
|
|
|
|
|
|
}
|