1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:07:44 +00:00

LibGUI: Register more GML properties and widgets

Register "placeholder" for TextEditor and ComboBox; "models_only"
for ComboBox; Vertical/HorizontalSeparator for SeparatorWidget
This commit is contained in:
thankyouverycool 2021-03-08 11:38:43 -05:00 committed by Andreas Kling
parent 5806630cf4
commit cf866cc75a
5 changed files with 48 additions and 2 deletions

View file

@ -30,17 +30,43 @@
namespace GUI {
class SeparatorWidget final : public Widget {
class SeparatorWidget : public Widget {
C_OBJECT(SeparatorWidget);
public:
virtual ~SeparatorWidget() override;
private:
protected:
explicit SeparatorWidget(Gfx::Orientation);
private:
virtual void paint_event(PaintEvent&) override;
const Gfx::Orientation m_orientation;
};
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)
{
}
};
}