TreeViewItem
open class TreeViewItem : Hashable, Equatable
Represents a constituent item of the hierarchy displayed inside a TreeViewNode.
-
Initializes a new instance of the TreeViewItem class.
Declaration
Swift
public init()Return Value
The newly created TreeViewItem object.
-
Draws the TreeViewItem using the specified canvas object.
Declaration
Swift
open func draw(_ canvas: Canvas, clip: Rect, parent: TreeViewNode, firstDrawn: inout Int, count: inout Bool) -
Loads this TreeViewItem node from the specified XML context and element.
Declaration
Swift
open func loadFromXml(_ element: XmlElement, context: XmlContext)Parameters
elementThe XmlElement, which contains this TreeViewItem.
contextThe XmlContext, which contains this TreeViewItem.
-
Saves this TreeViewItem into the specified XML context and element.
Declaration
Swift
open func saveToXml(_ element: XmlElement, context: XmlContext)Parameters
elementThe XmlElement, where the TreeViewItem will be saved.
contextThe XmlContext, where the TreeViewItem will be saved.
-
Draws the tree path.
Declaration
Parameters
canvasThe canvas where the tree path is drawn.
xThe x-coordinate of The point where drawing starts.
yThe y-coordinate of The point where drawing ends.
offsetThe offset.
clipThe rectangle that sets the clipping region for the drawing.
depthThe depth of the tree where the TreeViewItem is located.
Return Value
The height of the drawn content.
-
Gets the rectangle of the TreeViewItem’s icon.
Declaration
Swift
open func getIconRect(_ mm: Double) -> RectReturn Value
The rectangle.
-
Gets the count of the children of this TreeViewItem.
Declaration
Swift
open func countItems() -> IntReturn Value
The count of the children.
-
Applies the specified operation on all children of the TreeViewItem.
Declaration
Swift
open func forAllItems(_ operation: (TreeViewItem) -> Void) -
Declaration
Swift
public func hash(into hasher: inout Hasher) -
A list with the children of this TreeViewItem.
Declaration
Swift
open var children: [TreeViewItem] -
The image associated with this TreeViewItem. The value can be nil.
Declaration
Swift
open var image: UIImage? -
The label for this TreeViewItem.
Declaration
Swift
open var label: String -
Undocumented
Declaration
Swift
public var height: Double -
Undocumented
Declaration
Swift
public var expanded: Bool
TreeViewItem Class Reference