Max API
8.0.2
|
A view of a patcher. More...
Functions | |
t_object * | patcherview_findpatcherview (int x, int y) |
Find a patcherview at the given screen coords. More... | |
char | patcherview_get_visible (t_object *pv) |
Query a patcherview to determine whether it is visible. More... | |
t_max_err | patcherview_set_visible (t_object *pv, char c) |
Set the 'visible' attribute of a patcherview. More... | |
t_max_err | patcherview_get_rect (t_object *pv, t_rect *pr) |
Get the value of the rect attribute for a patcherview. More... | |
t_max_err | patcherview_set_rect (t_object *pv, t_rect *pr) |
Set the value of the rect attribute for a patcherview. More... | |
void | patcherview_canvas_to_screen (t_object *pv, double cx, double cy, long *sx, long *sy) |
Convert the point cx, cy in canvas coordinates to screen coordinates. More... | |
void | patcherview_screen_to_canvas (t_object *pv, long sx, long sy, double *cx, double *cy) |
Convert the point cx, cy in canvas coordinates to screen coordinates. More... | |
char | patcherview_get_locked (t_object *p) |
Find out if a patcherview is locked. More... | |
t_max_err | patcherview_set_locked (t_object *p, char c) |
Lock or unlock a patcherview. More... | |
char | patcherview_get_presentation (t_object *pv) |
Find out if a patcherview is a presentation view. More... | |
t_max_err | patcherview_set_presentation (t_object *p, char c) |
Set whether or not a patcherview is a presentation view. More... | |
double | patcherview_get_zoomfactor (t_object *pv) |
Fetch the zoom-factor of a patcherview. More... | |
t_max_err | patcherview_set_zoomfactor (t_object *pv, double d) |
Set the zoom-factor of a patcherview. More... | |
t_object * | patcherview_get_nextview (t_object *pv) |
Given a patcherview, find the next patcherview. More... | |
t_object * | patcherview_get_jgraphics (t_object *pv) |
Given a patcherview, return the t_jgraphics context for that view. More... | |
t_object * | patcherview_get_patcher (t_object *pv) |
Given a patcherview, return its patcher. More... | |
t_object * | patcherview_get_topview (t_object *pv) |
Given a patcherview, return the top patcherview (possibly itself). More... | |
A view of a patcher.
void patcherview_canvas_to_screen | ( | t_object * | pv, |
double | cx, | ||
double | cy, | ||
long * | sx, | ||
long * | sy | ||
) |
Convert the point cx, cy in canvas coordinates to screen coordinates.
pv | The patcherview instance the canvas coords are relative to. |
cx | The x dimension of the canvas coordinate relative to the patcherview. |
cy | The y dimension of the canvas coordinate relative to the patcherview. |
sx | A pointer to a long to receive the screen coordinate x dimension. |
sy | A pointer to a long to receive the screen coordinate y dimension. |
t_object* patcherview_findpatcherview | ( | int | x, |
int | y | ||
) |
Find a patcherview at the given screen coords.
x | The horizontal coordinate at which to find a patcherview. |
y | The vertical coordinate at which to find a patcherview. |
Given a patcherview, return the t_jgraphics context for that view.
pv | The patcherview instance. |
char patcherview_get_locked | ( | t_object * | p | ) |
Find out if a patcherview is locked.
p | The patcherview instance whose attribute value will be fetched. |
Given a patcherview, find the next patcherview.
The views of a patcher are maintained internally as a t_linklist, and so the views can be traversed should you need to perform operations on all of a patcher's patcherviews.
pv | The patcherview instance from which to find the next patcherview. |
Given a patcherview, return its patcher.
pv | The patcherview instance for which to fetch the patcher. |
char patcherview_get_presentation | ( | t_object * | pv | ) |
Find out if a patcherview is a presentation view.
pv | The patcherview instance whose attribute value will be fetched. |
Get the value of the rect attribute for a patcherview.
pv | The patcherview instance whose attribute value will be fetched. |
pr | The address of a valid t_rect struct, whose contents will be filled upon return. |
Given a patcherview, return the top patcherview (possibly itself).
If the patcherview is inside a bpatcher which is in a patcher then this will give you the view the bpatcher view is inside of.
pv | The patcherview instance whose top view you want to get. |
char patcherview_get_visible | ( | t_object * | pv | ) |
Query a patcherview to determine whether it is visible.
pv | The patcherview instance to query. |
double patcherview_get_zoomfactor | ( | t_object * | pv | ) |
Fetch the zoom-factor of a patcherview.
pv | The patcherview instance whose attribute value will be fetched. |
void patcherview_screen_to_canvas | ( | t_object * | pv, |
long | sx, | ||
long | sy, | ||
double * | cx, | ||
double * | cy | ||
) |
Convert the point cx, cy in canvas coordinates to screen coordinates.
pv | The patcherview instance the canvas coords are relative to. |
sx | The screen position x coordinate. |
sy | The screen position y coordinate |
cx | A pointer to a double to receive the canvas coordinate for the given screen x position. |
cy | A pointer to a double to receive the canvas coordinate for the given screen y position. |
Lock or unlock a patcherview.
p | The patcherview instance whose attribute value will be set. |
c | Set this value to zero to unlock the patcherview, otherwise pass a non-zero value. |
Set whether or not a patcherview is a presentation view.
p | The patcherview instance whose attribute value will be set. |
c | Set this value to non-zero to make the patcherview a presentation view, otherwise pass zero. |
Set the value of the rect attribute for a patcherview.
pv | The patcherview instance whose attribute value will be set. |
pr | The address of a valid t_rect struct. |
Set the 'visible' attribute of a patcherview.
pv | The patcherview instance whose attribute will be set. |
c | Whether or not the patcherview should be made visible. |