TextField

The textfield is a high-level text display object that may be used by a UI object to represent text in a patcher. More...

+ Collaboration diagram for TextField:

Functions

t_objecttextfield_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_symboltextfield_get_emptytext (t_object *tf)
 Retrieve the 'empty' text of a textfield.

Detailed Description

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


Function Documentation

char textfield_get_autoscroll ( t_object tf)

Return the value of the 'autoscroll' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
t_max_err textfield_get_bgcolor ( t_object tf,
t_jrgba prgba 
)

Retrieve the background color of a textfield.

Parameters:
tfThe textfield instance pointer.
prgbaThe address of a valid t_jrgba whose values will be filled-in upon return.
Returns:
A Max error code.
char textfield_get_editonclick ( t_object tf)

Return the value of the 'editonclick' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
t_symbol* textfield_get_emptytext ( t_object tf)

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("").

Parameters:
tfThe textfield instance pointer.
Returns:
The current text used as the empty text.
char textfield_get_noactivate ( t_object tf)

Return the value of the 'noactivate' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
t_object* textfield_get_owner ( t_object tf)

Return the object that owns a particular textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A pointer to the owning object.
char textfield_get_readonly ( t_object tf)

Return the value of the 'readonly' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
char textfield_get_selectallonedit ( t_object tf)

Return the value of the 'selectallonedit' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
t_max_err textfield_get_textcolor ( t_object tf,
t_jrgba prgba 
)

Retrieve the color of the text in a textfield.

Parameters:
tfThe textfield instance pointer.
prgbaThe address of a valid t_jrgba whose values will be filled-in upon return.
Returns:
A Max error code.
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.

Parameters:
tfThe textfield instance pointer.
pleftThe address of a variable to hold the value of the left margin upon return.
ptopThe address of a variable to hold the value of the top margin upon return.
prightThe address of a variable to hold the value of the right margin upon return.
pbottomThe address of a variable to hold the value of the bottom margin upon return.
Returns:
A Max error code.
char textfield_get_underline ( t_object tf)

Return the value of the 'underline' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
char textfield_get_useellipsis ( t_object tf)

Return the value of the 'useellipsis' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
char textfield_get_wantsreturn ( t_object tf)

Return the value of the 'wantsreturn' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
char textfield_get_wantstab ( t_object tf)

Return the value of the 'wantstab' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
char textfield_get_wordwrap ( t_object tf)

Return the value of the 'wordwrap' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
Returns:
A value of the attribute.
t_max_err textfield_set_autoscroll ( t_object tf,
char  c 
)

Set the 'autoscroll' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.
t_max_err textfield_set_bgcolor ( t_object tf,
t_jrgba prgba 
)

Set the background color of a textfield.

Parameters:
tfThe textfield instance pointer.
prgbaThe address of a t_jrgba containing the new color to use.
Returns:
A Max error code.
t_max_err textfield_set_editonclick ( t_object tf,
char  c 
)

Set the 'editonclick' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.
t_max_err textfield_set_emptytext ( t_object tf,
t_symbol txt 
)

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("").

Parameters:
tfThe textfield instance pointer.
txtA symbol containing the new text to display when the textfield has no content.
Returns:
A Max error code.
t_max_err textfield_set_noactivate ( t_object tf,
char  c 
)

Set the 'noactivate' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.
t_max_err textfield_set_readonly ( t_object tf,
char  c 
)

Set the 'readonly' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.
t_max_err textfield_set_selectallonedit ( t_object tf,
char  c 
)

Set the 'selectallonedit' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.
t_max_err textfield_set_textcolor ( t_object tf,
t_jrgba prgba 
)

Set the color of the text in a textfield.

Parameters:
tfThe textfield instance pointer.
prgbaThe address of a t_jrgba containing the new color to use.
Returns:
A Max error code.
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.

Parameters:
tfThe textfield instance pointer.
leftThe new value for the left margin.
topThe new value for the top margin.
rightThe new value for the right margin.
bottomThe new value for the bottom margin.
Returns:
A Max error code.
t_max_err textfield_set_underline ( t_object tf,
char  c 
)

Set the 'underline' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.
t_max_err textfield_set_useellipsis ( t_object tf,
char  c 
)

Set the 'useellipsis' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.
t_max_err textfield_set_wantsreturn ( t_object tf,
char  c 
)

Set the 'wantsreturn' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.
t_max_err textfield_set_wantstab ( t_object tf,
char  c 
)

Set the 'wantstab' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.
t_max_err textfield_set_wordwrap ( t_object tf,
char  c 
)

Set the 'wordwrap' attribute of a textfield.

Parameters:
tfThe textfield instance pointer.
cThe new value for the attribute.
Returns:
A Max error code.