FUIKPIAttributesProvider

public protocol FUIKPIAttributesProvider : AnyObject

Provider for FUIKPIAttributedStringBuilder attributes. Decoupling the style definitions from the string constructor means that the same logic for building string can be shared by all controls taking array of FUIKPIViewItem, while each special control using the items (FUIKPIView, FUIKPIProgressView (small & large), AnalyticViews, etc.,) can have unique styles by supplying a custom implementation of this protocol.

  • Standard attributes for the item type (implemented as Fiori Design Language by default)

    Declaration

    Swift

    func defaultAttributes(for itemType: FUIKPIViewItemStyle) -> [NSAttributedStringKey : Any]
  • tintAttributes(for:state:) Default implementation

    Standard attributes for the item type, in various tint cases (implemented as Fiori Design Language by default)

    Default Implementation

    Method returning an array of tintAttributes for a given FUIPropertyRef and FUIControlState

    Declaration

    Swift

    func tintAttributes(for itemType: FUIKPIViewItemStyle, state: FUIControlState) -> [NSAttributedStringKey : Any]
  • styleSheetAttributes(for:) Default implementation

    Attributes acquired from .nss stylesheet.

    Default Implementation

    Attributes acquired from .nss stylesheet.

    Declaration

    Swift

    func styleSheetAttributes(for itemType: FUIKPIViewItemStyle) -> [NSAttributedStringKey : Any]
  • kerningAttribute(for:) Default implementation

    Kerning dimension for various FUIKPIViewItem combinations

    Default Implementation

    Kerning dimension for various FUIKPIViewItem combinations (default implementation)

    Declaration

    Swift

    func kerningAttribute(for kerningCase: FUIKPIView.LeadingItemKerning) -> CGFloat
  • kpiParagraphStyle() Default implementation

    Paragraph style for the KPI (standard only)

    Default Implementation

    Paragraph style for the KPI (default implementation)

    Declaration

    Swift

    func kpiParagraphStyle() -> NSParagraphStyle