nativeViewRow (Function)

Signature: nativeViewRow(kind: int, parent: int, action: int, words: string, ink: int, fill: int, points: float, inset: float, gap: float, corner: float, heft: int) -> int

Description: Appends one control and its text to the view frame the host seals. Returns the row for its children to name as parent, or -1 once the view is refused.

Parameters

  • kind (int): The control kind
  • parent (int): The parent row, -1 for the root
  • action (int): The action ordinal, -1 for none
  • words (string): The control's text
  • ink (int): Text colour as 0xRRGGBBAA
  • fill (int): Background colour as 0xRRGGBBAA
  • points (float): Text size
  • inset (float): Padding
  • gap (float): Space between children
  • corner (float): Corner radius
  • heft (int): Font weight from 100 to 900

Returns: int

Example

let row = nativeViewRow(2, -1, -1, "Hello", 255, 0, 14.0, 4.0, 0.0, 0.0, 400)
let fitted = nativeViewExtend(row, 120.0, 0.0, 0.0, 0, 0, "")
print("row=${row}; fitted=${fitted}")
row = nativeViewRow (2, -1, -1, "Hello", 255, 0, 14.0, 4.0, 0.0, 0.0, 400)
fitted = nativeViewExtend (row, 120.0, 0.0, 0.0, 0, 0, "")
print "row=${row}; fitted=${fitted}"