mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibGUI: Implement save_to(JsonObject&) for GWindow and GWidget
This commit is contained in:
parent
c2213449c0
commit
3792c91059
4 changed files with 45 additions and 0 deletions
|
@ -22,6 +22,17 @@ enum class SizePolicy {
|
|||
Fixed,
|
||||
Fill
|
||||
};
|
||||
inline const char* to_string(SizePolicy policy)
|
||||
{
|
||||
switch (policy) {
|
||||
case SizePolicy::Fixed:
|
||||
return "SizePolicy::Fixed";
|
||||
case SizePolicy::Fill:
|
||||
return "SizePolicy::Fill";
|
||||
}
|
||||
return "SizePolicy::(Invalid)";
|
||||
}
|
||||
|
||||
enum class HorizontalDirection {
|
||||
Left,
|
||||
Right
|
||||
|
@ -206,6 +217,8 @@ public:
|
|||
virtual bool is_radio_button() const { return false; }
|
||||
virtual bool is_abstract_button() const { return false; }
|
||||
|
||||
virtual void save_to(AK::JsonObject&) override;
|
||||
|
||||
private:
|
||||
void handle_paint_event(GPaintEvent&);
|
||||
void handle_resize_event(GResizeEvent&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue