@@ -21,9 +21,19 @@ import CoreGraphics
2121 case important
2222 }
2323
24+ /// A human readable name for the element.
2425 @objc public let name : String ?
26+
27+ /// Classification for an element that determines how it is represented
28+ /// in the view debugger.
2529 @objc public let classification : Classification
2630
31+ /// Constructs a new `Element`
32+ ///
33+ /// - Parameters:
34+ /// - name: A human readable name for the element
35+ /// - classification: Classification for an element that determines how it
36+ /// is represented in the view debugger.
2737 @objc public init ( name: String ? , classification: Classification = . normal) {
2838 self . name = name
2939 self . classification = classification
@@ -32,11 +42,24 @@ import CoreGraphics
3242
3343/// A UI element that can be snapshotted.
3444@objc ( IAVDElement) public protocol Element {
45+ /// Identifying information for the element, like its name and classification.
3546 var label : ElementLabel { get }
47+
48+ /// A shortened description of the element.
3649 var shortDescription : String { get }
50+
51+ /// The full length description of the element.
3752 var description : String { get }
53+
54+ /// The frame of the element in its parent's coordinate space.
3855 var frame : CGRect { get }
56+
57+ /// Whether the element is hidden from view or not.
3958 var isHidden : Bool { get }
59+
60+ /// A snapshot image of the element in its current state.
4061 var snapshotImage : CGImage ? { get }
62+
63+ /// The child elements of the element.
4164 var children : [ Element ] { get }
4265}
0 commit comments