libikarus/src/ikarus/objects/properties/text_property.cpp
Folling 98cb7a44ef
add flatbuffers support and initial rewrite
Signed-off-by: Folling <mail@folling.io>
2025-01-01 14:07:47 +01:00

32 lines
1.1 KiB
C++

#include "text_property.hpp"
#include <cppbase/result.hpp>
#include <ikarus/objects/properties/property.h>
#include <ikarus/objects/properties/property_scope.hpp>
#include <ikarus/objects/properties/util.hpp>
#include <ikarus/values/value.hpp>
IkarusTextProperty::IkarusTextProperty(IkarusProject * project, int64_t id):
IkarusProperty{project, id, this} {}
IkarusTextProperty * ikarus_text_property_create(
struct IkarusProject * project,
char const * name,
struct IkarusPropertyScope * property_source,
IkarusErrorData * error_out
) {
return ikarus::util::create_property<IkarusTextProperty>(project, name, property_source, error_out);
}
IkarusTextValue * ikarus_text_property_get_default_value(IkarusTextProperty * property, IkarusErrorData * error_out) {
return ikarus::util::get_default_value<IkarusTextProperty>(property, error_out);
}
void ikarus_text_property_set_default_value(
IkarusTextProperty * property,
IkarusTextValue * new_default_value,
IkarusErrorData * error_out
) {
ikarus::util::set_default_value<IkarusTextProperty>(property, new_default_value, error_out);
}