Max 5 API Reference
The patcher. More...
![]() |
Functions | |
int | jpatcher_is_patcher (t_object *p) |
Determine of a t_object* is a patcher object. | |
t_object * | jpatcher_get_box (t_object *p) |
If a patcher is inside a box, return its box. | |
long | jpatcher_get_count (t_object *p) |
Determine the number of boxes in a patcher. | |
t_max_err | jpatcher_set_locked (t_object *p, char c) |
Lock or unlock a patcher. | |
char | jpatcher_get_presentation (t_object *p) |
Determine whether a patcher is currently in presentation mode. | |
t_max_err | jpatcher_set_presentation (t_object *p, char c) |
Set a patcher to presentation mode. | |
t_object * | jpatcher_get_firstobject (t_object *p) |
Get the first box in a patcher. | |
t_object * | jpatcher_get_lastobject (t_object *p) |
Get the last box in a patcher. | |
t_object * | jpatcher_get_firstline (t_object *p) |
Get the first line (patch-cord) in a patcher. | |
t_object * | jpatcher_get_firstview (t_object *p) |
Get the first view (jpatcherview) for a given patcher. | |
t_symbol * | jpatcher_get_title (t_object *p) |
Retrieve a patcher's title. | |
t_max_err | jpatcher_set_title (t_object *p, t_symbol *ps) |
Set a patcher's title. | |
t_symbol * | jpatcher_get_name (t_object *p) |
Retrieve a patcher's name. | |
t_symbol * | jpatcher_get_filepath (t_object *p) |
Retrieve a patcher's file path. | |
t_symbol * | jpatcher_get_filename (t_object *p) |
Retrieve a patcher's file name. | |
char | jpatcher_get_dirty (t_object *p) |
Determine whether a patcher's dirty bit has been set. | |
t_max_err | jpatcher_set_dirty (t_object *p, char c) |
Set a patcher's dirty bit. | |
char | jpatcher_get_bglocked (t_object *p) |
Determine whether a patcher's background layer is locked. | |
t_max_err | jpatcher_set_bglocked (t_object *p, char c) |
Set whether a patcher's background layer is locked. | |
char | jpatcher_get_bghidden (t_object *p) |
Determine whether a patcher's background layer is hidden. | |
t_max_err | jpatcher_set_bghidden (t_object *p, char c) |
Set whether a patcher's background layer is hidden. | |
char | jpatcher_get_fghidden (t_object *p) |
Determine whether a patcher's foreground layer is hidden. | |
t_max_err | jpatcher_set_fghidden (t_object *p, char c) |
Set whether a patcher's foreground layer is hidden. | |
t_max_err | jpatcher_get_editing_bgcolor (t_object *p, t_jrgba *prgba) |
Retrieve a patcher's editing background color. | |
t_max_err | jpatcher_set_editing_bgcolor (t_object *p, t_jrgba *prgba) |
Set a patcher's editing background color. | |
t_max_err | jpatcher_get_bgcolor (t_object *p, t_jrgba *prgba) |
Retrieve a patcher's locked background color. | |
t_max_err | jpatcher_set_bgcolor (t_object *p, t_jrgba *prgba) |
Set a patcher's locked background color. | |
t_max_err | jpatcher_get_gridsize (t_object *p, double *gridsizeX, double *gridsizeY) |
Retrieve a patcher's grid size. | |
t_max_err | jpatcher_set_gridsize (t_object *p, double gridsizeX, double gridsizeY) |
Set a patcher's grid size. | |
void | jpatcher_deleteobj (t_object *p, t_jbox *b) |
Delete an object that is in a patcher. | |
t_object * | jpatcher_get_parentpatcher (t_object *p) |
Given a patcher, return its parent patcher. | |
t_object * | jpatcher_get_toppatcher (t_object *p) |
Given a patcher, return the top-level patcher for the tree in which it exists. | |
t_max_err | jpatcher_get_rect (t_object *p, t_rect *pr) |
Query a patcher to determine its location and size. | |
t_max_err | jpatcher_set_rect (t_object *p, t_rect *pr) |
Set a patcher's location and size. | |
t_max_err | jpatcher_get_defrect (t_object *p, t_rect *pr) |
Query a patcher to determine the location and dimensions of its window when initially opened. | |
t_max_err | jpatcher_set_defrect (t_object *p, t_rect *pr) |
Set a patcher's default location and size. | |
t_symbol * | jpatcher_uniqueboxname (t_object *p, t_symbol *classname) |
Generate a unique name for a box in patcher. | |
t_symbol * | jpatcher_get_default_fontname (t_object *p) |
Return the name of the default font used for new objects in a patcher. | |
float | jpatcher_get_default_fontsize (t_object *p) |
Return the size of the default font used for new objects in a patcher. | |
long | jpatcher_get_default_fontface (t_object *p) |
Return the index of the default font face used for new objects in a patcher. | |
long | jpatcher_get_fileversion (t_object *p) |
Return the file version of the patcher. | |
long | jpatcher_get_currentfileversion (void) |
Return the file version for any new patchers, e.g. |
The patcher.
Delete an object that is in a patcher.
p | The patcher. | |
b | The object box to delete. |
Retrieve a patcher's locked background color.
p | The patcher to be queried. | |
prgba | The address of a valid t_jrgba struct that will be filled-in with the current patcher color values. |
char jpatcher_get_bghidden | ( | t_object * | p | ) |
Determine whether a patcher's background layer is hidden.
p | The patcher to be queried. |
char jpatcher_get_bglocked | ( | t_object * | p | ) |
Determine whether a patcher's background layer is locked.
p | The patcher to be queried. |
If a patcher is inside a box, return its box.
p | The patcher to be queried. |
long jpatcher_get_count | ( | t_object * | p | ) |
Determine the number of boxes in a patcher.
p | The patcher to be queried. |
long jpatcher_get_currentfileversion | ( | void | ) |
Return the file version for any new patchers, e.g.
the current version created by Max.
long jpatcher_get_default_fontface | ( | t_object * | p | ) |
Return the index of the default font face used for new objects in a patcher.
p | A pointer to a patcher instance. |
Return the name of the default font used for new objects in a patcher.
p | A pointer to a patcher instance. |
float jpatcher_get_default_fontsize | ( | t_object * | p | ) |
Return the size of the default font used for new objects in a patcher.
p | A pointer to a patcher instance. |
Query a patcher to determine the location and dimensions of its window when initially opened.
p | A pointer to a patcher instance. | |
pr | The address of valid t_rect whose values will be filled-in upon return. |
char jpatcher_get_dirty | ( | t_object * | p | ) |
Determine whether a patcher's dirty bit has been set.
p | The patcher to be queried. |
Retrieve a patcher's editing background color.
p | The patcher to be queried. | |
prgba | The address of a valid t_jrgba struct that will be filled-in with the current patcher color values. |
char jpatcher_get_fghidden | ( | t_object * | p | ) |
Determine whether a patcher's foreground layer is hidden.
p | The patcher to be queried. |
Retrieve a patcher's file name.
p | The patcher to be queried. |
Retrieve a patcher's file path.
p | The patcher to be queried. |
long jpatcher_get_fileversion | ( | t_object * | p | ) |
Return the file version of the patcher.
p | A pointer to the patcher whose version number is desired. |
Get the first line (patch-cord) in a patcher.
All lines in a patcher are maintained internally in a t_linklist. Use this function to begin traversing a patcher's lines.
p | The patcher to be queried. |
Get the first box in a patcher.
All boxes in a patcher are maintained internally in a t_linklist. Use this function together with jbox_get_nextobject() to traverse a patcher.
p | The patcher to be queried. |
Get the first view (jpatcherview) for a given patcher.
All views of a patcher are maintained internally as a t_linklist. Use this function to begin traversing a patcher's views.
p | The patcher to be queried. |
Retrieve a patcher's grid size.
p | The patcher to be queried. | |
gridsizeX | The address of a double that will be set to the current horizontal grid spacing for the patcher. | |
gridsizeY | The address of a double that will be set to the current vertical grid spacing for the patcher. |
Get the last box in a patcher.
All boxes in a patcher are maintained internally in a t_linklist. Use this function together with jbox_get_prevobject() to traverse a patcher.
p | The patcher to be queried. |
Retrieve a patcher's name.
p | The patcher to be queried. |
Given a patcher, return its parent patcher.
p | The patcher to be queried. |
char jpatcher_get_presentation | ( | t_object * | p | ) |
Determine whether a patcher is currently in presentation mode.
p | The patcher to be queried. |
Query a patcher to determine its location and size.
p | A pointer to a patcher instance. | |
pr | The address of valid t_rect whose values will be filled-in upon return. |
Retrieve a patcher's title.
p | The patcher to be queried. |
Given a patcher, return the top-level patcher for the tree in which it exists.
p | The patcher to be queried. |
int jpatcher_is_patcher | ( | t_object * | p | ) |
Determine of a t_object* is a patcher object.
p | The object pointer to test. |
Set a patcher's locked background color.
p | The patcher to be queried. | |
prgba | The address of a t_jrgba struct containing the new color to use. |
Set whether a patcher's background layer is hidden.
p | The patcher whose dirty bit will be set. | |
c | Pass true to hide the patcher's background layer, otherwise pass false. |
Set whether a patcher's background layer is locked.
p | The patcher whose dirty bit will be set. | |
c | Pass true to lock the patcher's background layer, otherwise pass false. |
Set a patcher's default location and size.
p | A pointer to a patcher instance. | |
pr | The address of a t_rect with the new position and size. |
Set a patcher's dirty bit.
p | The patcher whose dirty bit will be set. | |
c | The new value for the patcher's dirty bit (pass true or false). |
Set a patcher's editing background color.
p | The patcher to be queried. | |
prgba | The address of a t_jrgba struct containing the new color to use. |
Set whether a patcher's foreground layer is hidden.
p | The patcher whose dirty bit will be set. | |
c | Pass true to hide the patcher's foreground layer, otherwise pass false. |
Set a patcher's grid size.
p | The patcher to be queried. | |
gridsizeX | The new horizontal grid spacing for the patcher. | |
gridsizeY | The new vertical grid spacing for the patcher. |
Lock or unlock a patcher.
p | The patcher whose locked state will be changed. | |
c | Pass true to lock a patcher, otherwise pass false. |
Set a patcher to presentation mode.
p | The patcher whose locked state will be changed. | |
c | Pass true to switch the patcher to presentation mode, otherwise pass false. |
Set a patcher's location and size.
p | A pointer to a patcher instance. | |
pr | The address of a t_rect with the new position and size. |
Set a patcher's title.
p | The patcher whose locked state will be changed. | |
ps | The new title for the patcher. |
Generate a unique name for a box in patcher.
p | A pointer to a patcher instance. | |
classname | The name of an object's class. |