From fff121bad6ccc109448b1648507420a8d6100a74 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 13 Nov 2007 08:07:08 +0000 Subject: got live resizing working, but the outline is lower than the text widget, despite my attempts to change that svn path=/trunk/externals/bbogart/; revision=8986 --- entry/entry.c | 96 ++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 52 insertions(+), 44 deletions(-) (limited to 'entry') diff --git a/entry/entry.c b/entry/entry.c index ad3e00b..a0e43dd 100644 --- a/entry/entry.c +++ b/entry/entry.c @@ -27,7 +27,8 @@ /* TODO: set message doesnt work with a loadbang */ /* TODO: complete inlet draw/erase logic */ /* TODO: unbind text from all key events when selected */ -/* TODO try binding to FocusIn and FocusOut for making selection */ +/* TODO: allow moving by clicking and draging */ +/* TODO: sort out x_height/x_width vs. x_rect_height/x_rect_width */ #ifdef _MSC_VER #pragma warning( disable : 4244 ) @@ -64,9 +65,9 @@ typedef struct _entry int x_rect_height; t_symbol* x_receive_name; - int h_dragon; - int h_dragx; - int h_dragy; + int x_resizing; + int x_resize_x; + int x_resize_y; /* TODO: these all should be settable by messages */ int x_height; @@ -93,7 +94,6 @@ typedef struct _entry char *handle_id; char *window_tag; char *all_tag; - char *outline_tag; t_outlet* x_data_outlet; t_outlet* x_status_outlet; @@ -410,19 +410,6 @@ static void entry_select(t_gobj *z, t_glist *glist, int state) { entry_getrect(z, glist, &x1, &y1, &x2, &y2); sys_vgui("%s configure -bg #bdbddd -state disabled\n", x->text_id); - sys_vgui("canvas %s -width %d -height %d -bg #fedc00 -bd 0 -cursor top_left_arrow\n", - x->handle_id, TKW_HANDLE_WIDTH, TKW_HANDLE_HEIGHT); - sys_vgui("%s create window %f %f -anchor nw -width %d -height %d -window %s -tags %s\n", - x->canvas_id, x2 - (TKW_HANDLE_WIDTH - SCOPE_SELBDWIDTH), - y2 - (TKW_HANDLE_HEIGHT - SCOPE_SELBDWIDTH), - TKW_HANDLE_WIDTH, TKW_HANDLE_HEIGHT, - x->handle_id, x->all_tag); - sys_vgui("bind %s