Skip to content

Commit

Permalink
Refactor ContentStorage into new files
Browse files Browse the repository at this point in the history
  • Loading branch information
watt committed Mar 10, 2023
1 parent a91c453 commit d9cb10b
Show file tree
Hide file tree
Showing 9 changed files with 484 additions and 489 deletions.
18 changes: 18 additions & 0 deletions BlueprintUI/Sources/Element/ContentStorage.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import CoreGraphics

/// The implementation of an `ElementContent`.
protocol ContentStorage {
var childCount: Int { get }

func measure(
in constraint: SizeConstraint,
environment: Environment,
cache: CacheTree
) -> CGSize

func performLayout(
attributes: LayoutAttributes,
environment: Environment,
cache: CacheTree
) -> [(identifier: ElementIdentifier, node: LayoutResultNode)]
}
Loading

0 comments on commit d9cb10b

Please sign in to comment.