GroupBox.h 567 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibGUI/Widget.h>
  8. namespace GUI {
  9. class GroupBox : public Widget {
  10. C_OBJECT(GroupBox)
  11. public:
  12. virtual ~GroupBox() override;
  13. String title() const { return m_title; }
  14. void set_title(const StringView&);
  15. virtual Margins content_margins() const override;
  16. protected:
  17. explicit GroupBox(const StringView& title = {});
  18. virtual void paint_event(PaintEvent&) override;
  19. private:
  20. String m_title;
  21. };
  22. }