From 601b74f6e200ecb1028b7c4cff83950971a3edea Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Wed, 22 Dec 2010 23:13:00 -0500 Subject: [PATCH] Pd-0.42.5-extended-l2ork-dev-20101222.tar.bz2 --- src/g_all_guis.h | 4 ++-- src/g_editor.c | 1 + src/g_rtext.c | 10 +++++++++- src/g_text.c | 21 +++++++++++++++++++++ src/m_pd.h | 2 +- src/x_glist | 2 ++ 6 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 src/x_glist diff --git a/src/g_all_guis.h b/src/g_all_guis.h index f35210901..6899cad29 100644 --- a/src/g_all_guis.h +++ b/src/g_all_guis.h @@ -121,8 +121,8 @@ #define SCALE_VU_MINWIDTH 8 #define SCALE_VU_MINHEIGHT 80 -#define SCALEHANDLE_WIDTH 10 /* item size is int */ -#define SCALEHANDLE_HEIGHT 10 +#define SCALEHANDLE_WIDTH 5 +#define SCALEHANDLE_HEIGHT 5 typedef struct _iem_fstyle_flags { diff --git a/src/g_editor.c b/src/g_editor.c index 89ecac015..7c12ba5d5 100644 --- a/src/g_editor.c +++ b/src/g_editor.c @@ -1520,6 +1520,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which, { if (x->gl_editor->e_onmotion == MA_MOVE) { //fprintf(stderr,"letting go of objects\n"); + sys_vgui(".x%lx.c raise all_cords\n", x); sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x); } x->gl_editor->e_grab = 0; diff --git a/src/g_rtext.c b/src/g_rtext.c index 0e11706f8..0cbe219a0 100644 --- a/src/g_rtext.c +++ b/src/g_rtext.c @@ -452,13 +452,19 @@ void rtext_key(t_rtext *x, int keynum, t_symbol *keysym) { .... } */ - if (x->x_selstart && (x->x_selstart == x->x_selend)) + if (x->x_selstart && (x->x_selstart == x->x_selend)) { x->x_selstart--; + if (glist_isvisible(glist_getcanvas(x->x_glist))) + sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)glist_getcanvas(x->x_glist)); + } + } else if (n == 127) /* delete */ { if (x->x_selend < x->x_bufsize && (x->x_selstart == x->x_selend)) x->x_selend++; + if (glist_isvisible(glist_getcanvas(x->x_glist))) + sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)glist_getcanvas(x->x_glist)); } ndel = x->x_selend - x->x_selstart; @@ -480,6 +486,8 @@ be printable in whatever 8-bit character set we find ourselves. */ x->x_buf[x->x_selstart] = n; x->x_bufsize = newsize; x->x_selstart = x->x_selstart + 1; + if (glist_isvisible(glist_getcanvas(x->x_glist))) + sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)glist_getcanvas(x->x_glist)); } x->x_selend = x->x_selstart; x->x_glist->gl_editor->e_textdirty = 1; diff --git a/src/g_text.c b/src/g_text.c index 777303ce1..126906a5b 100644 --- a/src/g_text.c +++ b/src/g_text.c @@ -133,6 +133,8 @@ static void canvas_objtext(t_glist *gl, int xpix, int ypix, int selected, if (pd_class(&x->ob_pd) == voutlet_class) canvas_resortoutlets(glist_getcanvas(gl)); canvas_unsetcurrent((t_canvas *)gl); + if ( glist_isvisible( ((t_canvas *)gl) ) ) + sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)gl); } extern int sys_noautopatch; @@ -1049,6 +1051,25 @@ static void text_getrect(t_gobj *z, t_glist *glist, { t_rtext *y = glist_findrtext(glist, x); width = rtext_width(y); + + /* now find if we have more inlets or outlets than + what can comfortably fit and adjust accordingly + but only do so if this is not gop object + */ + + //fprintf(stderr,"isgraph %d\n", ((t_glist *)z)->gl_isgraph); + if (!((t_glist *)z)->gl_isgraph) { + + t_object *ob = pd_checkobject(&x->te_pd); + int no = obj_noutlets(ob); + int ni = obj_ninlets(ob); + + int m = ( ni > no ? ni : no); + if ( width < IOWIDTH * 2 * m ) { + /* we have to resize the object */ + width = IOWIDTH * 2 * m; + } + } height = rtext_height(y) - (iscomment << 1); } else width = height = 10; diff --git a/src/m_pd.h b/src/m_pd.h index 85d446a53..845680ba3 100644 --- a/src/m_pd.h +++ b/src/m_pd.h @@ -11,7 +11,7 @@ extern "C" { #define PD_MAJOR_VERSION 0 #define PD_MINOR_VERSION 42 #define PD_BUGFIX_VERSION 5 -#define PD_TEST_VERSION "extended-l2ork-20101217" +#define PD_TEST_VERSION "extended-l2ork-20101222" /* old name for "MSW" flag -- we have to take it for the sake of many old "nmakefiles" for externs, which will define NT and not MSW */ diff --git a/src/x_glist b/src/x_glist new file mode 100644 index 000000000..0f235d3db --- /dev/null +++ b/src/x_glist @@ -0,0 +1,2 @@ +g_text.c: t_canvas *c = glist_getcanvas(y->x_glist); +g_text.c~: t_canvas *c = glist_getcanvas(y->x_glist); -- GitLab