gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz doc/pegboard/containment--benja/peg.rst gzz...


From: Benja Fallenstein
Subject: [Gzz-commits] gzz doc/pegboard/containment--benja/peg.rst gzz...
Date: Sat, 07 Dec 2002 20:35:06 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      02/12/07 20:35:06

Modified files:
        doc/pegboard/containment--benja: peg.rst 
        gzz/view       : LinebrokenCellContentView.java 
                         TextCellContentView.java 

Log message:
        Containment apparently works :-)

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/pegboard/containment--benja/peg.rst.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/LinebrokenCellContentView.java.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/TextCellContentView.java.diff?tr1=1.33&tr2=1.34&r1=text&r2=text

Patches:
Index: gzz/doc/pegboard/containment--benja/peg.rst
diff -u gzz/doc/pegboard/containment--benja/peg.rst:1.6 
gzz/doc/pegboard/containment--benja/peg.rst:1.7
--- gzz/doc/pegboard/containment--benja/peg.rst:1.6     Fri Nov 15 16:22:26 2002
+++ gzz/doc/pegboard/containment--benja/peg.rst Sat Dec  7 20:35:05 2002
@@ -3,10 +3,10 @@
 ==================================================================
 
 :Author:       Benja Fallenstein
-:Last-Modified: $Date: 2002/11/15 21:22:26 $
-:Revision:     $Revision: 1.6 $
+:Last-Modified: $Date: 2002/12/08 01:35:05 $
+:Revision:     $Revision: 1.7 $
 :Date-Created: 2002-10-28
-:Status:       Accepted
+:Status:       Accepted [mostly implemented]
 
 
 Ted has specified a containment mechanism for zzstructure
Index: gzz/gzz/view/LinebrokenCellContentView.java
diff -u gzz/gzz/view/LinebrokenCellContentView.java:1.17 
gzz/gzz/view/LinebrokenCellContentView.java:1.18
--- gzz/gzz/view/LinebrokenCellContentView.java:1.17    Thu Dec  5 20:03:51 2002
+++ gzz/gzz/view/LinebrokenCellContentView.java Sat Dec  7 20:35:05 2002
@@ -24,6 +24,7 @@
 package gzz.view;
 import gzz.client.*;
 import gzz.*;
+import gzz.zzutil.Containment;
 import gzz.errors.*;
 import gzz.vob.*;
 import gzz.vob.linebreaking.*;
@@ -39,7 +40,7 @@
  *  Doesn't scroll, currently.
  */
 public class LinebrokenCellContentView extends CellView {
-public static final String rcsid = "$Id: LinebrokenCellContentView.java,v 1.17 
2002/12/06 01:03:51 benja Exp $";
+public static final String rcsid = "$Id: LinebrokenCellContentView.java,v 1.18 
2002/12/08 01:35:05 benja Exp $";
     public static boolean dbg = false;
     private static void p(String s) { if(dbg) pa(s); }
     private static void pa(String s) { System.err.println(s); }
@@ -74,7 +75,7 @@
                        float[] out) {
        String s;
        if(c != null)
-           s = c.t();
+           s = Containment.getContainedText(c);
        else
            s = widthString;
 
@@ -102,10 +103,7 @@
     }
 
     protected HChain getChain(Cell c, float scale) {
-       /*Enfilade1D enf =
-           ((VStreamCellTexter)c.space.getCellTexter()).getEnfilade(c);
-       String s = enf.makeString();*/
-       String s = c.t();
+       String s = Containment.getContainedText(c);
         if (s == null) s = "";
 
        HChain ch = new LinebreakableChain();
Index: gzz/gzz/view/TextCellContentView.java
diff -u gzz/gzz/view/TextCellContentView.java:1.33 
gzz/gzz/view/TextCellContentView.java:1.34
--- gzz/gzz/view/TextCellContentView.java:1.33  Thu Dec  5 20:03:51 2002
+++ gzz/gzz/view/TextCellContentView.java       Sat Dec  7 20:35:06 2002
@@ -24,6 +24,7 @@
 package gzz.view;
 import gzz.client.*;
 import gzz.*;
+import gzz.zzutil.Containment;
 import gzz.errors.*;
 import gzz.vob.*;
 import gzz.vob.impl.*;
@@ -38,7 +39,7 @@
 /** A cell content view showing a cell's text.
  */
 public class TextCellContentView extends CellView {
-public static final String rcsid = "$Id: TextCellContentView.java,v 1.33 
2002/12/06 01:03:51 benja Exp $";
+public static final String rcsid = "$Id: TextCellContentView.java,v 1.34 
2002/12/08 01:35:06 benja Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -62,7 +63,7 @@
                        float[] out) {
        String s;
        if(c != null)
-           s = c.t();
+           s = Containment.getContainedText(c);
        else
            s = widthString;
        out[0] = style.getWidth(s, scale) / scale;
@@ -73,7 +74,7 @@
     java.awt.Point point;
     public void place(Cell c, VobScene vs, int box,
                       ViewContext context) {
-       String s = c.t();
+       String s = Containment.getContainedText(c);
         if (s == null) s = "";
         int offs = context.getCursorOffset(c);
        if(dbg) pa("TextCellContentview: '"+s+"' "+offs);
@@ -137,12 +138,12 @@
     protected void placeVob(Cell c, VobScene vs, int cs, int start, int end,
                             int offs, ViewContext context, float h, float 
scaled_h, float scale) {
            // XXX should optimize for common case: no substring()
-        TextVob vob = new TextVob(style, c.t().substring(start, end));
+        TextVob vob = new TextVob(style, 
Containment.getContainedText(c).substring(start, end));
         int cs_scaled = vs.orthoCS(cs, WH_KEY, 0, 0, 0, h, h);
         vs.map.put(vob, cs_scaled);
 
         if(offs >= 0 && offs >= start && offs <= end) {
-           float x = style.getWidth(c.t().substring(start, offs), scale);
+           float x = 
style.getWidth(Containment.getContainedText(c).substring(start, offs), scale);
            x *= h/scaled_h;
            int cs_cursor = vs.orthoCS(cs, CURS_KEY, -1, x+1, 0, 0, h);
             // v.map.put(new TextCursorVob(vob, offs), cs);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]