Copyright © 1996-2000 Critical Mass, Inc. All Rights Reserved.
See file COPYRIGHT-CMASS for details.
This collection of VBTs contain a list of improvements upon the existing set of VBTs in Trestle's VBTkit, for example a "tab", a "grid", password type-ins. See the individual interfaces for documentation. Also, see Example.m3 for a simple program that uses some of the widgets.
A couple of places in Trestle and vbtkit packages need to be fixed for PasswordFont. The handling of the defaultChar specified in a font metrics was not done correctly.m3-ui/ui/src/vbt/ScrnFont.m3: in procedure BoundingBoxSubValid() around line 53 change: IF (ORD(FIRST(CHAR)) < fc OR lc < ORD(LAST(CHAR))) AND (dc < fc OR lc < dc) THEN FOR i := 0 TO len - 1 DO ch := ORD(txt[i]); IF fc <= ch AND ch <= lc THEN INC(len2) END END; valid := len = len2; len := len2 END to: IF (ORD(FIRST(CHAR)) < fc OR lc < ORD(LAST(CHAR))) THEN FOR i := 0 TO len - 1 DO ch := ORD(txt[i]); IF fc <= ch AND ch <= lc THEN INC(len2); ELSE valid := FALSE; IF fc <= dc AND dc <= lc THEN INC(len2) END; END END; len := len2 END in procedure GetCM() around line 123 should change from: IF c < m.firstChar OR c > m.lastChar THEN c := m.defaultChar; IF c < m.firstChar OR c > m.lastChar THEN valid := FALSE; RETURN EmptyCM END END; to: IF c < m.firstChar OR c > m.lastChar THEN valid := FALSE; c := m.defaultChar; IF c < m.firstChar OR c > m.lastChar THEN RETURN EmptyCM END END; m3-ui/vbtkit/src/vtext/VTView.m3: in procedure UncachedMakeVScreenFont (), around line 368 change: FOR i := metrics.firstChar TO MIN(metrics.lastChar, ORD(LAST(CHAR))) DO VAR c := VAL(i, CHAR); BEGIN IF c IN vFont.vFont.printable THEN IF metrics.charMetrics # NIL THEN vScreenFont.vScreenFont.width[c] := metrics.charMetrics[i - metrics.firstChar].printWidth; ELSE vScreenFont.vScreenFont.width[c] := metrics.maxBounds.printWidth; END; to: FOR i := ORD(FIRST(CHAR)) TO ORD(LAST(CHAR)) DO VAR c := VAL(i, CHAR); print_i := i; BEGIN IF c IN vFont.vFont.printable THEN IF (ORD(c) < metrics.firstChar) OR (metrics.lastChar < ORD(c)) THEN print_i := metrics.defaultChar; END; IF (print_i < metrics.firstChar) OR (metrics.lastChar < print_i) THEN vScreenFont.vScreenFont.width[c] := 0; ELSIF metrics.charMetrics # NIL THEN vScreenFont.vScreenFont.width[c] := metrics.charMetrics[print_i - metrics.firstChar].printWidth; ELSE vScreenFont.vScreenFont.width[c] := metrics.maxBounds.printWidth; END;TextPort was broken on Win32 because of a code generator error. The fix is already in place for version 5.0 of the compiler. To work around the bug, make the following change:m3-ui/vbtkit/src/vtext/VTView.m3: in procedure UncachedMakeVScreenFont (), around line 356 change: bsWidth : INTEGER; to: bsWidth : INTEGER; oneChar : SET OF CHAR; and at line 380 (line 386 after the above changes) change: vScreenFont.vScreenFont.defined := vScreenFont.vScreenFont.defined + SET OF CHAR{c} to: oneChar := SET OF CHAR{c}; (* temp to work around compiler bug *) vScreenFont.vScreenFont.defined := vScreenFont.vScreenFont.defined + oneChar;