ControlSystemType

public protocol ControlSystemType

Base for a control system which handles views and controls from a full hierarchy

  • Called to notify that a view has been removed from the screen’s hierarchy, and any associated events and focus on its sub-hierarchy should be waived.

    Declaration

    Swift

    func viewRemovedFromHierarchy(_ view: View)
  • Sets an event handler as first responder

    Declaration

    Swift

    func setAsFirstResponder(_ eventHandler: EventHandler?, force: Bool) -> Bool

    Parameters

    eventHandler

    An event handler, or nil, in case of an attempt to resign the current first responder.

    force

    Whether to force resignation of first responder, even if eventHandler.canResignFirstResponder returns false.

    Return Value

    Whether the attempt to set the given event handler as first responder was successful.

  • Removes the given event handler as first responder.

    Declaration

    Swift

    func removeAsFirstResponder(_ eventHandler: EventHandler) -> Bool

    Return Value

    Whether the attempt to remove the given event handler as first responder was successful.

  • Removes the first responder if it is a subview in a given hierarchy.

    Declaration

    Swift

    func removeAsFirstResponder(anyInHierarchy view: View) -> Bool

    Return Value

    Whether the attempt to remove a first responder in the given hierarchy was successful.

  • Returns whether a given event handler is the current first responder.

    Declaration

    Swift

    func isFirstResponder(_ eventHandler: EventHandler) -> Bool
  • Changes the current mouse cursor.

    Declaration

    Swift

    func setMouseCursor(_ cursor: MouseCursorKind)
  • Hides the mouse until it is moved by the user.

    Declaration

    Swift

    func setMouseHiddenUntilMouseMoves()
  • Hides any visible tooltip attributed to a view in a given hierarchy.

    Declaration

    Swift

    func hideTooltipFor(anyInHierarchy view: View)