add src/ikarus subdir and make names unique for objects per scope
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
c65211e4ff
commit
5dce2ced94
51 changed files with 590 additions and 735 deletions
32
src/ikarus/objects/properties/toggle_property.cpp
Normal file
32
src/ikarus/objects/properties/toggle_property.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include "toggle_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>
|
||||
|
||||
IkarusToggleProperty::IkarusToggleProperty(IkarusProject * project, IkarusId id):
|
||||
IkarusProperty{project, id, this} {}
|
||||
|
||||
IkarusToggleProperty * ikarus_toggle_property_create(
|
||||
struct IkarusProject * project,
|
||||
char const * name,
|
||||
struct IkarusPropertyScope * property_source,
|
||||
IkarusErrorData * error_out
|
||||
) {
|
||||
return ikarus::util::create_property<IkarusToggleProperty>(project, name, property_source, error_out);
|
||||
}
|
||||
|
||||
IkarusToggleValue * ikarus_toggle_property_get_default_value(struct IkarusToggleProperty * property, IkarusErrorData * error_out) {
|
||||
return ikarus::util::get_default_value<IkarusToggleProperty>(property, error_out);
|
||||
}
|
||||
|
||||
void ikarus_toggle_property_set_default_value(
|
||||
struct IkarusToggleProperty * property,
|
||||
struct IkarusToggleValue * new_default_value,
|
||||
IkarusErrorData * error_out
|
||||
) {
|
||||
ikarus::util::set_default_value<IkarusToggleProperty>(property, new_default_value, error_out);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue