2020-12-30 03:52:27 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-12-30 03:52:27 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibGUI/Widget.h>
|
|
|
|
|
|
|
|
|
|
namespace GUI {
|
|
|
|
|
|
2021-03-08 11:38:43 -05:00
|
|
|
class SeparatorWidget : public Widget {
|
2020-12-30 03:52:27 +01:00
|
|
|
C_OBJECT(SeparatorWidget);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual ~SeparatorWidget() override;
|
|
|
|
|
|
2021-03-08 11:38:43 -05:00
|
|
|
protected:
|
2020-12-30 03:52:27 +01:00
|
|
|
explicit SeparatorWidget(Gfx::Orientation);
|
|
|
|
|
|
2021-03-08 11:38:43 -05:00
|
|
|
private:
|
2020-12-30 03:52:27 +01:00
|
|
|
virtual void paint_event(PaintEvent&) override;
|
|
|
|
|
|
|
|
|
|
const Gfx::Orientation m_orientation;
|
|
|
|
|
};
|
2021-03-08 11:38:43 -05:00
|
|
|
|
|
|
|
|
class VerticalSeparator final : public SeparatorWidget {
|
|
|
|
|
C_OBJECT(VerticalSeparator)
|
|
|
|
|
public:
|
|
|
|
|
virtual ~VerticalSeparator() override { }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
VerticalSeparator()
|
|
|
|
|
: SeparatorWidget(Gfx::Orientation::Vertical)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class HorizontalSeparator final : public SeparatorWidget {
|
|
|
|
|
C_OBJECT(HorizontalSeparator)
|
|
|
|
|
public:
|
|
|
|
|
virtual ~HorizontalSeparator() override { }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
HorizontalSeparator()
|
|
|
|
|
: SeparatorWidget(Gfx::Orientation::Horizontal)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2020-12-30 03:52:27 +01:00
|
|
|
}
|