2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
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:
|
2020-02-02 15:07:41 +01:00
|
|
|
virtual ~GroupBox() override;
|
2019-04-10 05:52:15 +02:00
|
|
|
|
2019-05-08 14:32:46 +02:00
|
|
|
String title() const { return m_title; }
|
2019-06-02 14:58:02 +02:00
|
|
|
void set_title(const StringView&);
|
2019-04-10 05:52:15 +02:00
|
|
|
|
|
|
|
protected:
|
2020-02-23 12:07:13 +01:00
|
|
|
explicit GroupBox(const StringView& title = {});
|
2019-09-21 16:13:04 +02:00
|
|
|
|
2020-02-02 15:07:41 +01:00
|
|
|
virtual void paint_event(PaintEvent&) override;
|
2019-04-10 05:52:15 +02:00
|
|
|
|
|
|
|
private:
|
2019-05-08 14:32:46 +02:00
|
|
|
String m_title;
|
2019-04-10 05:52:15 +02:00
|
|
|
};
|
2020-02-02 15:07:41 +01:00
|
|
|
|
|
|
|
}
|