aboutsummaryrefslogtreecommitdiff
path: root/grid/grid-patch.diff
blob: b9972eb4528210b401e59274c487d9f71bcc8ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
--- ../grid-pristine/grid.c	Mon Sep 16 15:29:14 2002
+++ grid.c	Mon Sep 16 17:24:21 2002
@@ -91,19 +91,22 @@
 static void grid_draw_new(t_grid *x, t_glist *glist)
 {
     t_canvas *canvas=glist_getcanvas(glist);
+    char *tagRoot;
 
+    rtext_new(glist, (t_text *)x, glist->gl_editor->e_rtext, 0);
+    tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x));
     GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #124392 -tags %xGRID\n",
 	     canvas, x->x_obj.te_xpix, x->x_obj.te_ypix,
 	     x->x_obj.te_xpix + x->x_width, x->x_obj.te_ypix + x->x_height,
 	     x);
-    GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xOUTL\n",
+    GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so0\n",
 	     canvas, x->x_obj.te_xpix, x->x_obj.te_ypix + x->x_height+1,
 	     x->x_obj.te_xpix+7, x->x_obj.te_ypix + x->x_height+2,
-	     x);
-    GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xOUTR\n",
+	     tagRoot);
+    GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so1\n",
 	     canvas, x->x_obj.te_xpix+x->x_width-7, x->x_obj.te_ypix + x->x_height+1,
 	     x->x_obj.te_xpix+x->x_width, x->x_obj.te_ypix + x->x_height+2,
-	     x);
+	     tagRoot);
 
     if ( x->x_grid ) 
     {
@@ -136,17 +139,19 @@
 static void grid_draw_move(t_grid *x, t_glist *glist)
 {
     t_canvas *canvas=glist_getcanvas(glist);
+    char *tagRoot;
 
+    tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); 
     GRID_SYS_VGUI7(".x%x.c coords %xGRID %d %d %d %d\n",
 	     canvas, x,
 	     x->x_obj.te_xpix, x->x_obj.te_ypix,
 	     x->x_obj.te_xpix+x->x_width, x->x_obj.te_ypix+x->x_height);
-    GRID_SYS_VGUI7(".x%x.c coords %xOUTL %d %d %d %d\n",
-	     canvas, x,
+    GRID_SYS_VGUI7(".x%x.c coords %so0 %d %d %d %d\n",
+	     canvas, tagRoot,
 	     x->x_obj.te_xpix, x->x_obj.te_ypix + x->x_height+1,
 	     x->x_obj.te_xpix+7, x->x_obj.te_ypix + x->x_height+2 );
-    GRID_SYS_VGUI7(".x%x.c coords %xOUTR %d %d %d %d\n",
-	     canvas, x,
+    GRID_SYS_VGUI7(".x%x.c coords %so1 %d %d %d %d\n",
+	     canvas, tagRoot,
 	     x->x_obj.te_xpix+x->x_width-7, x->x_obj.te_ypix + x->x_height+1,
 	     x->x_obj.te_xpix+x->x_width, x->x_obj.te_ypix + x->x_height+2 );
     if ( x->x_point ) 
@@ -183,10 +188,12 @@
 {
     t_canvas *canvas=glist_getcanvas(glist);
     int i;
+    char *tagRoot;
 
+    tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x));
     GRID_SYS_VGUI3(".x%x.c delete %xGRID\n", canvas, x);
-    GRID_SYS_VGUI3(".x%x.c delete %xOUTL\n", canvas, x);
-    GRID_SYS_VGUI3(".x%x.c delete %xOUTR\n", canvas, x);
+    GRID_SYS_VGUI3(".x%x.c delete %so0\n", canvas, tagRoot);
+    GRID_SYS_VGUI3(".x%x.c delete %so1\n", canvas, tagRoot);
     if (x->x_grid)  
     {
        for (i=1; i<x->x_xlines; i++ )
@@ -203,6 +210,7 @@
           GRID_SYS_VGUI3(".x%x.c delete %xPOINT\n", canvas, x);
           x->x_point = 0;
     }
+    rtext_free(glist_findrtext(glist, (t_text *)x));
 }
 
 static void grid_draw_select(t_grid* x,t_glist* glist)