DiagramView

open class DiagramView : UIView

Represents a control for rendering the Diagram. This class inherits UIView.

  • Specifies the horizontal scroll position of the Diagram.

    Declaration

    Swift

    open var scrollX: Double { get set }
  • Specifies the vertical scroll position of the Diagram.

    Declaration

    Swift

    open var scrollY: Double { get set }
  • Specifies the zoom level of the Diagram.

    Declaration

    Swift

    open var zoomLevel: Double { get set }
  • Gets or sets the Diagram displayed by this view.

    Declaration

    Swift

    open var diagram: Diagram { get set }
  • Overrides UIViewController.touchesBegan method for handling the start of user gestures.

    Declaration

    Swift

    override open func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?)
  • Overrides UIViewController.touchesMoved method for handling move user gestures.

    Declaration

    Swift

    override open func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?)
  • Overrides UIViewController.touchesEnded method for handling the end of user gestures.

    Declaration

    Swift

    override open func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?)
  • Implements the onTouchesBegan event.

    Declaration

    Swift

    open var onTouchesBegan: ((_ touches: Set<NSObject>, _ event: UIEvent) -> Void)?
  • Implements the onTouchesMoved event.

    Declaration

    Swift

    open var onTouchesMoved: ((_ touches: Set<NSObject>, _ event: UIEvent) -> Void)?
  • Implements the onTouchesEnded event.

    Declaration

    Swift

    open var onTouchesEnded: ((_ touches: Set<NSObject>, _ event: UIEvent) -> Void)?
  • Implements the onLongPress event.

    Declaration

    Swift

    open var onLongPress: ((_ touches: Set<NSObject>, _ event: UIEvent) -> Void)?
  • Implements the onDoubleTap event.

    Declaration

    Swift

    open var onDoubleTap: ((_ touches: Set<NSObject>, _ event: UIEvent) -> Void)?
  • Gets or sets a value indicating how the view responds to user actions.

    Declaration

    Swift

    open var behavior: Behavior { get set }
  • Undocumented

    Declaration

    Swift

    open func bringIntoView(_ item: DiagramItem)
  • Initializes a new instance of the DiagramView class.

    Declaration

    Swift

    public init()

    Return Value

    The newly created DiagramView object.

  • Initializes a new instance of the DiagramView class with the specified frame.

    Declaration

    Swift

    public override init(frame: CGRect)

    Parameters

    frame

    A CGRect object that represents the frame.

    Return Value

    The newly created DiagramView object.

  • Implement UIView.init(coder aDecoder: NSCoder!)

    Declaration

    Swift

    public required init(coder aDecoder: NSCoder)
  • Undocumented

    Declaration

    Swift

    open var allowInplaceEdit: Bool
  • Draws the specified rect.

    Declaration

    Swift

    open override func draw(_ rect: CGRect)

    Parameters

    rect

    The CGRect to draw.

  • Gets the node at the specified point.

    Declaration

    Swift

    open func getNodeAt(_ point: Point) -> DiagramNode?

    Parameters

    point

    A Point identifying a diagram location.

    Return Value

    The DiagramNode or nil if none is found.

  • Transforms points from the client coordinate space to the document coordinate space.

    Declaration

    Swift

    open func clientToDoc(_ point: CGPoint) -> Point

    Parameters

    point

    An instance of the CGPoint class, whose coordinates should be transformed and returned.

    Return Value

    A Point instance, which represents the document coordinates of point.

  • Transforms points from the client coordinate space to the document coordinate space.

    Declaration

    Swift

    open func clientToDoc(_ point: Point) -> Point

    Parameters

    point

    An instance of the Point class, whose coordinates should be transformed and returned.

    Return Value

    A Point instance, which represents the document coordinates of point.

  • Transforms the coordinates of a rectangle from the client coordinate space to coordinates of a rectangle in the document coordinate space.

    Declaration

    Swift

    open func clientToDocRect(_ rect: CGRect) -> Rect

    Parameters

    rect

    An instance of the CGRect class, whose coordinates should be transformed and returned.

    Return Value

    A Rect instance, which is a rectangle with the document coordinates of the CGRect.

  • Transforms the specified length from the client coordinate space to length in the document coordinate space.

    Declaration

    Swift

    open func clientToDocLen(_ len: Double) -> Double

    Parameters

    len

    The length, which should be transformed and returned.

    Return Value

    The length in document coordinates.

  • Transforms the coordinates of a rectangle from the client coordinate space to coordinates of a rectangle in the document coordinate space.

    Declaration

    Swift

    open func clientToDocRect(_ rect: Rect) -> Rect

    Parameters

    rect

    An instance of the Rect class, whose coordinates should be transformed and returned.

    Return Value

    A Rect instance, which is a rectangle with the document coordinates of the rect.

  • Transforms the coordinates of a point from the document coordinate space to coordinates of a point in the client coordinate space.

    Declaration

    Swift

    public func docToClient(_ point: Point) -> CGPoint

    Parameters

    point

    A Point whose coordinates should be transformed and returned.

    Return Value

    A CGPoint with the client coordinates of point.

  • Transforms the coordinates of a rectangle from the client coordinate space to coordinates of a rectangle in the document coordinate space.

    Declaration

    Swift

    open func docToClientRect(_ rect: Rect) -> CGRect

    Parameters

    rect

    An instance of the Rect class, whose coordinates should be transformed and returned.

    Return Value

    A CGRect instance, which is a rectangle with the client coordinates of the rect.

  • Zooms and scrolls the view to fit the specified document rectangle in the view.

    Declaration

    Swift

    open func zoomToRect(_ rect: Rect)

    Parameters

    rect
  • Undocumented

    Declaration

    Swift

    override open func layoutSubviews()