Kaynağa Gözat

Changed text Layout from the reference object to the STATIC RECORD type

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8663 8c9fc860-2736-0410-a75d-ab315db34111
eth.metacore 6 yıl önce
ebeveyn
işleme
5951371122
1 değiştirilmiş dosya ile 4 ekleme ve 6 silme
  1. 4 6
      source/WMTextView.Mod

+ 4 - 6
source/WMTextView.Mod

@@ -101,8 +101,7 @@ TYPE
 
 TYPE
 
-	Layout = OBJECT
-	VAR
+	Layout = RECORD
 		nofLines : LONGINT;
 		lines : LineInfoArray;
 		text : Texts.Text;
@@ -265,7 +264,7 @@ TYPE
 			text.ReleaseRead
 		END FixLayoutFrom;
 
-	END Layout;
+	END (*Layout*);
 
 CONST HLOver* = 0; HLUnder* = 1; HLWave* = 2;
 
@@ -788,7 +787,8 @@ TYPE
 			NEW(onCtrlClicked, SELF, PTVonCtrlLinkClick, PTVonCtrlLinkClickInfo, SELF.StringToCompCommand); events.Add(onCtrlClicked);
 
 			(* selection and cursor *)
-			NEW(layout);
+(*!			NEW(layout);*)
+			layout.New();
 			layout.layoutLineProc := LayoutLine;
 			nofHighlights := 0;
 			NEW(highlights, 4);
@@ -2648,8 +2648,6 @@ TYPE
 		PROCEDURE DrawBackground*(canvas : WMGraphics.Canvas);
 		VAR la, lb, i, top, t, b : LONGINT; rect, clip : WMRectangles.Rectangle; cstate : WMGraphics.CanvasState;
 		BEGIN
-			ASSERT(layout # NIL);
-
 			canvas.GetClipRect(clip);
 			IF WMRectangles.RectEmpty(clip) THEN RETURN END;
 			rect := GetClientRect();