mirror of
https://github.com/rive-app/rive-cpp.git
synced 2026-01-18 13:11:19 +01:00
* make file ref counted * migrate File to refcnt * add bindable artboard class to keep file reference * feat(unity): support rcp file and BindableArtboard class (#10228) * refactor(apple): use updated file bindable artboard apis (#10229) * update command queue to support bindable artboards * use bindable artboards on command queue * self manage view model instances in js runtime * change remaining viewModelInstanceRuntimes to rcp * refactor(apple): update view model instances to use rcp (#10298) * refactor(unity): support rcp ViewModelInstanceRuntime (#10309) * rebase fix * deprecate getArtboard in favor of getBindableArtboard * fix merge * remove unused lambda capture * fix rive binding * feat(Android): RCP File, VMI, and add bindable artboards (#10456) * refactor: C++ refactors - Import from long (incorrect) -> jlong - Header clang-tidy fix - Use reinterpret_cast instead of C-style cast - Break out some variables instead of long one liners - Use auto - Remove unused env and thisObj # Conflicts: # packages/runtime_android/kotlin/src/main/cpp/src/helpers/general.cpp * docs: Improve documentation on the File class * feat: Support bindable artboard type and RCP VMIs # Conflicts: # packages/runtime_android/kotlin/src/androidTest/java/app/rive/runtime/kotlin/core/RiveDataBindingTest.kt * feat: Support RCP files * refactor: Change from +1/-1 ref to just release * fix: Moved to the more appropriate null pointer for GetStringUTFChars * replace unref with release Co-authored-by: Adam <67035612+damzobridge@users.noreply.github.com> Co-authored-by: David Skuza <david@rive.app> Co-authored-by: Erik <erik@rive.app> Co-authored-by: hernan <hernan@rive.app>
39 lines
1.4 KiB
C++
39 lines
1.4 KiB
C++
#ifndef _RIVE_ARTBOARD_HOST_HPP_
|
|
#define _RIVE_ARTBOARD_HOST_HPP_
|
|
#include "rive/refcnt.hpp"
|
|
#include "rive/file.hpp"
|
|
#include <stdio.h>
|
|
namespace rive
|
|
{
|
|
class ArtboardInstance;
|
|
class DataBind;
|
|
class DataContext;
|
|
class ViewModelInstance;
|
|
|
|
class ArtboardHost
|
|
{
|
|
public:
|
|
virtual size_t artboardCount() = 0;
|
|
virtual ArtboardInstance* artboardInstance(int index = 0) = 0;
|
|
virtual std::vector<uint32_t> dataBindPathIds() { return {}; }
|
|
virtual void internalDataContext(DataContext* dataContext) = 0;
|
|
virtual void bindViewModelInstance(rcp<ViewModelInstance> viewModelInstance,
|
|
DataContext* parent) = 0;
|
|
virtual void clearDataContext() = 0;
|
|
virtual void unbind() = 0;
|
|
virtual void updateDataBinds() = 0;
|
|
virtual void markHostingLayoutDirty(ArtboardInstance* artboardInstance) {}
|
|
// The artboard that contains this ArtboardHost
|
|
virtual Artboard* parentArtboard() = 0;
|
|
virtual bool hitTestHost(const Vec2D& position,
|
|
bool skipOnUnclipped,
|
|
ArtboardInstance* artboard) = 0;
|
|
virtual Vec2D hostTransformPoint(const Vec2D&, ArtboardInstance*) = 0;
|
|
virtual void markHostTransformDirty() = 0;
|
|
virtual bool isLayoutProvider() { return false; }
|
|
virtual void file(File* value) = 0;
|
|
virtual File* file() const = 0;
|
|
};
|
|
} // namespace rive
|
|
|
|
#endif |