mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibGUI: Add GHBoxLayout and GVBoxLayout convenience classes
This commit is contained in:
parent
63364f8a5d
commit
d67da8c101
50 changed files with 128 additions and 114 deletions
|
@ -29,10 +29,10 @@
|
|||
#include <LibGUI/GLayout.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
|
||||
class GBoxLayout final : public GLayout {
|
||||
class GBoxLayout : public GLayout {
|
||||
public:
|
||||
explicit GBoxLayout(Orientation);
|
||||
virtual ~GBoxLayout() override;
|
||||
virtual ~GBoxLayout() override {}
|
||||
|
||||
Orientation orientation() const { return m_orientation; }
|
||||
|
||||
|
@ -41,3 +41,21 @@ public:
|
|||
private:
|
||||
Orientation m_orientation;
|
||||
};
|
||||
|
||||
class GVBoxLayout final : public GBoxLayout {
|
||||
public:
|
||||
explicit GVBoxLayout()
|
||||
: GBoxLayout(Orientation::Vertical)
|
||||
{
|
||||
}
|
||||
virtual ~GVBoxLayout() override {}
|
||||
};
|
||||
|
||||
class GHBoxLayout final : public GBoxLayout {
|
||||
public:
|
||||
explicit GHBoxLayout()
|
||||
: GBoxLayout(Orientation::Horizontal)
|
||||
{
|
||||
}
|
||||
virtual ~GHBoxLayout() override {}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue