3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/OrientationType.h"
7#include "mc/client/gui/controls/UIComponent.h"
8#include "mc/deps/core/utility/pub_sub/Publisher.h"
15namespace Bedrock::PubSub::ThreadModel {
struct MultiThreaded; }
22 ::ll::TypedStorage<4, 8, ::glm::ivec2> mDimensions;
23 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::UIControl>> mGridItemTemplate;
24 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControlFactory>> mControlFactory;
25 ::ll::TypedStorage<8, 32, ::std::string> mGridDimensionBinding;
26 ::ll::TypedStorage<8, 32, ::std::string> mCollectionName;
27 ::ll::TypedStorage<1, 1, ::ui::OrientationType> mGridRescalingType;
28 ::ll::TypedStorage<1, 1, ::ui::OrientationType> mGridFillDirection;
29 ::ll::TypedStorage<4, 4, int> mMaximumGridItems;
30 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::UIControl>>> mCachedControls;
31 ::ll::TypedStorage<1, 1, bool> mLowMemoryMode;
32 ::ll::TypedStorage<4, 4, int> mPartialCreationStartIndex;
33 ::ll::TypedStorage<4, 4, int> mPartialCreationEndIndex;
37 ::Bedrock::PubSub::Publisher<void(uint64), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0>>
48 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
50 virtual void reset() ;
52 virtual void onNotifyChildAdded() ;
54 virtual void onNotifyChildRemoved() ;
60 MCAPI GridComponent(::UIControl& owner, ::std::weak_ptr<::UIControlFactory> factoryPtr);
62 MCAPI
void _assignStaticGridItemIndexes();
64 MCAPI
void _cacheGridItemControlAt(::UIControl& owner, uint64
const& index);
66 MCAPI
void _createGridItemAt(
int index);
68 MCAPI
void _reconstructGridItem(::UIControl& gridItem,
int gridItemIndex);
70 MCAPI ::std::pair<int, int> getClippedCollectionRange()
const;
72 MCFOLD ::std::string
const& getCollectionName()
const;
74 MCAPI
int getExpectedSize()
const;
76 MCFOLD ::glm::ivec2
const& getGridDimensions()
const;
78 MCAPI ::ui::OrientationType
const& getGridFillDirection()
const;
80 MCFOLD ::std::shared_ptr<::UIControl> getGridItemTemplate()
const;
82 MCFOLD ::ui::OrientationType
const& getGridRescalingType()
const;
84 MCFOLD
int getMaximumGridItems()
const;
86 MCAPI
bool getNeedsRescaling()
const;
88 MCFOLD
bool isDynamic()
const;
90 MCAPI
bool partiallyCreateGridItems(
int startIndex,
int endIndex);
92 MCAPI
void reassignGridPositions();
94 MCAPI
void refreshGridItems();
96 MCFOLD ::Bedrock::PubSub::Subscription registerGridCompletionListener(::std::function<
void(uint64)> callback);
98 MCFOLD
void setCollectionName(::std::string
const& collectionName);
100 MCFOLD
void setGridDimensionBinding(::std::string
const& binding);
102 MCAPI
void setGridDimensions(::glm::ivec2
const& dimensions);
104 MCAPI
void setGridFillDirection(::ui::OrientationType
const& val);
106 MCAPI
void setGridItemTemplate(::std::shared_ptr<::UIControl> gridItemTemplate);
108 MCAPI
void setGridRescalingType(::ui::OrientationType
const& val);
110 MCFOLD
void setLowMemoryMode(
bool lowMemoryMode);
112 MCAPI
void setMaximumGridItems(
int val);
118 MCAPI
void* $ctor(::UIControl& owner, ::std::weak_ptr<::UIControlFactory> factoryPtr);
124 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner)
const;
126 MCFOLD
void $reset();
128 MCFOLD
void $onNotifyChildAdded();
130 MCFOLD
void $onNotifyChildRemoved();
Definition Subscription.h:10
Definition GridComponent.h:5
static MCAPI void ** $vftable()
Definition UIComponent.h:5
Definition UIControlFactory.h:5
Definition MultiThreaded.h:7