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
element
The XmlElement, which contains this TreeViewItem.
context
The 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
element
The XmlElement, where the TreeViewItem will be saved.
context
The XmlContext, where the TreeViewItem will be saved.
-
Draws the tree path.
Declaration
Parameters
canvas
The canvas where the tree path is drawn.
x
The x-coordinate of The point where drawing starts.
y
The y-coordinate of The point where drawing ends.
offset
The offset.
clip
The rectangle that sets the clipping region for the drawing.
depth
The 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) -> Rect
Return Value
The rectangle.
-
Gets the count of the children of this TreeViewItem.
Declaration
Swift
open func countItems() -> Int
Return 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