-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add bindable properties for state machines
This PR sets the fundamental pieces for PRs that will be coming afterward to support data binding state machines. The most important parts are: - bindable properties that will be used as binding points for conditions, listeners, and blend animations - data bind objects don't extend from Component anymore to decouple them from artboards - because of that, now data bind objects are written in the context of their bound object so there is a unified way for setting data bind targets The rest is the usual boilerplate code from core objects and some inheritance changes Diffs= b5f342002 add bindable properties for state machines (#7640) Co-authored-by: hernan <[email protected]>
- Loading branch information
Showing
65 changed files
with
1,025 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
f55ebd34f3938bfe1e36ebf83bbc92c0e5d34a62 | ||
b5f342002be71c61608ad6c37835349eb4e7c719 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "BindableProperty", | ||
"key": { | ||
"int": 9, | ||
"string": "bindableproperty" | ||
}, | ||
"abstract": true, | ||
"properties": { | ||
"dataBindId": { | ||
"type": "Id", | ||
"initialValue": "Core.missingId", | ||
"key": { | ||
"int": 633, | ||
"string": "databindid" | ||
}, | ||
"description": "Id of the data bind binded to this property", | ||
"runtime": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "BindablePropertyBoolean", | ||
"key": { | ||
"int": 472, | ||
"string": "bindablepropertyboolean" | ||
}, | ||
"extends": "data_bind/bindable_property.json", | ||
"properties": { | ||
"propertyValue": { | ||
"type": "bool", | ||
"initialValue": "false", | ||
"key": { | ||
"int": 634, | ||
"string": "propertyvalue" | ||
}, | ||
"description": "A property of type bool that can be used for data binding." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "BindablePropertyColor", | ||
"key": { | ||
"int": 475, | ||
"string": "bindablepropertycolor" | ||
}, | ||
"extends": "data_bind/bindable_property.json", | ||
"properties": { | ||
"propertyValue": { | ||
"type": "Color", | ||
"initialValue": "0xFF1D1D1D", | ||
"key": { | ||
"int": 638, | ||
"string": "propertyvalue" | ||
}, | ||
"description": "A property of type int that can be used for data binding." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "BindablePropertyEnum", | ||
"key": { | ||
"int": 474, | ||
"string": "bindablepropertyenum" | ||
}, | ||
"extends": "data_bind/bindable_property.json", | ||
"properties": { | ||
"propertyValue": { | ||
"type": "Id", | ||
"typeRuntime": "uint", | ||
"initialValue": "Core.missingId", | ||
"initialValueRuntime": "-1", | ||
"key": { | ||
"int": 637, | ||
"string": "propertyvalue" | ||
}, | ||
"description": "The id of the enum that can be used for data binding." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "BindablePropertyNumber", | ||
"key": { | ||
"int": 473, | ||
"string": "bindablepropertynumber" | ||
}, | ||
"extends": "data_bind/bindable_property.json", | ||
"properties": { | ||
"propertyValue": { | ||
"type": "double", | ||
"initialValue": "0", | ||
"key": { | ||
"int": 636, | ||
"string": "propertyvalue" | ||
}, | ||
"description": "A property of type double that can be used for data binding." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "BindablePropertyString", | ||
"key": { | ||
"int": 471, | ||
"string": "bindablepropertystring" | ||
}, | ||
"extends": "data_bind/bindable_property.json", | ||
"properties": { | ||
"propertyValue": { | ||
"type": "String", | ||
"initialValue": "''", | ||
"key": { | ||
"int": 635, | ||
"string": "propertyvalue" | ||
}, | ||
"description": "A property of type String that can be used for data binding." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef _RIVE_BINDABLE_PROPERTY_HPP_ | ||
#define _RIVE_BINDABLE_PROPERTY_HPP_ | ||
#include "rive/generated/data_bind/bindable_property_base.hpp" | ||
#include "rive/data_bind/data_bind.hpp" | ||
#include <stdio.h> | ||
namespace rive | ||
{ | ||
class BindableProperty : public BindablePropertyBase | ||
{ | ||
public: | ||
void dataBind(DataBind* value) { m_dataBind = value; }; | ||
DataBind* dataBind() { return m_dataBind; }; | ||
|
||
private: | ||
DataBind* m_dataBind; | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef _RIVE_BINDABLE_PROPERTY_BOOLEAN_HPP_ | ||
#define _RIVE_BINDABLE_PROPERTY_BOOLEAN_HPP_ | ||
#include "rive/generated/data_bind/bindable_property_boolean_base.hpp" | ||
#include <stdio.h> | ||
namespace rive | ||
{ | ||
class BindablePropertyBoolean : public BindablePropertyBooleanBase | ||
{ | ||
public: | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef _RIVE_BINDABLE_PROPERTY_COLOR_HPP_ | ||
#define _RIVE_BINDABLE_PROPERTY_COLOR_HPP_ | ||
#include "rive/generated/data_bind/bindable_property_color_base.hpp" | ||
#include <stdio.h> | ||
namespace rive | ||
{ | ||
class BindablePropertyColor : public BindablePropertyColorBase | ||
{ | ||
public: | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef _RIVE_BINDABLE_PROPERTY_ENUM_HPP_ | ||
#define _RIVE_BINDABLE_PROPERTY_ENUM_HPP_ | ||
#include "rive/generated/data_bind/bindable_property_enum_base.hpp" | ||
#include <stdio.h> | ||
namespace rive | ||
{ | ||
class BindablePropertyEnum : public BindablePropertyEnumBase | ||
{ | ||
public: | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef _RIVE_BINDABLE_PROPERTY_NUMBER_HPP_ | ||
#define _RIVE_BINDABLE_PROPERTY_NUMBER_HPP_ | ||
#include "rive/generated/data_bind/bindable_property_number_base.hpp" | ||
#include <stdio.h> | ||
namespace rive | ||
{ | ||
class BindablePropertyNumber : public BindablePropertyNumberBase | ||
{ | ||
public: | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef _RIVE_BINDABLE_PROPERTY_STRING_HPP_ | ||
#define _RIVE_BINDABLE_PROPERTY_STRING_HPP_ | ||
#include "rive/generated/data_bind/bindable_property_string_base.hpp" | ||
#include <stdio.h> | ||
namespace rive | ||
{ | ||
class BindablePropertyString : public BindablePropertyStringBase | ||
{ | ||
public: | ||
}; | ||
} // namespace rive | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.