CicmWrapper
Beta 0.4
A wrapper for Pure Data
|
The t_ebox and t_edspbox part. More...
Data Structures | |
struct | t_edrawparams |
The drawing parameters. More... | |
struct | t_ebox |
The GUI object. More... | |
struct | t_edspbox |
The GUI DSP object. More... | |
Enumerations | |
enum | emod_flags { EMOD_NONE = 0, EMOD_SHIFT = 1, EMOD_MAJ = 2, EMOD_CTRL = 4, EMOD_CMD = 8, EMOD_ALT = 16, EMOD_RIGHT = 32 } |
The mouse modifiers. More... | |
enum | ekey_flags { EKEY_DEL = 0, EKEY_TAB = 1, EKEY_ENTER = 2, EKEY_ESC = 3 } |
The system keys. More... | |
enum | ebox_flags { EBOX_GROWNO = (1<<4), EBOX_GROWLINK = (1<<5), EBOX_GROWINDI = (1<<6), EBOX_IGNORELOCKCLICK = (1<<7) } |
The flags that discribe the behavior of a t_ebox. More... | |
enum | ebox_cursors { ECURSOR_LEFT_PTR = 0, ECURSOR_CENTER_PTR = 1, ECURSOR_SDOUBLE_ARROW = 2, ECURSOR_PLUS = 3, ECURSOR_HAND = 4, ECURSOR_CIRCLE = 5, ECURSOR_X = 6, ECURSOR_BOTTOM = 7, ECURSOR_RIGHT_CORNER = 8, ECURSOR_RIGHT_SIDE = 9, ECURSOR_DOUBLE_ARROW = 10, ECURSOR_EXCHANGE = 11, ECURSOR_XTERM = 12 } |
The cursors that can be used. More... | |
Functions | |
void | ebox_new (t_ebox *x, long flags) |
Initializes the graphical members of the t_ebox. More... | |
void | ebox_ready (t_ebox *x) |
Indicates that the t_ebox can be drawn. More... | |
void | ebox_free (t_ebox *x) |
Indicates that the t_ebox can be drawn. More... | |
t_symbol * | ebox_getfontname (t_ebox *x) |
Retrieves the name of the font of the t_ebox. More... | |
t_symbol * | ebox_getfontslant (t_ebox *x) |
Retrieves the slant of the font of the t_ebox. More... | |
t_symbol * | ebox_getfontweight (t_ebox *x) |
Retrieves the weight of the font of the t_ebox. More... | |
float | ebox_getfontsize (t_ebox *x) |
Retrieves the size of the font of the t_ebox. More... | |
t_pd * | ebox_getsender (t_ebox *x) |
Retrieves the link list of object binded to the t_ebox. More... | |
char | ebox_isdrawable (t_ebox *x) |
Retrieves if a t_ebox is drawable. More... | |
void | ebox_attrprocess_viabinbuf (void *x, t_binbuf *d) |
Changes the attributes with a binbuf. More... | |
void | ebox_attrprocess_viatoms (void *x, int argc, t_atom *argv) |
Changes the attributes with an array of atoms. More... | |
void | ebox_set_cursor (t_ebox *x, int cursor) |
Changes the cursor of the mouse. More... | |
void | ebox_redraw (t_ebox *x) |
Notifies the t_ebox that it should be redrawn. More... | |
void | ebox_get_rect_for_view (t_ebox *x, t_rect *rect) |
Retrieves the rectangle of the t_ebox. More... | |
t_elayer * | ebox_start_layer (t_ebox *x, t_symbol *name, float width, float height) |
Creates or initializes a layer for the t_ebox. More... | |
t_pd_err | ebox_end_layer (t_ebox *x, t_symbol *name) |
Marks a layer as ready to be drawn. More... | |
t_pd_err | ebox_paint_layer (t_ebox *x, t_symbol *name, float x_p, float y_p) |
Paints a layer in the t_ebox. More... | |
t_pd_err | ebox_invalidate_layer (t_ebox *x, t_symbol *name) |
Marks a layer as invalid. More... | |
The t_ebox and t_edspbox part.
This part refers to the methods and structures that can be used by all the t_ebox structures.
struct t_edrawparams |
struct t_ebox |
The GUI object.
It contains the t_eobj with all the members for graphical behavior. This should be used for graphical object that don't have signal processing methods.
Data Fields | ||
---|---|---|
t_eobj | b_obj | The object. |
t_symbol * | b_receive_id |
The object user ID. |
t_symbol * | b_send_id |
The object send ID. |
t_symbol * | b_objpreset_id |
The object preset ID. |
t_symbol * | b_canvas_id |
The canvas ID. |
t_symbol * | b_drawing_id |
The drawing ID. |
t_symbol * | b_window_id |
The window ID. |
t_symbol * | b_all_id |
The global ID. |
long | b_flags |
The ebox flags. |
t_rect | b_rect |
The ebox rectangle. |
t_rect | b_rect_last |
The ebox previous rectangle. |
t_efont | b_font |
The ebox font. |
int | b_selected_box |
The selected state |
int | b_selected_item |
The items selected. |
int | b_selected_inlet |
The inlet selected. |
int | b_selected_outlet |
The outlet selected. |
char | b_mouse_down |
The mouse state. |
char | b_visible |
The visible state. |
char | b_ready_to_draw |
The ebox state for drawing. |
char | b_have_window |
The ebox window state. |
char | b_isinsubcanvas |
If the box is in a sub canvas. |
t_edrawparams | b_boxparameters |
The ebox parameters. |
t_elayer * | b_layers |
The ebox layers. |
long | b_number_of_layers |
The ebox number of layers. |
struct t_edspbox |
The GUI DSP object.
It contains the t_eobj with all the members for graphical behavior and signal processing. This should be used for graphical object that have signal processing methods.
Data Fields | ||
---|---|---|
t_eobj | b_obj |
The DSP object. |
t_symbol * | b_receive_id |
The object user ID. |
t_symbol * | b_send_id |
The object send ID. |
t_symbol * | b_objpreset_id |
The object preset ID. |
t_symbol * | b_canvas_id |
The canvas ID. |
t_symbol * | b_drawing_id |
The drawing ID. |
t_symbol * | b_window_id |
The window ID. |
t_symbol * | b_all_id |
The global ID. |
long | b_flags |
The ebox flags. |
t_rect | b_rect |
The ebox rectangle. |
t_rect | b_rect_last |
The ebox previous rectangle. |
t_efont | b_font |
The ebox font. |
int | b_selected_box |
The selected state |
int | b_selected_item |
The items selected. |
int | b_selected_inlet |
The inlet selected. |
int | b_selected_outlet |
The outlet selected. |
char | b_mouse_down |
The mouse state. |
char | b_visible |
The visible State. |
char | b_ready_to_draw |
The ebox state for drawing. |
char | b_have_window |
The ebox window state. |
char | b_isinsubcanvas |
If the box is in a sub canvas. |
t_edrawparams | b_boxparameters |
The ebox parameters. |
t_elayer * | b_layers |
The ebox layers. |
long | b_number_of_layers |
The ebox number of layers. |
t_edsp | d_dsp |
The dsp structure. |
enum emod_flags |
enum ekey_flags |
enum ebox_flags |
The flags that discribe the behavior of a t_ebox.
It define all the behavior of a t_ebox.
Enumerator | |
---|---|
EBOX_GROWNO |
The width and the height can't be modified. |
EBOX_GROWLINK |
The width and the height are linked. |
EBOX_GROWINDI |
The width and the height are independant. |
EBOX_IGNORELOCKCLICK |
The t_ebox ignore the mouse events. |
enum ebox_cursors |
The cursors that can be used.
It define all the available cursors.
void ebox_new | ( | t_ebox * | x, |
long | flags | ||
) |
Initializes the graphical members of the t_ebox.
Sets the defaults values and initializes the attributes.
This function should be call after eobj_new().
void ebox_ready | ( | t_ebox * | x | ) |
void ebox_free | ( | t_ebox * | x | ) |
Indicates that the t_ebox can be drawn.
Deletes the drawings.
This function should replace pd_free() and you shouldn't have to call eobj_free() or eobj_dspfree();
x | The t_ebox pointer. |
float ebox_getfontsize | ( | t_ebox * | x | ) |
char ebox_isdrawable | ( | t_ebox * | x | ) |
void ebox_attrprocess_viabinbuf | ( | void * | x, |
t_binbuf * | d | ||
) |
Changes the attributes with a binbuf.
Retrieves and interpretes a binbuf to initialize the attributes.
x | The t_ebox pointer. |
d | The binbuf pointer. |
void ebox_attrprocess_viatoms | ( | void * | x, |
int | argc, | ||
t_atom * | argv | ||
) |
Changes the attributes with an array of atoms.
Retrieves and interpretes a binbuf to initialize the attributes.
x | The t_ebox pointer. |
argc | The number of atoms. |
argv | The pointer to the atoms. |
void ebox_set_cursor | ( | t_ebox * | x, |
int | cursor | ||
) |
Changes the cursor of the mouse.
x | The t_ebox pointer. |
cursor | The type of cursor. |
void ebox_redraw | ( | t_ebox * | x | ) |
Creates or initializes a layer for the t_ebox.
If the layer is new, the function allocate a new empty layer. if the layer already exist and is marked as invalid the layer is returned otherwise(if the layer is maked as redeay to be drawn for example) the function returns NULL. You should always check the returned layer of the function before using it.
x | The t_ebox pointer. |
name | The name of the layer. |
width | The width of the layer. |
height | The height of the layer. |
Marks a layer as ready to be drawn.
After the several painting methods, you should call this function to notify that the layer is ready to be drawn.
x | The t_ebox pointer. |
name | The name of the layer. |
Paints a layer in the t_ebox.
If a layer is ready to be drawn, the function will paint it in the t_ebox.
x | The t_ebox pointer. |
name | The name of the layer. |
x_p | The abscissa of the layer in the t_ebox. |
y_p | The ordinate of the layer in the t_ebox. |
Marks a layer as invalid.
When you want to redraw a layer you have to call this function and then call ebox_redraw. You should always prefer to invalidate several layer before calling ebox_redraw.
x | The t_ebox pointer. |
name | The name of the layer. |