CicmWrapper  Beta 0.4
A wrapper for Pure Data
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
ebox.h
1 /*
2  * CicmWrapper - Pure Data Enhanced
3  *
4  * A wrapper for Pure Data
5  *
6  * Copyright (C) 2013 Pierre Guillot, CICM - Université Paris 8
7  * All rights reserved.
8  *
9  * Website : http://www.mshparisnord.fr/HoaLibrary/
10  * Contacts : cicm.mshparisnord@gmail.com
11  *
12  * This library is free software; you can redistribute it and/or modify it
13  * under the terms of the GNU Library General Public License as published
14  * by the Free Software Foundation; either version 2 of the License.
15  *
16  * This library is distributed in the hope that it will be useful, but WITHOUT
17  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
19  * License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public License
22  * along with this library; if not, write to the Free Software Foundation,
23  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24  *
25  */
26 
33 #ifndef DEF_EBOX
34 #define DEF_EBOX
35 
36 #include "edefine.h"
37 
51 void ebox_new(t_ebox *x, long flags);
52 
53 
60 void ebox_ready(t_ebox *x);
61 
68 void ebox_free(t_ebox* x);
69 
76 t_symbol* ebox_getfontname(t_ebox* x);
77 
84 t_symbol* ebox_getfontslant(t_ebox* x);
85 
92 t_symbol* ebox_getfontweight(t_ebox* x);
93 
100 float ebox_getfontsize(t_ebox* x);
101 
108 t_pd* ebox_getsender(t_ebox* x);
109 
117 char ebox_isdrawable(t_ebox* x);
118 
126 void ebox_attrprocess_viabinbuf(void *x, t_binbuf *d);
127 
136 void ebox_attrprocess_viatoms(void *x, int argc, t_atom *argv);
137 
145 void ebox_set_cursor(t_ebox* x, int cursor);
146 
152 void ebox_redraw(t_ebox *x);
153 
161 void ebox_get_rect_for_view(t_ebox* x, t_rect *rect);
162 
173 t_elayer* ebox_start_layer(t_ebox *x, t_symbol *name, float width, float height);
174 
183 t_pd_err ebox_end_layer(t_ebox *x, t_symbol *name);
184 
195 t_pd_err ebox_paint_layer(t_ebox *x, t_symbol *name, float x_p, float y_p);
196 
205 t_pd_err ebox_invalidate_layer(t_ebox *x,t_symbol *name);
206 
210 /*
213  \ @memberof ebox
214  \ @param x The ebox pointer
215  \ @return Nothing
216  */
217 void ebox_mouse_enter(t_ebox* x);
218 
220 /*
221  \ @memberof ebox
222  \ @param x The ebox pointer
223  \ @return Nothing
224  */
225 void ebox_mouse_leave(t_ebox* x);
226 
228 /*
229  \ @memberof ebox
230  \ @param x The ebox pointer
231  \ @param s The message selector
232  \ @param argc The size of the array of atoms
233  \ @param argv The array of atoms
234  \ @return Nothing
235  */
236 void ebox_mouse_move(t_ebox* x, t_symbol* s, int argc, t_atom *argv);
237 
239 /*
240  \ @memberof ebox
241  \ @param x The ebox pointer
242  \ @param s The message selector
243  \ @param argc The size of the array of atoms
244  \ @param argv The array of atoms
245  \ @return Nothing
246  */
247 void ebox_mouse_up(t_ebox* x, t_symbol* s, int argc, t_atom *argv);
248 
250 /*
251  \ @memberof ebox
252  \ @param x The ebox pointer
253  \ @param s The message selector
254  \ @param argc The size of the array of atoms
255  \ @param argv The array of atoms
256  \ @return Nothing
257  */
258 void ebox_mouse_down(t_ebox* x, t_symbol* s, int argc, t_atom *argv);
259 
261 /*
262  \ @memberof ebox
263  \ @param x The ebox pointer
264  \ @param s The message selector
265  \ @param argc The size of the array of atoms
266  \ @param argv The array of atoms
267  \ @return Nothing
268  */
269 void ebox_mouse_dblclick(t_ebox* x, t_symbol* s, int argc, t_atom *argv);
270 
272 /*
273  \ @memberof ebox
274  \ @param x The ebox pointer
275  \ @param s The message selector
276  \ @param argc The size of the array of atoms
277  \ @param argv The array of atoms
278  \ @return Nothing
279  */
280 void ebox_mouse_wheel(t_ebox* x, t_symbol* s, int argc, t_atom *argv);
281 
283 /*
284  \ @memberof ebox
285  \ @param x The ebox pointer
286  \ @param s The message selector
287  \ @param argc The size of the array of atoms
288  \ @param argv The array of atoms
289  \ @return Nothing
290  */
291 void ebox_key(t_ebox* x, t_symbol* s, int argc, t_atom *argv);
292 
294 /*
295  \ @memberof ebox
296  \ @param x The ebox pointer
297  \ @param b The binbuf
298  \ @return Nothing
299  */
300 void ebox_dosave(t_ebox* x, t_binbuf *b);
301 
303 /*
304  \ @memberof ebox
305  \ @param x The ebox pointer
306  \ @param newx The new abscissa
307  \ @param newy The new ordinate
308  \ @return Nothing
309  */
310 void ebox_pos(t_ebox* x, float newx, float newy);
311 
313 /*
314  \ @memberof ebox
315  \ @param x The ebox pointer
316  \ @param vis The visible state
317  \ @return Nothing
318  */
319 void ebox_vis(t_ebox* x, int vis);
320 
322 /*
323  \ @memberof ebox
324  \ @param x The gobj
325  \ @param attr Nothing (for Max 6 compatibility)
326  \ @param argc The size of the array of atoms
327  \ @param argv The array of atoms
328  \ @return Always 0 (for the moment)
329  */
330 t_pd_err ebox_set_receiveid(t_ebox *x, t_object *attr, int argc, t_atom *argv);
331 
333 /*
334  \ @memberof ebox
335  \ @param x The gobj
336  \ @param attr Nothing (for Max 6 compatibility)
337  \ @param argc The size of the array of atoms
338  \ @param argv The array of atoms
339  \ @return Always 0 (for the moment)
340  */
341 t_pd_err ebox_set_sendid(t_ebox *x, t_object *attr, int argc, t_atom *argv);
342 
344 /*
345  \ @memberof ebox
346  \ @param x The ebox
347  \ @param attr Nothing (for Max 6 compatibility)
348  \ @param argc The size of the array of atoms
349  \ @param argv The array of atoms
350  \ @return Always 0 (for the moment)
351  */
352 t_pd_err ebox_set_presetid(t_ebox *x, t_object *attr, int argc, t_atom *argv);
353 
355 /*
356  \ @memberof ebox
357  \ @param x The ebox
358  */
359 t_symbol* ebox_get_presetid(t_ebox* x);
360 
362 /*
363  \ @memberof ebox
364  \ @param x The gobj
365  \ @param attr Nothing (for Max 6 compatibility)
366  \ @param argc The size of the array of atoms
367  \ @param argv The array of atoms
368  \ @return Always 0 (for the moment)
369  */
370 t_pd_err ebox_set_font(t_ebox *x, t_object *attr, int argc, t_atom *argv);
371 
373 /*
374  \ @memberof ebox
375  \ @param x The gobj
376  \ @param attr Nothing (for Max 6 compatibility)
377  \ @param argc The size of the array of atoms
378  \ @param argv The array of atoms
379  \ @return Always 0 (for the moment)
380  */
381 t_pd_err ebox_set_fontweight(t_ebox *x, t_object *attr, int argc, t_atom *argv);
382 
384 /*
385  \ @memberof ebox
386  \ @param x The gobj
387  \ @param attr Nothing (for Max 6 compatibility)
388  \ @param argc The size of the array of atoms
389  \ @param argv The array of atoms
390  \ @return Always 0 (for the moment)
391  */
392 t_pd_err ebox_set_fontslant(t_ebox *x, t_object *attr, int argc, t_atom *argv);
393 
395 /*
396  \ @memberof ebox
397  \ @param x The gobj
398  \ @param attr Nothing (for Max 6 compatibility)
399  \ @param argc The size of the array of atoms
400  \ @param argv The array of atoms
401  \ @return Always 0 (for the moment)
402  */
403 t_pd_err ebox_set_fontsize(t_ebox *x, t_object *attr, int argc, t_atom *argv);
404 
406 /*
407  \ @memberof ebox
408  \ @param z The gobj object
409  \ @param glist The canvas
410  \ @return Nothing
411  */
412 void ebox_properties(t_ebox *x, t_glist *glist);
413 
415 /*
416  \ @memberof ebox
417  \ @param x The object
418  \ @param s Nothing (for Max 6 compatibility)
419  \ @return Nothing
420  */
421 void ebox_dialog(t_ebox *x, t_symbol *s, int argc, t_atom *argv);
422 
424 /*
425  \ @memberof ebox
426  \ @param x The ebox
427  \ @param s The name of the attribute
428  \ @param msg Nothing (for Max 6 compatibility)
429  \ @param sender Nothing (for Max 6 compatibility)
430  \ @param data Nothing (for Max 6 compatibility)
431  \ @return Always 0 (for the moment)
432  */
433 t_pd_err ebox_notify(t_ebox *x, t_symbol *s, t_symbol *msg, void *sender, void *data);
434 
436 /*
437  \ @memberof ebox
438  \ @param x The ebox
439  \ @param attr Nothing (for Max 6 compatibility)
440  \ @param argc The size of the array of atoms
441  \ @param argv The array of atoms that contains the new width and the new height
442  \ @return Always 0 (for the moment)
443  */
444 t_pd_err ebox_size_set(t_ebox *x, t_object *attr, int argc, t_atom *argv);
445 
447 /*
448  \ @memberof ebox
449  \ @param x The ebox
450  \ @return Nothing
451  */
452 void ebox_attrprint(t_ebox* x);
453 
454 // The defaults pd widgets
455 void ebox_wgetrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2);
456 void ebox_wvis(t_gobj *z, t_glist *glist, int vis);
457 void ebox_wdisplace(t_gobj *z, t_glist *glist, int dx, int dy);
458 void ebox_wselect(t_gobj *z, t_glist *glist, int selected);
459 void ebox_wdelete(t_gobj *z, t_glist *glist);
461 
462 
463 #endif
464 
465 
466 
void ebox_ready(t_ebox *x)
Indicates that the t_ebox can be drawn.
Definition: ebox.c:74
t_symbol * ebox_getfontweight(t_ebox *x)
Retrieves the weight of the font of the t_ebox.
Definition: ebox.c:116
t_pd * ebox_getsender(t_ebox *x)
Retrieves the link list of object binded to the t_ebox.
Definition: ebox.c:126
t_symbol * ebox_getfontname(t_ebox *x)
Retrieves the name of the font of the t_ebox.
Definition: ebox.c:106
t_symbol * ebox_getfontslant(t_ebox *x)
Retrieves the slant of the font of the t_ebox.
Definition: ebox.c:111
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.
Definition: ebox.c:1386
t_pd_err ebox_end_layer(t_ebox *x, t_symbol *name)
Marks a layer as ready to be drawn.
Definition: ebox.c:1357
void ebox_free(t_ebox *x)
Indicates that the t_ebox can be drawn.
Definition: ebox.c:92
t_elayer * ebox_start_layer(t_ebox *x, t_symbol *name, float width, float height)
Creates or initializes a layer for the t_ebox.
Definition: ebox.c:1259
void ebox_set_cursor(t_ebox *x, int cursor)
Changes the cursor of the mouse.
Definition: ebox.c:152
void ebox_redraw(t_ebox *x)
Notifies the t_ebox that it should be redrawn.
Definition: ebox.c:1235
The drawing layer.
Definition: edefine.h:388
A rectangle structure.
Definition: edefine.h:242
void ebox_new(t_ebox *x, long flags)
Initializes the graphical members of the t_ebox.
Definition: ebox.c:58
t_pd_err ebox_invalidate_layer(t_ebox *x, t_symbol *name)
Marks a layer as invalid.
Definition: ebox.c:1372
void ebox_attrprocess_viatoms(void *x, int argc, t_atom *argv)
Changes the attributes with an array of atoms.
Definition: ebox.c:158
long t_pd_err
The error type.
Definition: edefine.h:84
The GUI object.
Definition: edefine.h:716
void ebox_get_rect_for_view(t_ebox *x, t_rect *rect)
Retrieves the rectangle of the t_ebox.
Definition: ebox.c:1251
void ebox_attrprocess_viabinbuf(void *x, t_binbuf *d)
Changes the attributes with a binbuf.
Definition: ebox.c:180
float ebox_getfontsize(t_ebox *x)
Retrieves the size of the font of the t_ebox.
Definition: ebox.c:121
char ebox_isdrawable(t_ebox *x)
Retrieves if a t_ebox is drawable.
Definition: ebox.c:140