LibCore: Add REGISTER_TEXT_ALIGNMENT_PROPERTY macro

This commit is contained in:
Linus Groh 2020-12-28 20:45:04 +01:00 committed by Andreas Kling
parent 6c0fa6ad93
commit 1e70986d19
Notes: sideshowbarker 2024-07-19 00:27:02 +09:00

View file

@ -305,4 +305,14 @@ const LogStream& operator<<(const LogStream&, const Object&);
property_name, getter, setter, GUI::SizePolicy, \
{ GUI::SizePolicy::Fill, "Fill" }, \
{ GUI::SizePolicy::Fixed, "Fixed" })
#define REGISTER_TEXT_ALIGNMENT_PROPERTY(property_name, getter, setter) \
REGISTER_ENUM_PROPERTY( \
property_name, getter, setter, Gfx::TextAlignment, \
{ Gfx::TextAlignment::TopLeft, "TopLeft" }, \
{ Gfx::TextAlignment::CenterLeft, "CenterLeft" }, \
{ Gfx::TextAlignment::Center, "Center" }, \
{ Gfx::TextAlignment::CenterRight, "CenterRight" }, \
{ Gfx::TextAlignment::TopRight, "TopRight" }, \
{ Gfx::TextAlignment::BottomRight, "BottomRight" })
}