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 implementationStandard 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
andFUIControlState
Declaration
Swift
func tintAttributes(for itemType: FUIKPIViewItemStyle, state: FUIControlState) -> [NSAttributedStringKey : Any]
-
Attributes acquired from
.nss
stylesheet.Declaration
Swift
func styleSheetAttributes(for itemType: FUIKPIViewItemStyle) -> [NSAttributedStringKey : Any]
-
kerningAttribute(for:)
Default implementationKerning dimension for various
FUIKPIViewItem
combinationsDefault Implementation
Kerning dimension for various
FUIKPIViewItem
combinations (default implementation)Declaration
Swift
func kerningAttribute(for kerningCase: FUIKPIView.LeadingItemKerning) -> CGFloat
-
kpiParagraphStyle()
Default implementationParagraph style for the KPI (standard only)
Default Implementation
Paragraph style for the KPI (default implementation)
Declaration
Swift
func kpiParagraphStyle() -> NSParagraphStyle
-
mergedAttributes(for:)
Extension methodResultant set of attributes after computing default/system attributes, tint attributes, and nss attributes
Declaration
Swift
public func mergedAttributes(for itemType: FUIKPIViewItemStyle) -> [NSAttributedStringKey : Any]
-
styleSheetAttributes(for:)
Default implementationDefault Implementation
Attributes acquired from
.nss
stylesheet.Declaration
Swift
public func styleSheetAttributes(for itemType: FUIKPIViewItemStyle) -> [NSAttributedStringKey : Any]
-
mergedAttributes(for:)
Extension methodResultant set of attributes after computing default/system attributes, tint attributes, and nss attributes
Declaration
Swift
public func mergedAttributes(for itemType: FUIKPIViewItemStyle) -> [NSAttributedStringKey : Any]
-
tintAttributes(for:state:)
Default implementationDefault Implementation
Method returning an array of tintAttributes for a given
FUIPropertyRef
andFUIControlState
Declaration
Swift
public func tintAttributes(for itemType: FUIKPIViewItemStyle, state: FUIControlState) -> [NSAttributedStringKey : Any]