21 std::string>(std::string_view)>;
23 : language_(language), text_(std::move(
text)) {}
26 { tokenImages_ = std::move(
provider); cache_.clear(); }
37 { properties_ = std::move(
provider); propertyText_ = std::move(
text); cache_.clear(); }
49 std::vector<DeedFill>
fills; std::vector<DeedText>
text;
57 { deedPlacement_ = std::move(
provider); cache_.clear(); }
59 std::string_view,
int,
bool,
bool)>;
78 { idleCardPresentation_=std::move(
provider);cache_.clear(); }
86 { presentationContext_ = std::move(
predicate); }
89 { actionText_=std::move(
rasterizer);cache_.clear(); }
92 { layout_ = std::move(
provider); cache_.clear(); }
101 data::DataId root, std::shared_ptr<const data::BitmapRuntimeAsset> original,
104 std::optional<std::uint16_t>
priority = {},
112 std::function<
bool()> presentationContext_;
113 std::map<data::DataId,DeedDescriptor> deeds_;
116 std::map<data::DataId,DrawCardDescriptor> drawCards_;
121 using Key = std::tuple<data::DataId, std::uint32_t, std::uint32_t, bool, std::array<float,9>,
int,
122 std::optional<std::array<float,4>>,
const data::BitmapRuntimeAsset*>;
125 std::shared_ptr<const data::BitmapRuntimeAsset> replacement;
128 std::shared_ptr<const data::BitmapRuntimeAsset> original;
130 std::map<Key, CachedArtwork> cache_;
ModernIBarSkin(data::LanguageId language, TextRasterizer text)
void configureDeedPlacementProvider(DeedPlacementProvider provider)
std::shared_ptr< const data::BitmapRuntimeAsset > substitute(data::DataId root, std::shared_ptr< const data::BitmapRuntimeAsset > original, bool principal=true, std::optional< sequence::Matrix2D > rasterToWorld={}, std::optional< std::uint16_t > priority={}, std::optional< sequence::Matrix2D > sequenceToWorld={})
void configurePresentationContext(std::function< bool()> predicate)
void configureTokenImages(TokenImageProvider provider)
std::function< std::optional< std::array< float, 4 > >(data::DataId, std::uint16_t priority, const sequence::Matrix2D &rasterToWorld)> DeedPlacementProvider
void configurePropertyDescriptors(DescriptorProvider provider, TextRasterizer text)
void configureLayoutProvider(LayoutProvider provider)
std::function< std::shared_ptr< const data::LegacyBitmapRGBA8 >(std::uint8_t token)> TokenImageProvider
bool supportsIdleCardPresentation(data::DataId root) const noexcept
bool supports(data::DataId root) const noexcept
void configureActionText(TextRasterizer rasterizer)
std::function< layout::ActionButtonLayout()> LayoutProvider
void configureDrawCardDescriptors(std::map< data::DataId, DrawCardDescriptor > descriptors, DeedTextRasterizer rasterizer)
std::function< std::optional< PropertyDescriptor >(unsigned)> DescriptorProvider
void configureDeedDescriptors(std::map< data::DataId, DeedDescriptor > descriptors, DeedTextRasterizer rasterizer)
std::function< std::expected< data::LegacyBitmapRGBA8, std::string >(std::string_view, int, bool, bool)> DeedTextRasterizer
void configureIdleCardPresentation(IdleCardPresentationProvider provider)
std::function< std::optional< IdleCardPresentation >(data::DataId, std::uint16_t, const sequence::Matrix2D &sequenceToWorld)> IdleCardPresentationProvider
bool supportsAuctionToken(data::DataId root) const noexcept
bool supportsCardFaceIn(data::DataId root) const noexcept
std::function< std::expected< data::LegacyBitmapRGBA8, std::string >(std::string_view)> TextRasterizer
std::vector< DeedText > text
std::optional< DeedArtwork > artwork
std::vector< DeedFill > fills
std::uint32_t nativeWidth
std::uint32_t nativeHeight
std::array< float, 4 > localRect