- font_face
- font_size
- x
- y
- label
- formatter
- step
- lvl
- border
- fill
- size
- padding
- margin
- flow
- align
- line_wrap
- selected
- scroll_window
- scroll_focus
- font_headroom
- font_leftroom
}
- ...
}
}
}
}
}
}
}
}
}
}
}
a base affordance type for the _txt
group - all other affordances in the group inherit from this type and share the display properties. the user may extend this type in order to define a custom affordance with text output.
an output only text type, value
is displayed and may be a string, a table of strings, or a table of tables of strings. useful for evaluating the various display properties. each string provided will be it's own "text block" with positioning and sizing set based on a combination of multiple proeries in the parent affordance (think "norns css").
an integer or fractional number. label
defaults to k
.
like the paramset
"control" type, a number with musicaly convenient properties. a controlspec
is used internally, which may be provided at init time rather than properties. label
defaults to k
.
like the paramset
"option" type, a list of strings or numbers to be iterated through. the value
property stored is the index of the active option (the value at this index is returned as the third argument to action
). all options are displayed, with the index value
set to the selected
property. useful in conjunction with the scroll_window
and scroll_focus
properties.
like option, but may display a list of other affordance types in the _txt
group, enabling only the object at the selected
index. think "params menu" but nest_
y.
an affordance that blinks for blinktime
seconds and runs action
on keypress. selected
is set to the high indicies of value
. label
is the displayed text, which defaults to k
.
a "held" button where value
goes high where a key is depressed, low where a key is released. selected
is set to the high indicies of value
. label
is the displayed text, which defaults to k
.
a button where value
toggles between high and low on a keypress. if lvl
has a table length greater than two, a toggle
button will cycle forward through those brightness values. selected
is set to the high indicies of value
. label
is the displayed text, which defaults to k
.
a number indicating the font face.
a number indicating the font size.
the x component of the text position. this may be:
- a single number, to specify where a text group starts from on this axis (alignment)
- a table with two values, to specify where a text group begins and ends on this axis (justified)
- a table of tables, to specify exact boundaries for each string in the text group on this axis (manual placement)
the y component of the text position. this may be:
- a single number, to specify where a text group starts from on this axis (alignment)
- a table with two values, to specify where a text group begins and ends on this axis (justified)
- a table of tables, to specify exact boundaries for each string in the text group on this axis (manual placement)
a label to be displayed for input types. defaults to k
. set label = false
to remove the label.
a function that takes text as an argument & returns transformed text.
displayed number values are rounded down to this division (default is 0.01)
bightness level of the text to display.
brightness level of the text box border. 0 for no border.
brightness level of the text box fill. 0 for no fill.
a specifies a static width and height for the text box. a table of two sets width & height independently. the flag 'auto'
spefifies that an axis should be sized automatically.
the padding space between text and box edges for an auto-sized box.
the space between multiple text boxes.
specifies the axis over which a text group will flow. either 'x'
or 'y'
.
sets position alignment for a text group axis when x and/or y is a single number. may take the form:
'left'
,'center'
or'right'
{ ['left' / 'center' / 'right'] , ['top' / 'bottom' / 'center'] }
specifies a single line of a text group to wrap to the next line after this number of strings has been placed on the line.
specifies an index or a table of indicies to be "selected" within a text group. for the properties lvl
, border
, fill
, font_face
, font_size
, a table of two values my be provided, the first of which correlates to an unselected item, the second for a selected. this is mostly set by objects internally, see types.
when selection is used, specifies a number of text items to scroll through. useful for option
or list
affordances with many items.
specifies a boundary within the window the selection will move across before scrolling. either a single index or a table of min/max boundaries.