Max 5 API Reference
The textfield is a high-level text display object that may be used by a UI object to represent text in a patcher. More...
![]() |
Functions | |
t_object * | textfield_get_owner (t_object *tf) |
Return the object that owns a particular textfield. | |
t_max_err | textfield_get_textcolor (t_object *tf, t_jrgba *prgba) |
Retrieve the color of the text in a textfield. | |
t_max_err | textfield_set_textcolor (t_object *tf, t_jrgba *prgba) |
Set the color of the text in a textfield. | |
t_max_err | textfield_get_bgcolor (t_object *tf, t_jrgba *prgba) |
Retrieve the background color of a textfield. | |
t_max_err | textfield_set_bgcolor (t_object *tf, t_jrgba *prgba) |
Set the background color of a textfield. | |
t_max_err | textfield_get_textmargins (t_object *tf, double *pleft, double *ptop, double *pright, double *pbottom) |
Retrieve the margins from the edge of the textfield to the text itself in a textfield. | |
t_max_err | textfield_set_textmargins (t_object *tf, double left, double top, double right, double bottom) |
Set the margins from the edge of the textfield to the text itself in a textfield. | |
char | textfield_get_editonclick (t_object *tf) |
Return the value of the 'editonclick' attribute of a textfield. | |
t_max_err | textfield_set_editonclick (t_object *tf, char c) |
Set the 'editonclick' attribute of a textfield. | |
char | textfield_get_selectallonedit (t_object *tf) |
Return the value of the 'selectallonedit' attribute of a textfield. | |
t_max_err | textfield_set_selectallonedit (t_object *tf, char c) |
Set the 'selectallonedit' attribute of a textfield. | |
char | textfield_get_noactivate (t_object *tf) |
Return the value of the 'noactivate' attribute of a textfield. | |
t_max_err | textfield_set_noactivate (t_object *tf, char c) |
Set the 'noactivate' attribute of a textfield. | |
char | textfield_get_readonly (t_object *tf) |
Return the value of the 'readonly' attribute of a textfield. | |
t_max_err | textfield_set_readonly (t_object *tf, char c) |
Set the 'readonly' attribute of a textfield. | |
char | textfield_get_wordwrap (t_object *tf) |
Return the value of the 'wordwrap' attribute of a textfield. | |
t_max_err | textfield_set_wordwrap (t_object *tf, char c) |
Set the 'wordwrap' attribute of a textfield. | |
char | textfield_get_useellipsis (t_object *tf) |
Return the value of the 'useellipsis' attribute of a textfield. | |
t_max_err | textfield_set_useellipsis (t_object *tf, char c) |
Set the 'useellipsis' attribute of a textfield. | |
char | textfield_get_autoscroll (t_object *tf) |
Return the value of the 'autoscroll' attribute of a textfield. | |
t_max_err | textfield_set_autoscroll (t_object *tf, char c) |
Set the 'autoscroll' attribute of a textfield. | |
char | textfield_get_wantsreturn (t_object *tf) |
Return the value of the 'wantsreturn' attribute of a textfield. | |
t_max_err | textfield_set_wantsreturn (t_object *tf, char c) |
Set the 'wantsreturn' attribute of a textfield. | |
char | textfield_get_wantstab (t_object *tf) |
Return the value of the 'wantstab' attribute of a textfield. | |
t_max_err | textfield_set_wantstab (t_object *tf, char c) |
Set the 'wantstab' attribute of a textfield. | |
char | textfield_get_underline (t_object *tf) |
Return the value of the 'underline' attribute of a textfield. | |
t_max_err | textfield_set_underline (t_object *tf, char c) |
Set the 'underline' attribute of a textfield. | |
t_max_err | textfield_set_emptytext (t_object *tf, t_symbol *txt) |
Set the 'empty' text of a textfield. | |
t_symbol * | textfield_get_emptytext (t_object *tf) |
Retrieve the 'empty' text of a textfield. |
The textfield is a high-level text display object that may be used by a UI object to represent text in a patcher.
It is built on the lower-level TextLayout
char textfield_get_autoscroll | ( | t_object * | tf | ) |
Return the value of the 'autoscroll' attribute of a textfield.
tf | The textfield instance pointer. |
Retrieve the background color of a textfield.
tf | The textfield instance pointer. | |
prgba | The address of a valid t_jrgba whose values will be filled-in upon return. |
char textfield_get_editonclick | ( | t_object * | tf | ) |
Return the value of the 'editonclick' attribute of a textfield.
tf | The textfield instance pointer. |
Retrieve the 'empty' text of a textfield.
The empty text is the text that is displayed in the textfield when no text is present. By default this is gensym("").
tf | The textfield instance pointer. |
char textfield_get_noactivate | ( | t_object * | tf | ) |
Return the value of the 'noactivate' attribute of a textfield.
tf | The textfield instance pointer. |
Return the object that owns a particular textfield.
tf | The textfield instance pointer. |
char textfield_get_readonly | ( | t_object * | tf | ) |
Return the value of the 'readonly' attribute of a textfield.
tf | The textfield instance pointer. |
char textfield_get_selectallonedit | ( | t_object * | tf | ) |
Return the value of the 'selectallonedit' attribute of a textfield.
tf | The textfield instance pointer. |
Retrieve the color of the text in a textfield.
tf | The textfield instance pointer. | |
prgba | The address of a valid t_jrgba whose values will be filled-in upon return. |
t_max_err textfield_get_textmargins | ( | t_object * | tf, | |
double * | pleft, | |||
double * | ptop, | |||
double * | pright, | |||
double * | pbottom | |||
) |
Retrieve the margins from the edge of the textfield to the text itself in a textfield.
tf | The textfield instance pointer. | |
pleft | The address of a variable to hold the value of the left margin upon return. | |
ptop | The address of a variable to hold the value of the top margin upon return. | |
pright | The address of a variable to hold the value of the right margin upon return. | |
pbottom | The address of a variable to hold the value of the bottom margin upon return. |
char textfield_get_underline | ( | t_object * | tf | ) |
Return the value of the 'underline' attribute of a textfield.
tf | The textfield instance pointer. |
char textfield_get_useellipsis | ( | t_object * | tf | ) |
Return the value of the 'useellipsis' attribute of a textfield.
tf | The textfield instance pointer. |
char textfield_get_wantsreturn | ( | t_object * | tf | ) |
Return the value of the 'wantsreturn' attribute of a textfield.
tf | The textfield instance pointer. |
char textfield_get_wantstab | ( | t_object * | tf | ) |
Return the value of the 'wantstab' attribute of a textfield.
tf | The textfield instance pointer. |
char textfield_get_wordwrap | ( | t_object * | tf | ) |
Return the value of the 'wordwrap' attribute of a textfield.
tf | The textfield instance pointer. |
Set the 'autoscroll' attribute of a textfield.
tf | The textfield instance pointer. | |
c | The new value for the attribute. |
Set the background color of a textfield.
tf | The textfield instance pointer. | |
prgba | The address of a t_jrgba containing the new color to use. |
Set the 'editonclick' attribute of a textfield.
tf | The textfield instance pointer. | |
c | The new value for the attribute. |
Set the 'empty' text of a textfield.
The empty text is the text that is displayed in the textfield when no text is present. By default this is gensym("").
tf | The textfield instance pointer. | |
txt | A symbol containing the new text to display when the textfield has no content. |
Set the 'noactivate' attribute of a textfield.
tf | The textfield instance pointer. | |
c | The new value for the attribute. |
Set the 'readonly' attribute of a textfield.
tf | The textfield instance pointer. | |
c | The new value for the attribute. |
Set the 'selectallonedit' attribute of a textfield.
tf | The textfield instance pointer. | |
c | The new value for the attribute. |
Set the color of the text in a textfield.
tf | The textfield instance pointer. | |
prgba | The address of a t_jrgba containing the new color to use. |
t_max_err textfield_set_textmargins | ( | t_object * | tf, | |
double | left, | |||
double | top, | |||
double | right, | |||
double | bottom | |||
) |
Set the margins from the edge of the textfield to the text itself in a textfield.
tf | The textfield instance pointer. | |
left | The new value for the left margin. | |
top | The new value for the top margin. | |
right | The new value for the right margin. | |
bottom | The new value for the bottom margin. |
Set the 'underline' attribute of a textfield.
tf | The textfield instance pointer. | |
c | The new value for the attribute. |
Set the 'useellipsis' attribute of a textfield.
tf | The textfield instance pointer. | |
c | The new value for the attribute. |
Set the 'wantsreturn' attribute of a textfield.
tf | The textfield instance pointer. | |
c | The new value for the attribute. |
Set the 'wantstab' attribute of a textfield.
tf | The textfield instance pointer. | |
c | The new value for the attribute. |