mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
405187993a
Since Core::Object properties are really only used by GML now that the Inspector is long gone, there's no need for these to pollute Core::Object. This patch adds a new GUI::Object class to hold properties, and makes it the new base class of GUI::Window, GUI::Widget and GUI::Layout. The "instantiate an object by name" mechanism that GML uses is also hoisted into GUI::Object as well.
19 lines
412 B
C++
19 lines
412 B
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibGUI/Property.h>
|
|
|
|
namespace GUI {
|
|
|
|
Property::Property(DeprecatedString name, Function<JsonValue()> getter, Function<bool(JsonValue const&)> setter)
|
|
: m_name(move(name))
|
|
, m_getter(move(getter))
|
|
, m_setter(move(setter))
|
|
{
|
|
}
|
|
|
|
}
|