Max 5 API Reference

jpatcherview
[Patcher]

A view of a patcher. More...

Collaboration diagram for jpatcherview:

Functions

t_objectpatcherview_findpatcherview (int x, int y)
 Find a patcherview at the given screen coords.
char patcherview_get_visible (t_object *pv)
 Query a patcherview to determine whether it is visible.
t_max_err patcherview_set_visible (t_object *pv, char c)
 Set the 'visible' attribute of a patcherview.
t_max_err patcherview_get_rect (t_object *pv, t_rect *pr)
 Get the value of the rect attribute for a patcherview.
t_max_err patcherview_set_rect (t_object *pv, t_rect *pr)
 Set the value of the rect attribute for a patcherview.
char patcherview_get_locked (t_object *p)
 Find out if a patcherview is locked.
t_max_err patcherview_set_locked (t_object *p, char c)
 Lock or unlock a patcherview.
char patcherview_get_presentation (t_object *pv)
 Find out if a patcherview is a presentation view.
t_max_err patcherview_set_presentation (t_object *p, char c)
 Set whether or not a patcherview is a presentation view.
double patcherview_get_zoomfactor (t_object *pv)
 Fetch the zoom-factor of a patcherview.
t_max_err patcherview_set_zoomfactor (t_object *pv, double d)
 Set the zoom-factor of a patcherview.
t_objectpatcherview_get_nextview (t_object *pv)
 Given a patcherview, find the next patcherview.
t_objectpatcherview_get_jgraphics (t_object *pv)
 Given a patcherview, return the t_jgraphics context for that view.
t_objectpatcherview_get_patcher (t_object *pv)
 Given a patcherview, return its patcher.
t_objectpatcherview_get_topview (t_object *pv)
 Given a patcherview, return the top patcherview (possibly itself).

Detailed Description

A view of a patcher.


Function Documentation

t_object* patcherview_findpatcherview ( int  x,
int  y 
)

Find a patcherview at the given screen coords.

Parameters:
x The horizontal coordinate at which to find a patcherview.
y The vertical coordinate at which to find a patcherview.
Returns:
A pointer to the patcherview at the specified location, or NULL if no patcherview exists at that location.
t_object* patcherview_get_jgraphics ( t_object pv  ) 

Given a patcherview, return the t_jgraphics context for that view.

Parameters:
pv The patcherview instance.
Returns:
The t_jgraphics context for the view.
char patcherview_get_locked ( t_object p  ) 

Find out if a patcherview is locked.

Parameters:
p The patcherview instance whose attribute value will be fetched.
Returns:
Returns 0 if unlocked, otherwise returns non-zero.
t_object* patcherview_get_nextview ( t_object pv  ) 

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.

Parameters:
pv The patcherview instance from which to find the next patcherview.
Returns:
The next patcherview in the list, or NULL if the patcherview passed in pv is the tail.
t_object* patcherview_get_patcher ( t_object pv  ) 

Given a patcherview, return its patcher.

Parameters:
pv The patcherview instance for which to fetch the patcher.
Returns:
The patcher.
char patcherview_get_presentation ( t_object pv  ) 

Find out if a patcherview is a presentation view.

Parameters:
pv The patcherview instance whose attribute value will be fetched.
Returns:
Returns 0 if the view is not a presentation view, otherwise returns non-zero.
t_max_err patcherview_get_rect ( t_object pv,
t_rect pr 
)

Get the value of the rect attribute for a patcherview.

Parameters:
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.
Returns:
An error code.
t_object* patcherview_get_topview ( t_object pv  ) 

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.

Parameters:
pv The patcherview instance whose top view you want to get.
Returns:
The top patcherview.
char patcherview_get_visible ( t_object pv  ) 

Query a patcherview to determine whether it is visible.

Parameters:
pv The patcherview instance to query.
Returns:
Returns zero if the patcherview is invisible, otherwise returns non-zero.
double patcherview_get_zoomfactor ( t_object pv  ) 

Fetch the zoom-factor of a patcherview.

Parameters:
pv The patcherview instance whose attribute value will be fetched.
Returns:
The factor by which the view is zoomed.
t_max_err patcherview_set_locked ( t_object p,
char  c 
)

Lock or unlock a patcherview.

Parameters:
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.
Returns:
An error code.
t_max_err patcherview_set_presentation ( t_object p,
char  c 
)

Set whether or not a patcherview is a presentation view.

Parameters:
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.
Returns:
An error code.
t_max_err patcherview_set_rect ( t_object pv,
t_rect pr 
)

Set the value of the rect attribute for a patcherview.

Parameters:
pv The patcherview instance whose attribute value will be set.
pr The address of a valid t_rect struct.
Returns:
An error code.
t_max_err patcherview_set_visible ( t_object pv,
char  c 
)

Set the 'visible' attribute of a patcherview.

Parameters:
pv The patcherview instance whose attribute will be set.
c Whether or not the patcherview should be made visible.
Returns:
An error code.
t_max_err patcherview_set_zoomfactor ( t_object pv,
double  d 
)

Set the zoom-factor of a patcherview.

Parameters:
pv The patcherview instance whose attribute value will be set.
d The zoom-factor at which the patcherview should display the patcher.
Returns:
An error code.

Copyright © 2008, Cycling '74