[PD-cvs] externals/bbogart/entry entry-help.pd, 1.2, 1.3 entry.c, 1.12, 1.13
Hans-Christoph Steiner
eighthave at users.sourceforge.net
Thu Oct 25 19:07:37 CEST 2007
Update of /cvsroot/pure-data/externals/bbogart/entry
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1648
Modified Files:
entry-help.pd entry.c
Log Message:
updated help patch and added rudimentary size message
Index: entry.c
===================================================================
RCS file: /cvsroot/pure-data/externals/bbogart/entry/entry.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** entry.c 25 Oct 2007 16:39:13 -0000 1.12
--- entry.c 25 Oct 2007 17:07:35 -0000 1.13
***************
*** 39,42 ****
--- 39,44 ----
#define BACKGROUNDCOLOR "grey70"
+ #define DEBUG(x)
+
typedef struct _entry
{
***************
*** 87,93 ****
static t_symbol *down_symbol;
! /* widget helper functions */
! #define DEBUG(x) x
static int calculate_onset(t_entry *x, t_glist *glist, int i, int nplus)
--- 89,114 ----
static t_symbol *down_symbol;
! /* function prototypes */
! static void entry_getrect(t_gobj *z, t_glist *owner, int *xp1, int *yp1, int *xp2, int *yp2);
! static void entry_displace(t_gobj *z, t_glist *glist, int dx, int dy);
! static void entry_select(t_gobj *z, t_glist *glist, int state);
! static void entry_activate(t_gobj *z, t_glist *glist, int state);
! static void entry_delete(t_gobj *z, t_glist *glist);
! static void entry_vis(t_gobj *z, t_glist *glist, int vis);
! static void entry_save(t_gobj *z, t_binbuf *b);
!
!
! t_widgetbehavior entry_widgetbehavior = {
! w_getrectfn: entry_getrect,
! w_displacefn: entry_displace,
! w_selectfn: entry_select,
! w_activatefn: entry_activate,
! w_deletefn: entry_delete,
! w_visfn: entry_vis,
! w_clickfn: NULL,
! };
!
! /* widget helper functions */
static int calculate_onset(t_entry *x, t_glist *glist, int i, int nplus)
***************
*** 357,372 ****
}
- static void entry_save(t_gobj *z, t_binbuf *b);
-
- t_widgetbehavior entry_widgetbehavior = {
- w_getrectfn: entry_getrect,
- w_displacefn: entry_displace,
- w_selectfn: entry_select,
- w_activatefn: entry_activate,
- w_deletefn: entry_delete,
- w_visfn: entry_vis,
- w_clickfn: NULL,
- };
-
/* Function to reset the contents of the entry box */
static void entry_set(t_entry* x, t_symbol *s, int argc, t_atom *argv)
--- 378,381 ----
***************
*** 376,380 ****
t_symbol *tmp;
! tmp = s; /* this gets rid of the unused variable warning */
DEBUG(post("%s delete 0.0 end \n", x->x_widget_name););
sys_vgui("%s delete 0.0 end \n", x->x_widget_name);
--- 385,389 ----
t_symbol *tmp;
! tmp = s; /* <-- this gets rid of the unused variable warning */
DEBUG(post("%s delete 0.0 end \n", x->x_widget_name););
sys_vgui("%s delete 0.0 end \n", x->x_widget_name);
***************
*** 422,426 ****
static void entry_keyup(t_entry *x, t_float f)
{
! DEBUG(post("entry_keyup"););
int keycode = (int) f;
char buf[10];
--- 431,435 ----
static void entry_keyup(t_entry *x, t_float f)
{
! /* DEBUG(post("entry_keyup");); */
int keycode = (int) f;
char buf[10];
***************
*** 463,467 ****
default:
snprintf(buf, 10, "key_%d", keycode);
! post("keyup: %d", keycode);
output_symbol = gensym(buf);
}
--- 472,476 ----
default:
snprintf(buf, 10, "key_%d", keycode);
! DEBUG(post("keyup: %d", keycode););
output_symbol = gensym(buf);
}
***************
*** 496,499 ****
--- 505,515 ----
}
+ static void entry_size(t_entry *x, t_float width, t_float height)
+ {
+ DEBUG(post("entry_size"););
+ x->x_height = height;
+ x->x_width = width;
+ }
+
static void entry_free(t_entry *x)
{
***************
*** 553,556 ****
--- 569,578 ----
A_DEFFLOAT,
0);
+
+ class_addmethod(entry_class, (t_method)entry_size,
+ gensym("size"),
+ A_DEFFLOAT,
+ A_DEFFLOAT,
+ 0);
class_addmethod(entry_class, (t_method)entry_output,
Index: entry-help.pd
===================================================================
RCS file: /cvsroot/pure-data/externals/bbogart/entry/entry-help.pd,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** entry-help.pd 5 May 2006 09:51:56 -0000 1.2
--- entry-help.pd 25 Oct 2007 17:07:35 -0000 1.3
***************
*** 1,24 ****
! #N canvas 200 48 434 445 10;
! #X obj 73 132 entry 150 100 grey95 black;
#X obj 11 84 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
! #X obj 32 266 print;
! #X msg 137 75 clear;
! #X msg 141 107 set one two three four five six;
! #X msg 88 274 Can you see what I am;
! #X msg 88 250 set \$1 \$2 \$3 \$4 \$5 \$6;
! #X msg 86 51 fgcolour yellow;
#X msg 50 23 bgcolour purple;
! #X obj 128 363 entry 150 50 grey70 purple;
! #X text 11 336 The one was created with: entry 150 50 grey70 purple
! ;
! #X text 8 305 Creation arguments are: width height bgcolor fgcolor.
The width and height are in pixels.;
#X connect 0 0 2 0;
! #X connect 0 0 6 0;
#X connect 1 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
! #X connect 6 0 5 0;
! #X connect 7 0 0 0;
! #X connect 8 0 0 0;
--- 1,41 ----
! #N canvas 200 48 472 591 10;
! #X obj 73 212 entry 150 100 grey black;
#X obj 11 84 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
! #X obj 32 346 print;
! #X msg 150 95 clear;
! #X msg 159 117 set one two three four five six;
! #X msg 72 50 fgcolour yellow;
#X msg 50 23 bgcolour purple;
! #X obj 128 473 entry 100 100 grey70 purple;
! #X text 8 365 Creation arguments are: width height bgcolor fgcolor.
The width and height are in pixels.;
+ #X obj 261 234 select return;
+ #X obj 79 347 pddp/print;
+ #X obj 176 143 trigger bang bang;
+ #X msg 176 164 clear;
+ #X symbolatom 216 319 10 0 0 1 last_key_typed - -;
+ #X text 266 262 ^-- hit return to output;
+ #X msg 132 430 size 100 100;
+ #X msg 219 430 size 400 200;
+ #X msg 29 4 bgcolour grey;
+ #X msg 84 71 fgcolour black;
+ #X text 13 404 The size message currently only takes affect after a
+ save and reopen.;
#X connect 0 0 2 0;
! #X connect 0 0 10 0;
! #X connect 0 1 9 0;
! #X connect 0 1 13 0;
#X connect 1 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
! #X connect 5 0 0 0;
! #X connect 6 0 0 0;
! #X connect 9 0 11 0;
! #X connect 11 0 12 0;
! #X connect 11 1 0 0;
! #X connect 12 0 0 0;
! #X connect 15 0 7 0;
! #X connect 16 0 7 0;
! #X connect 17 0 0 0;
! #X connect 18 0 0 0;
More information about the Pd-cvs
mailing list