<<-- ScannerUtilitiesImpl.mesa>> <> <> <> <<>> DIRECTORY Rope USING [ROPE], ScannerInternal USING [Parameters, ToolParameters], UserProfile USING [Number, ProfileChangedProc, Token], VFonts USING [EstablishFont, Font, FontHeight]; ScannerUtilitiesImpl: CEDAR MONITOR IMPORTS UserProfile, VFonts EXPORTS ScannerInternal = BEGIN OPEN Tool: ScannerInternal; ROPE: TYPE = Rope.ROPE; ---- ---- ---- ---- ---- ---- ---- ---- <> ---- ---- ---- ---- ---- ---- ---- ---- parameters: Tool.Parameters _ NIL; ---- ---- ---- ---- ---- ---- ---- ---- <> ---- ---- ---- ---- ---- ---- ---- ---- GetToolParameters: PUBLIC PROC RETURNS [Tool.Parameters] = {RETURN[parameters]}; ReactToProfile: PUBLIC ENTRY UserProfile.ProfileChangedProc = BEGIN ENABLE UNWIND => NULL; params: Tool.Parameters _ NEW[Tool.ToolParameters]; fontFamily: ROPE = UserProfile.Token["Scanner.FontFamily", "Tioga"]; fontSize: NAT = UserProfile.Number["Scanner.FontSize", 10]; params.font _ VFonts.EstablishFont[fontFamily, fontSize]; params.fixedFont _ VFonts.EstablishFont[family: "Gacha", size: fontSize - 2]; params.entryHeight _ VFonts.FontHeight[params.font] + 2; params.entryVSpace _ VFonts.FontHeight[params.font]*1/6; params.entryHSpace _ 10; params.defaultServer _ UserProfile.Token["Scanner.Server", "York"]; params.calFileName _ UserProfile.Token["Scanner.CalibrationFile", "ScannerCal"]; parameters _ params; END; ReactToProfile[edit]; END.