MBS Tools Plugin Documentation

Christian Schmitz

September 6, 2021 2 0.1 Introduction

This is the PDF version of the documentation for the Xojo Plug-in from Monkeybread Software Germany. Plugin part: MBS Tools Plugin

0.2 Content

• 1 List of all topics 3 • 2 List of all classes 71 • 3 List of all modules 75 • 4 All items in this plugin 77 • 18 List of Questions in the FAQ 701 • 19 The FAQ 711 Chapter 1

List of Topics

• 5 Clipper 113

– 5.1.1 class ClipperEngineMBS 113 ∗ 5.1.5 AddPath(path as ClipperPathMBS, PolyType as ClipperMBS.PolyType, Closed as Boolean) as Boolean 113 ∗ 5.1.6 AddPath(path as ClipperPathMBS, PolyType as Integer, Closed as Boolean) as Boolean 114 ∗ 5.1.7 AddPaths(paths as ClipperPathsMBS, PolyType as ClipperMBS.PolyType, Closed as Boolean) as Boolean 115 ∗ 5.1.8 AddPaths(paths as ClipperPathsMBS, PolyType as Integer, Closed as Boolean) as Boolean 115 ∗ 5.1.9 Clear 116 ∗ 5.1.10 Constructor(initOptions as integer = 0) 116 ∗ 5.1.11 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, fill- Type as ClipperMBS.PolyFillType) as Boolean 116 ∗ 5.1.12 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, subj- FillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 117 ∗ 5.1.13 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean 117 ∗ 5.1.14 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 118 ∗ 5.1.15 Execute(clipType as Integer, byref solution as ClipperPathsMBS, fillType as Integer) as Boolean 119 ∗ 5.1.16 Execute(clipType as Integer, byref solution as ClipperPathsMBS, subjFillType as In- teger, clipFillType as Integer) as Boolean 120 ∗ 5.1.17 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fillType as Inte- ger) as Boolean 121

3 4 CHAPTER 1. LIST OF TOPICS ∗ 5.1.18 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean 121 ∗ 5.1.19 GetBounds(byref left as integer, byref top as integer, byref right as integer, byref bottom as integer) 122 ∗ 5.1.21 BoundsBottom as Integer 122 ∗ 5.1.22 BoundsLeft as Integer 122 ∗ 5.1.23 BoundsRight as Integer 122 ∗ 5.1.24 BoundsTop as Integer 123 ∗ 5.1.25 Handle as Integer 123 ∗ 5.1.26 Owner as Variant 123 ∗ 5.1.27 PreserveCollinear as Boolean 123 ∗ 5.1.28 ReverseSolution as Boolean 124 ∗ 5.1.29 StrictlySimple as Boolean 124 ∗ 5.1.30 Tag as Variant 125 – 5.3.1 module ClipperMBS 127 ∗ 5.3.7 Area(path as ClipperPathMBS) as double 127 ∗ 5.3.8 CleanPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, dis- tance as double = 1.415) 128 ∗ 5.3.9 CleanPolygon(Poly as ClipperPathMBS, distance as double = 1.415) 128 ∗ 5.3.10 CleanPolygons(InPoly as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, dis- tance as double = 1.415) 129 ∗ 5.3.11 CleanPolygons(Poly as ClipperPathsMBS, distance as double = 1.415) 129 ∗ 5.3.12 ClosedPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as Clipper- PathsMBS) 130 ∗ 5.3.13 EllipsePoints(Left as Double, Top as Double, Right as Double, Bottom as Double) as ClipperPathMBS 130 ∗ 5.3.14 MinkowskiDiff(poly1 as ClipperPathMBS, poly2 as ClipperPathMBS, byref solution as ClipperPathsMBS) 130 ∗ 5.3.15 MinkowskiSum(pattern as ClipperPathMBS, path as ClipperPathMBS, byref solution as ClipperPathsMBS, pathIsClosed as boolean) 131 ∗ 5.3.16 MinkowskiSum(pattern as ClipperPathMBS, paths as ClipperPathsMBS, byref solution as ClipperPathsMBS, pathIsClosed as boolean) 131 ∗ 5.3.17 OpenPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as Clipper- PathsMBS) 131 ∗ 5.3.18 Orientation(path as ClipperPathMBS) as boolean 131 ∗ 5.3.19 PointInPolygon(path as ClipperPathMBS, pt as ClipperPointMBS) as Integer 132 ∗ 5.3.20 PolyTreeToPaths(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS) 132 ∗ 5.3.21 ReversePath(path as ClipperPathMBS) 133 ∗ 5.3.22 ReversePaths(paths as ClipperPathsMBS) 133 ∗ 5.3.23 SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd) 133 ∗ 5.3.24 SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer) 133 5 ∗ 5.3.25 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd) 134 ∗ 5.3.26 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer) 134 ∗ 5.3.27 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd) 135 ∗ 5.3.28 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as Integer) 136 ∗ 5.3.29 TranslatePath(path as ClipperPathMBS, delta as ClipperPointMBS) as ClipperPathMBS 136 ∗ 5.3.30 TranslatePath(path as ClipperPathMBS, x as Int64, y as Int64) as ClipperPathMBS 136 ∗ 5.3.31 Version as string 137 ∗ 5.3.33 hiRange = & h3FFFFFFFFFFFFFFF 137 ∗ 5.3.34 loRange = & h3FFFFFFF 137 – 5.4.1 class ClipperOffsetMBS 138 ∗ 5.4.5 AddPath(path as ClipperPathMBS, joinType as ClipperMBS.JoinType, endType as ClipperMBS.EndType) 138 ∗ 5.4.6 AddPath(path as ClipperPathMBS, joinType as Integer, endType as Integer) 139 ∗ 5.4.7 AddPaths(paths as ClipperPathsMBS, joinType as ClipperMBS.JoinType, endType as ClipperMBS.EndType) 139 ∗ 5.4.8 AddPaths(paths as ClipperPathsMBS, joinType as Integer, endType as Integer) 139 ∗ 5.4.9 Clear 140 ∗ 5.4.10 Constructor(miterLimit as double = 2.0, roundPrecision as double = 0.25) 140 ∗ 5.4.11 Execute(byref Paths as ClipperPathsMBS, delta as double) 140 ∗ 5.4.12 Execute(byref PolyTree as ClipperPolyTreeMBS, delta as double) 140 ∗ 5.4.14 ArcTolerance as Double 141 ∗ 5.4.15 Handle as Integer 142 ∗ 5.4.16 MiterLimit as Double 142 ∗ 5.4.17 Owner as Variant 142 ∗ 5.4.18 Tag as Variant 142 – 5.5.1 class ClipperPathMBS 144 ∗ 5.5.3 Append(item as ClipperPointMBS) 144 ∗ 5.5.4 Append(X as Int64, Y as Int64) 144 ∗ 5.5.5 Area as double 144 ∗ 5.5.6 Clear 145 ∗ 5.5.7 Constructor 145 ∗ 5.5.8 Constructor(otherPath as ClipperPathMBS) 145 ∗ 5.5.9 Constructor(points() as ClipperPointMBS) 145 ∗ 5.5.10 Equal(otherPath as ClipperPathMBS) as boolean 146 ∗ 5.5.11 Insert(Index as Integer, item as ClipperPointMBS) 146 ∗ 5.5.12 Orientation as boolean 146 ∗ 5.5.13 PointInPolygon(pt as ClipperPointMBS) as Integer 147 6 CHAPTER 1. LIST OF TOPICS ∗ 5.5.14 Remove(index as integer) 148 ∗ 5.5.15 ReversePath 148 ∗ 5.5.16 TranslatePath(delta as ClipperPointMBS) as ClipperPathMBS 148 ∗ 5.5.17 TranslatePath(x as Int64, y as Int64) as ClipperPathMBS 148 ∗ 5.5.18 Values as ClipperPointMBS() 148 ∗ 5.5.19 ValuesToArray(dest() as ClipperPointMBS) 149 ∗ 5.5.21 Count as Integer 149 ∗ 5.5.22 Empty as Boolean 149 ∗ 5.5.23 Handle as Integer 149 ∗ 5.5.24 Owner as Variant 149 ∗ 5.5.25 Tag as Variant 150 ∗ 5.5.26 Value(Index as Integer) as ClipperPointMBS 150 – 5.6.1 class ClipperPathsMBS 151 ∗ 5.6.3 Append(item as ClipperPathMBS) 151 ∗ 5.6.4 Clear 151 ∗ 5.6.5 Constructor 151 ∗ 5.6.6 Constructor(otherPaths as ClipperPathsMBS) 152 ∗ 5.6.7 Equal(otherPaths as ClipperPathsMBS) as boolean 152 ∗ 5.6.8 Insert(Index as Integer, item as ClipperPathMBS) 152 ∗ 5.6.9 Remove(index as integer) 152 ∗ 5.6.10 Reverse 152 ∗ 5.6.11 Values as ClipperPathMBS() 152 ∗ 5.6.12 ValuesToArray(dest() as ClipperPathMBS) 153 ∗ 5.6.14 Count as Integer 153 ∗ 5.6.15 Empty as Boolean 153 ∗ 5.6.16 Handle as Integer 153 ∗ 5.6.17 Owner as Variant 153 ∗ 5.6.18 Tag as Variant 154 ∗ 5.6.19 Value(Index as Integer) as ClipperPathMBS 154 – 5.7.1 class ClipperPointMBS 155 ∗ 5.7.3 Constructor(x as Int64 = 0, y as Int64 = 0) 155 ∗ 5.7.4 Equal(other as ClipperPointMBS) as boolean 155 ∗ 5.7.5 Point(x as Int64 = 0, y as Int64 = 0) as ClipperPointMBS 155 ∗ 5.7.7 X as Int64 155 ∗ 5.7.8 Y as Int64 156 – 5.8.1 class ClipperPolyNodeMBS 157 ∗ 5.8.3 Constructor 157 ∗ 5.8.5 ChildCount as Integer 157 ∗ 5.8.6 Childs as ClipperPolyNodesMBS 157 ∗ 5.8.7 Contour as ClipperPathMBS 158 ∗ 5.8.8 Handle as Integer 158 7 ∗ 5.8.9 IsHole as Boolean 158 ∗ 5.8.10 IsOpen as Boolean 158 ∗ 5.8.11 NextNode as ClipperPolyNodeMBS 159 ∗ 5.8.12 Owner as Variant 159 ∗ 5.8.13 ParentNode as ClipperPolyNodeMBS 159 ∗ 5.8.14 Tag as Variant 159 – 5.9.1 class ClipperPolyNodesMBS 160 ∗ 5.9.3 Append(item as ClipperPolyNodeMBS) 160 ∗ 5.9.4 Clear 160 ∗ 5.9.5 Constructor 160 ∗ 5.9.6 Constructor(otherPolyNodes as ClipperPolyNodesMBS) 160 ∗ 5.9.7 Equal(otherPolyNodes as ClipperPolyNodesMBS) as boolean 161 ∗ 5.9.8 Insert(Index as Integer, item as ClipperPolyNodeMBS) 161 ∗ 5.9.9 Remove(index as integer) 161 ∗ 5.9.10 Values as ClipperPolyNodeMBS() 161 ∗ 5.9.12 Count as Integer 161 ∗ 5.9.13 Empty as Boolean 161 ∗ 5.9.14 Handle as Integer 162 ∗ 5.9.15 Owner as Variant 162 ∗ 5.9.16 Tag as Variant 162 ∗ 5.9.17 Value(Index as Integer) as ClipperPolyNodeMBS 162 – 5.10.1 class ClipperPolyTreeMBS 163 ∗ 5.10.3 Clear 163 ∗ 5.10.4 Constructor 164 ∗ 5.10.5 Constructor(otherPolyNodes as ClipperPolyTreeMBS) 164 ∗ 5.10.7 First as ClipperPolyNodeMBS 164 ∗ 5.10.8 Total as Integer 164 8 CHAPTER 1. LIST OF TOPICS • 6 CUPS 165 – 6.1.1 class CUPSDestinationMBS 165 ∗ 6.1.5 Options as CUPSOptionMBS() 166 ∗ 6.1.7 Instance as String 166 ∗ 6.1.8 isDefault as Boolean 166 ∗ 6.1.9 Name as String 166 – 6.3.1 class CUPSJobMBS 169 ∗ 6.3.3 CompletedDateTime as DateTime 170 ∗ 6.3.4 CompletedTime as Date 170 ∗ 6.3.5 CreationDateTime as DateTime 170 ∗ 6.3.6 CreationTime as Date 171 ∗ 6.3.7 Dest as String 171 ∗ 6.3.8 Format as String 172 ∗ 6.3.9 ID as Integer 172 ∗ 6.3.10 Priority as Integer 172 ∗ 6.3.11 ProcessingDateTime as DateTime 173 ∗ 6.3.12 ProcessingTime as Date 173 ∗ 6.3.13 Size as Integer 173 ∗ 6.3.14 State as Integer 174 ∗ 6.3.15 Title as String 175 ∗ 6.3.16 User as String 175 – 6.4.1 module CUPSMBS 176 ∗ 6.4.5 CancelJob(name as string, job as Int32) 176 ∗ 6.4.6 GetDefault as string 177 ∗ 6.4.7 GetDestinations as CUPSDestinationMBS() 177 ∗ 6.4.8 GetJobs(name as string, OnlyMyJobs as boolean, whichjobs as Integer) as CUPSJobMBS() 177 ∗ 6.4.9 GetPassword(prompt as string) as string 178 ∗ 6.4.10 GetPPD(name as string) as string 178 ∗ 6.4.11 LastError as Integer 178 ∗ 6.4.12 LastErrorString as string 179 ∗ 6.4.13 PrintData(name as string, Data as String, Title as string) as Integer 179 ∗ 6.4.14 PrintFile(name as string, file as folderitem, title as string) as Integer 179 ∗ 6.4.15 PrintFile(name as string, file as folderitem, title as string, options() as CUPSOption- MBS) as Integer 180 ∗ 6.4.16 PrintFiles(name as string, files() as folderitem, title as string) as Integer 180 ∗ 6.4.17 PrintFiles(name as string, files() as folderitem, title as string, options() as CUPSOp- tionMBS) as Integer 181 ∗ 6.4.18 Server as string 181 ∗ 6.4.19 SetDefaultPrinter(printer as string) 181 ∗ 6.4.20 SetServer(server as string) 181 9 ∗ 6.4.21 SetUser(user as string) 182 ∗ 6.4.22 User as string 182 ∗ 6.4.24 kJobAborted = 8 182 ∗ 6.4.25 kJobCanceled = 7 183 ∗ 6.4.26 kJobCompleted = 9 184 ∗ 6.4.27 kJobHeld = 4 184 ∗ 6.4.28 kJobIDAll = -1 185 ∗ 6.4.29 kJobIDCurrent = 0 185 ∗ 6.4.30 kJobPending = 3 186 ∗ 6.4.31 kJobProcessing = 5 186 ∗ 6.4.32 kJobStopped = 6 187 ∗ 6.4.33 kPrinterAUTHENTICATED = & h400000 188 ∗ 6.4.34 kPrinterBIND = & h0400 188 ∗ 6.4.35 kPrinterBW = & h0004 188 ∗ 6.4.36 kPrinterCLASS = & h0001 189 ∗ 6.4.37 kPrinterCOLLATE = & h0080 189 ∗ 6.4.38 kPrinterCOLOR = & h0008 189 ∗ 6.4.39 kPrinterCOMMANDS = & h800000 190 ∗ 6.4.40 kPrinterCOPIES = & h0040 190 ∗ 6.4.41 kPrinterCOVER = & h0200 190 ∗ 6.4.42 kPrinterDEFAULT = & h20000 190 ∗ 6.4.43 kPrinterDELETE = & h100000 190 ∗ 6.4.44 kPrinterDISCOVERED = & h1000000 191 ∗ 6.4.45 kPrinterDUPLEX = & h0010 191 ∗ 6.4.46 kPrinterFAX = & h40000 191 ∗ 6.4.47 kPrinterIMPLICIT = & h10000 192 ∗ 6.4.48 kPrinterLARGE = & h4000 192 ∗ 6.4.49 kPrinterLOCAL = & h0000 192 ∗ 6.4.50 kPrinterMEDIUM = & h2000 193 ∗ 6.4.51 kPrinterMFP = & h4000000 193 ∗ 6.4.52 kPrinterNotShared = & h200000 193 ∗ 6.4.53 kPrinterOPTIONS = & h6fffc 194 ∗ 6.4.54 kPrinterPUNCH = & h0100 194 ∗ 6.4.55 kPrinterREJECTING = & h80000 194 ∗ 6.4.56 kPrinterREMOTE = & h0002 194 ∗ 6.4.57 kPrinterSCANNER = & h2000000 194 ∗ 6.4.58 kPrinterSMALL = & h1000 195 ∗ 6.4.59 kPrinterSORT = & h0800 196 ∗ 6.4.60 kPrinterSTAPLE = & h0020 196 ∗ 6.4.61 kPrinterVARIABLE = & h8000 196 ∗ 6.4.62 kStatusAttributes = & h040B 196 ∗ 6.4.63 kStatusAttributesNotSettable = & h0413 196 10 CHAPTER 1. LIST OF TOPICS ∗ 6.4.64 kStatusBadRequest = & h0400 196 ∗ 6.4.65 kStatusCharset = & h040D 197 ∗ 6.4.66 kStatusCompressionError = & h0410 197 ∗ 6.4.67 kStatusCompressionNotSupported = & h040F 197 ∗ 6.4.68 kStatusConflict = & h040E 197 ∗ 6.4.69 kStatusDeviceError = & h0504 197 ∗ 6.4.70 kStatusDocumentAccessError = & h0412 198 ∗ 6.4.71 kStatusDocumentFormat = & h040A 198 ∗ 6.4.72 kStatusDocumentFormatError = & h0411 198 ∗ 6.4.73 kStatusErrorJobCanceled = & h0508 198 ∗ 6.4.74 kStatusForbidden = & h0401 198 ∗ 6.4.75 kStatusGone = & h0407 198 ∗ 6.4.76 kStatusIgnoredAllNotifications = & h0416 199 ∗ 6.4.77 kStatusIgnoredAllSubscriptions = & h0414 199 ∗ 6.4.78 kStatusInternalError = & h0500 199 ∗ 6.4.79 kStatusMultipleJobsNotSupported = & h0509 199 ∗ 6.4.80 kStatusNotAccepting = & h0506 199 ∗ 6.4.81 kStatusNotAuthenticated = & h0402 200 ∗ 6.4.82 kStatusNotAuthorized = & h0403 200 ∗ 6.4.83 kStatusNotFound = & h0406 200 ∗ 6.4.84 kStatusNotPossible = & h0404 200 ∗ 6.4.85 kStatusOK = 0 200 ∗ 6.4.86 kStatusOKButCancelSubscription = 6 200 ∗ 6.4.87 kStatusOKConflict = 2 201 ∗ 6.4.88 kStatusOKEventsComplete = 7 201 ∗ 6.4.89 kStatusOKIgnoredNotifications = 4 201 ∗ 6.4.90 kStatusOKIgnoredSubscriptions = 3 201 ∗ 6.4.91 kStatusOKSubst = 1 201 ∗ 6.4.92 kStatusOKTooManyEvents = 5 202 ∗ 6.4.93 kStatusOperationNotSupported = & h0501 202 ∗ 6.4.94 kStatusPrinterBusy = & h0507 202 ∗ 6.4.95 kStatusPrinterIsDeactivated = & h050A 202 ∗ 6.4.96 kStatusPrintSupportFileNotFound = & h0417 202 ∗ 6.4.97 kStatusRedirectionOtherSite = & h200 202 ∗ 6.4.98 kStatusRequestEntity = & h0408 203 ∗ 6.4.99 kStatusRequestValue = & h0409 203 ∗ 6.4.100 kStatusSeeOther = & h280 203 ∗ 6.4.101 kStatusServiceUnavailable = & h0502 203 ∗ 6.4.102 kStatusTemporaryError = & h0505 203 ∗ 6.4.103 kStatusTimeout = & h0405 204 ∗ 6.4.104 kStatusTooManySubscriptions = & h0415 204 ∗ 6.4.105 kStatusURIScheme = & h040C 204 11 ∗ 6.4.106 kStatusVersionNotSupported = & h0503 205 ∗ 6.4.107 kWhichJobsActive = 0 205 ∗ 6.4.108 kWhichJobsAll = -1 205 ∗ 6.4.109 kWhichJobsComplete = 1 205 – 6.6.1 class CUPSOptionMBS 207 ∗ 6.6.3 Name as String 207 ∗ 6.6.4 Value as String 207 12 CHAPTER 1. LIST OF TOPICS • 7 JavaScript 209 – 7.1.1 class JavaScriptDateComponentsMBS 209 ∗ 7.1.5 DateTimeValue as DateTime 210 ∗ 7.1.6 DateValue as Date 210 ∗ 7.1.7 Day as Integer 210 ∗ 7.1.8 Hour as Integer 211 ∗ 7.1.9 Millisecond as Integer 211 ∗ 7.1.10 Minute as Integer 211 ∗ 7.1.11 Month as Integer 211 ∗ 7.1.12 Second as Integer 211 ∗ 7.1.13 SQLDateTime as String 212 ∗ 7.1.14 WeekDay as Integer 212 ∗ 7.1.15 Year as Integer 212 – 7.3.1 class JavaScriptEngineMBS 214 ∗ 7.3.9 AddFunction(Name as String, JavaScript as String, FileName as String = ””) 216 ∗ 7.3.10 CallFunction(Name as String, ParamArray Params as Variant) as Variant 217 ∗ 7.3.11 CallFunction(Name as String, Params() as Variant) as Variant 217 ∗ 7.3.12 CallFunctionMT(Name as String, ParamArray Params as Variant) as Variant 218 ∗ 7.3.13 CallFunctionMT(Name as String, Params() as Variant) as Variant 219 ∗ 7.3.14 DateComponentsToTime(date as JavaScriptDateComponentsMBS) as Double 219 ∗ 7.3.15 Destructor 220 ∗ 7.3.16 Evaluate(JavaScript as String) as Variant 220 ∗ 7.3.17 EvaluateMT(JavaScript as String) as Variant 220 ∗ 7.3.18 EvaluateToString(JavaScript as String) as String 221 ∗ 7.3.19 InitModules 221 ∗ 7.3.20 LoadFunction(Name as String, Data as Memoryblock) as Boolean 222 ∗ 7.3.21 Now as Double 222 ∗ 7.3.22 RegisterFunction(Name as String, theDelegate as JavaScriptEngineDelegateMBS, ArgCount as Integer = -1, tag as Variant = nil) 223 ∗ 7.3.23 SaveFunction(Name as String) as MemoryBlock 223 ∗ 7.3.24 TimeToDateComponents(time as Double) as JavaScriptDateComponentsMBS 224 ∗ 7.3.26 Handle as Integer 225 ∗ 7.3.27 MemoryBlocks as Dictionary 225 ∗ 7.3.28 ObjectCount as Integer 225 ∗ 7.3.29 StringCount as Integer 225 ∗ 7.3.30 GlobalMemoryBlock(PropertyName as String) as MemoryBlock 226 ∗ 7.3.31 GlobalProperty(PropertyName as String) as Variant 226 ∗ 7.3.32 GlobalPropertyJSON(PropertyName as String) as String 226 ∗ 7.3.34 Input(values() as Variant) as Variant 227 ∗ 7.3.35 Print(values() as Variant) 227 ∗ 7.3.37 JavaScriptEngineDelegateMBS(Name as String, Params() as Variant, tag as Variant) as Variant 227 13 • 13 SATSolver 377 – 13.2.1 class LGLMBS 378 ∗ 13.2.9 Add(lit as Integer) 379 ∗ 13.2.10 Assume(lit as Integer) 379 ∗ 13.2.11 CAssume(lit as Integer) 379 ∗ 13.2.12 Clone as LGLMBS 379 ∗ 13.2.13 Constructor 380 ∗ 13.2.14 DefaultOption(Name as String) as Integer 380 ∗ 13.2.15 Deref(lit as Integer) as Integer 380 ∗ 13.2.16 Failed(lit as Integer) as Integer 380 ∗ 13.2.17 Fixate 380 ∗ 13.2.18 Fixed(lit as Integer) as Integer 381 ∗ 13.2.19 FlushCache 381 ∗ 13.2.20 FlushTimers 381 ∗ 13.2.21 Fork as LGLMBS 381 ∗ 13.2.22 Freeze(lit as Integer) 382 ∗ 13.2.23 Frozen(lit as Integer) as Integer 382 ∗ 13.2.24 GetOptionMinMax(Name as String, byref min as Integer, byref max as Integer) as Integer 382 ∗ 13.2.25 HasOption(Name as String) as Boolean 382 ∗ 13.2.26 IncVar as Integer 382 ∗ 13.2.27 Join(Child as LGLMBS) as Integer 383 ∗ 13.2.28 LibVersion as String 383 ∗ 13.2.29 Lookahead as Integer 383 ∗ 13.2.30 Melt(lit as Integer) 383 ∗ 13.2.31 MeltAll 383 ∗ 13.2.32 ParseFile(File as FolderItem, force as boolean = false) as String 384 ∗ 13.2.33 ParseFile(File as FolderItem, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 384 ∗ 13.2.34 ParseFileMT(File as FolderItem, force as boolean = false) as String 384 ∗ 13.2.35 ParseFileMT(File as FolderItem, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 384 ∗ 13.2.36 ParsePath(Path as String, force as boolean = false) as String 385 ∗ 13.2.37 ParsePath(Path as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 385 ∗ 13.2.38 ParsePathMT(Path as String, force as boolean = false) as String 386 ∗ 13.2.39 ParsePathMT(Path as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 387 ∗ 13.2.40 ParseString(Data as String, force as boolean = false) as String 387 ∗ 13.2.41 ParseString(Data as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 388 ∗ 13.2.42 ParseStringMT(Data as String, force as boolean = false) as String 388 14 CHAPTER 1. LIST OF TOPICS ∗ 13.2.43 ParseStringMT(Data as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 388 ∗ 13.2.44 Print(File as FolderItem = nil) 389 ∗ 13.2.45 PrintAll(File as FolderItem = nil) 389 ∗ 13.2.46 PrintBanner(Name as String, Prefix as String, File as FolderItem =nil) 389 ∗ 13.2.47 PrintOptions(prefix as string, IgnoreSome as boolean) 389 ∗ 13.2.48 PrintPCS(mixed as boolean) 390 ∗ 13.2.49 PrintRangeOptions 390 ∗ 13.2.50 PrintSizes 390 ∗ 13.2.51 PrintStats 390 ∗ 13.2.52 PrintUsage 390 ∗ 13.2.53 ReadOptionFile(File as FolderItem) as Integer 390 ∗ 13.2.54 Reconstk(byref Start as Ptr, byref Top as Ptr) 391 ∗ 13.2.55 ReduceCache 391 ∗ 13.2.56 Representative(lit as Integer) as Integer 391 ∗ 13.2.57 ResetPhase(lit as integer) 391 ∗ 13.2.58 Reusable(lit as Integer) as Integer 391 ∗ 13.2.59 Reuse(lit as Integer) 391 ∗ 13.2.60 Sat as Integer 392 ∗ 13.2.61 SatMT as Integer 392 ∗ 13.2.62 SetAPITraceFile(File as FolderItem) 392 ∗ 13.2.63 SetID(tid as Integer, tids as Integer) 392 ∗ 13.2.64 SetImportant(lit as integer) 393 ∗ 13.2.65 SetOutputFile(File as FolderItem) 393 ∗ 13.2.66 SetPhase(lit as integer) 393 ∗ 13.2.67 SetPhases 393 ∗ 13.2.68 SetTraceFile(File as FolderItem) 393 ∗ 13.2.69 Simp(iterations as integer) as Integer 394 ∗ 13.2.70 TraverseAllClauses 394 ∗ 13.2.71 TraverseEquivalences 394 ∗ 13.2.72 TraverseRemainingClauses 394 ∗ 13.2.73 TraverseUnits 394 ∗ 13.2.74 Unclone(Child as LGLMBS) as Integer 395 ∗ 13.2.75 Usable(lit as Integer) as Integer 395 ∗ 13.2.77 Aborted as Boolean 395 ∗ 13.2.78 AbortMessage as String 395 ∗ 13.2.79 Bytes as Int64 395 ∗ 13.2.80 Changed as Integer 396 ∗ 13.2.81 Confs as Int64 396 ∗ 13.2.82 Decs as Int64 396 ∗ 13.2.83 Handle as Integer 396 ∗ 13.2.84 Inconsistent as Boolean 396 15 ∗ 13.2.85 MaxMegaBytes as Double 397 ∗ 13.2.86 MaxVar as Integer 397 ∗ 13.2.87 MegaBytes as Double 397 ∗ 13.2.88 Options as Dictionary 397 ∗ 13.2.89 Prefix as String 397 ∗ 13.2.90 ProcessTime as Double 397 ∗ 13.2.91 Props as Int64 398 ∗ 13.2.92 Seconds as Double 398 ∗ 13.2.93 Option(Name as String) as Integer 398 ∗ 13.2.95 Aborted 398 ∗ 13.2.96 TraverseAllClauses(Lit as Integer) 399 ∗ 13.2.97 TraverseEquivalences(Lit as Integer, Representation as Integer) 399 ∗ 13.2.98 TraverseRemainingClauses(Lit as Integer) 399 ∗ 13.2.99 TraverseUnits(Unit as Integer) 399 ∗ 13.2.101 LGL_SATISFIABLE = 10 399 ∗ 13.2.102 LGL_UNKNOWN = 0 400 ∗ 13.2.103 LGL_UNSATISFIABLE = 20 400 16 CHAPTER 1. LIST OF TOPICS • 8 LMFit 229 – 8.1.1 class LMFitControlMBS 229 ∗ 8.1.5 MsgFileStderr 229 ∗ 8.1.6 MsgFileStdout 230 ∗ 8.1.8 epsilon as Double 230 ∗ 8.1.9 ftol as Double 230 ∗ 8.1.10 gtol as Double 230 ∗ 8.1.11 msgfile as FolderItem 230 ∗ 8.1.12 m_maxpri as Integer 231 ∗ 8.1.13 n_maxpri as Integer 231 ∗ 8.1.14 patience as Integer 231 ∗ 8.1.15 scale_diag as Integer 231 ∗ 8.1.16 stepbound as Double 231 ∗ 8.1.17 verbosity as Integer 232 ∗ 8.1.18 xtol as Double 232 – 8.2.1 class LMFitMBS 233 ∗ 8.2.7 LMCurve(NPar as Integer, Par as Ptr, mDat as Integer, t as Ptr, y as Ptr, control as LMFitControlMBS, status as LMFitStatusMBS, tag as variant = nil) 233 ∗ 8.2.8 LMCurve(NPar as Integer, Par() as double, mDat as Integer, t() as double, y() as double, control as LMFitControlMBS, status as LMFitStatusMBS, tag as variant = nil) 234 ∗ 8.2.9 LMMin(NPar as Integer, Par as Ptr, mDat as Integer, control as LMFitControlMBS, status as LMFitStatusMBS, tag as variant = nil) 234 ∗ 8.2.10 LMMin(NPar as Integer, Par() as double, mDat as Integer, control as LMFitCon- trolMBS, status as LMFitStatusMBS, tag as variant = nil) 235 ∗ 8.2.12 provideArrays as Boolean 236 ∗ 8.2.14 evaluateCurve(t as double, par as Ptr, nPar as Integer, parameters() as double, tag as variant) as double 236 ∗ 8.2.15 evaluateMin(par as Ptr, nPar as Integer, parameters() as double, mDat as Integer, fvec as Ptr, tag as variant) as Integer 237 – 8.3.1 class LMFitStatusMBS 238 ∗ 8.3.5 fnorm as Double 238 ∗ 8.3.6 nfev as Integer 238 ∗ 8.3.7 outcome as Integer 238 ∗ 8.3.8 outcomeInfoMessage as String 239 ∗ 8.3.9 outcomeShortMessage as String 239 ∗ 8.3.10 userbreak as Integer 239 17 • 17 Timecode 661

– 17.1.1 class LTCDecoderMBS 661 ∗ 17.1.3 Constructor(apv as Integer, queueSize as Integer) 661 ∗ 17.1.4 Destructor 661 ∗ 17.1.5 FlushQueue 662 ∗ 17.1.6 Read as LTCFrameMBS 662 ∗ 17.1.7 Read(frame as LTCFrameMBS) as Boolean 662 ∗ 17.1.8 WriteSingle(data as MemoryBlock, posinfo as UInt64 = 0) 662 ∗ 17.1.9 WriteSingle(data as Ptr, Count as Integer, posinfo as UInt64 = 0) 663 ∗ 17.1.10 WriteSingle(data as String, posinfo as UInt64 = 0) 663 ∗ 17.1.11 WriteSInt16(data as MemoryBlock, posinfo as UInt64 = 0) 664 ∗ 17.1.12 WriteSInt16(data as Ptr, Count as Integer, posinfo as UInt64 = 0) 664 ∗ 17.1.13 WriteSInt16(data as String, posinfo as UInt64 = 0) 664 ∗ 17.1.14 WriteUInt16(data as MemoryBlock, posinfo as UInt64 = 0) 665 ∗ 17.1.15 WriteUInt16(data as Ptr, Count as Integer, posinfo as UInt64 = 0) 665 ∗ 17.1.16 WriteUInt16(data as String, posinfo as UInt64 = 0) 666 ∗ 17.1.17 WriteUInt8(data as MemoryBlock, posinfo as UInt64 = 0) 666 ∗ 17.1.18 WriteUInt8(data as Ptr, Count as Integer, posinfo as UInt64 = 0) 666 ∗ 17.1.19 WriteUInt8(data as String, posinfo as UInt64 = 0) 667 ∗ 17.1.21 Handle as Integer 667 ∗ 17.1.22 QueueLength as Integer 667 – 17.2.1 class LTCEncoderMBS 669 ∗ 17.2.3 Constructor(SampleRate as Double, FPS as Double, TVStandard as Integer, Flags as Integer) 669 ∗ 17.2.4 CopyBuffer as MemoryBlock 669 ∗ 17.2.5 CopyBufferString as String 669 ∗ 17.2.6 DecrementTimecode as Boolean 670 ∗ 17.2.7 Destructor 670 ∗ 17.2.8 EncodeByte(byte as UInt8, speed as Double) as boolean 670 ∗ 17.2.9 EncodeFrame 670 ∗ 17.2.10 EncodeFrame(Speed as Double) 671 ∗ 17.2.11 EncoderReinit(SampleRate as Double, FPS as Double, TVStandard as Integer, Flags as Integer) as Boolean 671 ∗ 17.2.12 FlushBuffer 672 ∗ 17.2.13 GetBuffer(byref size as Integer, flush as boolean) asPtr 672 ∗ 17.2.14 IncrementTimecode as Boolean 672 ∗ 17.2.15 Reset 673 ∗ 17.2.16 SetBufferSize(SampleRate as Double, FPS as Double) as boolean 673 ∗ 17.2.17 SetFilter(RiseTime as Double) 673 ∗ 17.2.18 SetVolume(dBFS as double) as boolean 674 ∗ 17.2.20 BufferPtr as Ptr 674 18 CHAPTER 1. LIST OF TOPICS ∗ 17.2.21 BufferSize as Integer 674 ∗ 17.2.22 Filter as Double 675 ∗ 17.2.23 Flags as Integer 675 ∗ 17.2.24 FPS as Double 675 ∗ 17.2.25 Frame as LTCFrameMBS 675 ∗ 17.2.26 Handle as Integer 675 ∗ 17.2.27 SampleRate as Double 676 ∗ 17.2.28 Standard as Integer 676 ∗ 17.2.29 TimeCode as LTCSMPTETimecodeMBS 676 ∗ 17.2.30 UserBits as UInt32 676 – 17.3.1 class LTCFrameExtMBS 677 ∗ 17.3.3 OffEnd as Int64 677 ∗ 17.3.4 OffStart as Int64 677 ∗ 17.3.5 Reverse as Integer 678 ∗ 17.3.6 SampleMax as UInt8 678 ∗ 17.3.7 SampleMin as UInt8 678 ∗ 17.3.8 Volume as Double 678 ∗ 17.3.9 biphaseTics(index as Integer) as Single 678 – 17.4.1 class LTCFrameMBS 680 ∗ 17.4.3 Clone as LTCFrameExtMBS 680 ∗ 17.4.4 Constructor 680 ∗ 17.4.5 Constructor(InputTimecode as LTCSMPTETimecodeMBS, TVStandard as Integer, Flags as Integer = 0) 680 ∗ 17.4.6 Constructor(other as LTCFrameMBS) 681 ∗ 17.4.7 FrameAlignment(samples_per_frame as Double, TVStandard as Integer) as UInt64 681 ∗ 17.4.8 FrameDecrement(fps as integer, TVStandard as integer, Flags as integer = 0) as Boolean 682 ∗ 17.4.9 FrameIncrement(fps as integer, TVStandard as integer, Flags as integer = 0) as Boolean 682 ∗ 17.4.10 ParseBCGFlags(TVStandard as Integer) as Integer 683 ∗ 17.4.11 Reset 683 ∗ 17.4.12 SetParity(TVStandard as Integer) 683 ∗ 17.4.14 BinaryGroupFlagBit0 as Integer 684 ∗ 17.4.15 BinaryGroupFlagBit1 as Integer 684 ∗ 17.4.16 BinaryGroupFlagBit2 as Integer 684 ∗ 17.4.17 BiphaseMarkPhaseCorrection as Integer 684 ∗ 17.4.18 ColFrame as Integer 685 ∗ 17.4.19 Data as MemoryBlock 685 ∗ 17.4.20 DFBit as Integer 685 ∗ 17.4.21 Frames as Integer 685 ∗ 17.4.22 FrameTens as Integer 685 19 ∗ 17.4.23 FrameUnits as Integer 686 ∗ 17.4.24 Hours as Integer 686 ∗ 17.4.25 HoursTens as Integer 686 ∗ 17.4.26 HoursUnits as Integer 686 ∗ 17.4.27 Mins as Integer 686 ∗ 17.4.28 MinsTens as Integer 687 ∗ 17.4.29 MinsUnits as Integer 687 ∗ 17.4.30 Secs as Integer 687 ∗ 17.4.31 SecsTens as Integer 687 ∗ 17.4.32 SecsUnits as Integer 687 ∗ 17.4.33 SyncWord as Integer 688 ∗ 17.4.34 TimeCode as LTCSMPTETimecodeMBS 688 ∗ 17.4.35 User1 as Integer 688 ∗ 17.4.36 User2 as Integer 688 ∗ 17.4.37 User3 as Integer 688 ∗ 17.4.38 User4 as Integer 689 ∗ 17.4.39 User5 as Integer 689 ∗ 17.4.40 User6 as Integer 689 ∗ 17.4.41 User7 as Integer 689 ∗ 17.4.42 User8 as Integer 690 ∗ 17.4.43 UserBits as UInt32 690 – 17.5.1 module LTCMBS 691 ∗ 17.5.7 FrameToTime(OutputTimecode as LTCSMPTETimecodeMBS, InputFrame as LTCFrameMBS, Flags as Integer = 0) 692 ∗ 17.5.8 LoadLibrary(file as folderitem) as boolean 692 ∗ 17.5.9 LoadLibrary(path as string) as boolean 692 ∗ 17.5.10 TimeToFrame(OutputFrame as LTCFrameMBS, InputTimecode as LTCSMPTETime- codeMBS, TVStandard as Integer, Flags as Integer = 0) 693 ∗ 17.5.12 LibraryLoaded as Boolean 693 ∗ 17.5.13 LibraryLoadError as Integer 693 ∗ 17.5.14 LibraryLoadErrorMessage as String 693 ∗ 17.5.16 LTC_BGF_DONT_TOUCH = 4 694 ∗ 17.5.17 LTC_FRAME_BIT_COUNT = 80 694 ∗ 17.5.18 LTC_NO_PARITY = 8 694 ∗ 17.5.19 LTC_TC_CLOCK = 2 694 ∗ 17.5.20 LTC_TV_1125_60 = 2 694 ∗ 17.5.21 LTC_TV_525_60 = 0 695 ∗ 17.5.22 LTC_TV_625_50 = 1 695 ∗ 17.5.23 LTC_TV_FILM_24 = 3 695 ∗ 17.5.24 LTC_USE_DATE = 1 695 – 17.6.1 class LTCSMPTETimecodeMBS 696 20 CHAPTER 1. LIST OF TOPICS ∗ 17.6.3 Constructor 696 ∗ 17.6.4 Constructor(other as LTCSMPTETimecodeMBS) 696 ∗ 17.6.6 Data as MemoryBlock 696 ∗ 17.6.7 Date as Date 696 ∗ 17.6.8 DateTime as DateTime 697 ∗ 17.6.9 Days as Integer 697 ∗ 17.6.10 Frame as Integer 697 ∗ 17.6.11 Hours as Integer 698 ∗ 17.6.12 Mins as Integer 698 ∗ 17.6.13 Months as Integer 698 ∗ 17.6.14 Secs as Integer 698 ∗ 17.6.15 TimeZone as String 698 ∗ 17.6.16 Years as Integer 699 21 • 9 MarkDown 241

– 9.1.1 class MarkdownDocumentMBS 241 ∗ 9.1.5 Compile(flags as Integer = 35799040) as boolean 241 ∗ 9.1.6 Constructor(data as string, flags as Integer = 35799040) 242 ∗ 9.1.7 Constructor(file as folderitem, flags as Integer = 35799040) 242 ∗ 9.1.8 CSS as string 242 ∗ 9.1.9 Document as string 242 ∗ 9.1.10 Footnotes as MarkdownFootnoteMBS() 242 ∗ 9.1.11 GenerateCSS(File as folderitem) as Integer 243 ∗ 9.1.12 GenerateHTML(File as folderitem) as boolean 243 ∗ 9.1.14 Author as MarkdownLineMBS 243 ∗ 9.1.15 Code as MarkdownParagraphMBS 243 ∗ 9.1.16 Compiled as Boolean 243 ∗ 9.1.17 Date as MarkdownLineMBS 244 ∗ 9.1.18 ExtraFootnotePrefix as String 244 ∗ 9.1.19 Handle as Integer 244 ∗ 9.1.20 HasHTML as Boolean 244 ∗ 9.1.21 Title as MarkdownLineMBS 244 ∗ 9.1.22 URLBase as String 245 ∗ 9.1.24 kAutoLink = & h4000 245 ∗ 9.1.25 kCDATA = & h80 245 ∗ 9.1.26 kExtraFootnote = & h200000 245 ∗ 9.1.27 kInputMask = & h00030000 245 ∗ 9.1.28 kIsLabel = & h08000000 246 ∗ 9.1.29 kNoAlphaList = & h80000 246 ∗ 9.1.30 kNoDivQuote = & h40000 246 ∗ 9.1.31 kNoDList = & h100000 246 ∗ 9.1.32 kNoExt = & h40 246 ∗ 9.1.33 kNoHeader = & h10000 246 ∗ 9.1.34 kNoHTML = 8 247 ∗ 9.1.35 kNoImage = 2 247 ∗ 9.1.36 kNoLinks = 1 247 ∗ 9.1.37 kNoPants = 4 247 ∗ 9.1.38 kNoRelaxed = & h200 247 ∗ 9.1.39 kNoStrikethrough = & h800 248 ∗ 9.1.40 kNoSuperscript = & h100 248 ∗ 9.1.41 kNoTables = & h400 248 ∗ 9.1.42 kSafeLink = & h8000 248 ∗ 9.1.43 kStrict = & h10 248 ∗ 9.1.44 kTabStop = & h20000 248 ∗ 9.1.45 kTagText = & h20 249 22 CHAPTER 1. LIST OF TOPICS ∗ 9.1.46 kTOC = & h1000 249 ∗ 9.1.47 kUserFlags = & h0FFFFFFF 249 – 9.2.1 class MarkdownFootnoteMBS 250 ∗ 9.2.3 Constructor 250 ∗ 9.2.5 Document as MarkdownDocumentMBS 250 ∗ 9.2.6 Flags as Integer 250 ∗ 9.2.7 Height as Integer 250 ∗ 9.2.8 Link as String 251 ∗ 9.2.9 RefNumber as Integer 251 ∗ 9.2.10 Tag as String 251 ∗ 9.2.11 Title as String 251 ∗ 9.2.12 Width as Integer 251 ∗ 9.2.14 kFlagExtraBookmark = 1 252 ∗ 9.2.15 kFlagReferenced = 2 252 – 9.3.1 class MarkdownLineMBS 253 ∗ 9.3.3 Constructor 253 ∗ 9.3.5 Count as Integer 253 ∗ 9.3.6 DLE as Integer 253 ∗ 9.3.7 Document as MarkdownDocumentMBS 254 ∗ 9.3.8 Flags as Integer 254 ∗ 9.3.9 Kind as Integer 254 ∗ 9.3.10 NextLine as MarkdownLineMBS 254 ∗ 9.3.11 Text as String 254 ∗ 9.3.13 kFlagChecked = 2 255 ∗ 9.3.14 kFlagPipeChar = 1 255 ∗ 9.3.15 kKindCode = 1 255 ∗ 9.3.16 kKindDash = 3 255 ∗ 9.3.17 kKindEqual = 5 255 ∗ 9.3.18 kKindHR = 2 256 ∗ 9.3.19 kKindText = 0 256 ∗ 9.3.20 kKindTilde = 4 256 – 9.4.1 class MarkdownParagraphMBS 257 ∗ 9.4.3 Constructor 257 ∗ 9.4.5 Align as Integer 257 ∗ 9.4.6 Document as MarkdownDocumentMBS 257 ∗ 9.4.7 Down as MarkdownParagraphMBS 258 ∗ 9.4.8 hNumber as Integer 258 ∗ 9.4.9 Ident as String 258 ∗ 9.4.10 Lang as String 258 ∗ 9.4.11 NextParagraph as MarkdownParagraphMBS 258 ∗ 9.4.12 Text as MarkdownLineMBS 258 23 ∗ 9.4.13 Typ as Integer 259 ∗ 9.4.15 kAlignCenter = 2 259 ∗ 9.4.16 kAlignImplicit = 0 259 ∗ 9.4.17 kAlignPara = 1 259 ∗ 9.4.18 kTypeAL = 9 259 ∗ 9.4.19 kTypeCode = 1 260 ∗ 9.4.20 kTypeDL = 6 260 ∗ 9.4.21 kTypeHDR = 11 260 ∗ 9.4.22 kTypeHR = 12 260 ∗ 9.4.23 kTypeHTML = 4 260 ∗ 9.4.24 kTypeListItem = 10 261 ∗ 9.4.25 kTypeMarkup = 3 261 ∗ 9.4.26 kTypeOL = 8 261 ∗ 9.4.27 kTypeQuote = 2 261 ∗ 9.4.28 kTypeSource = 14 261 ∗ 9.4.29 kTypeStyle = 5 261 ∗ 9.4.30 kTypeTable = 13 262 ∗ 9.4.31 kTypeUL = 7 262 ∗ 9.4.32 kTypeWhitespace = 0 262 24 CHAPTER 1. LIST OF TOPICS • 10 PHP 263 – 10.1.1 class PHPMBS 263 ∗ 10.1.9 CallbackArgumentCount as Integer 264 ∗ 10.1.10 CallbackArgumentDouble(index as Integer) as Double 265 ∗ 10.1.11 CallbackArgumentInteger(index as Integer) as Integer 265 ∗ 10.1.12 CallbackArgumentString(index as Integer) as string 265 ∗ 10.1.13 Constructor 265 ∗ 10.1.14 Execute(code as string) as string 266 ∗ 10.1.15 existsVariable(name as string) as boolean 266 ∗ 10.1.16 getVariable(name as string) as string 266 ∗ 10.1.17 LoadExtension(Path as string) as boolean 266 ∗ 10.1.18 LoadLibrary(file as folderitem) as boolean 267 ∗ 10.1.19 LoadLibrary(path as string) as boolean 267 ∗ 10.1.20 Run(code as string) as boolean 267 ∗ 10.1.21 setVariable(name as string, value as string) 268 ∗ 10.1.23 Inited as Boolean 268 ∗ 10.1.24 LastErrorFile as String 268 ∗ 10.1.25 LastErrorLine as Integer 268 ∗ 10.1.26 LastErrorMessage as String 268 ∗ 10.1.27 LastExitStatus as Integer 269 ∗ 10.1.28 Loaded as Boolean 269 ∗ 10.1.29 UseUTF8 as Boolean 269 ∗ 10.1.30 INI as String 269 ∗ 10.1.32 Callback(ArgumentCount as Integer) as Variant 270 ∗ 10.1.33 LogMessage(message as string) 270 ∗ 10.1.34 Write(data as string) 270 25 • 11 Regular Expressions 271

– 11.1.1 class RegExMBS 271 ∗ 11.1.7 Compile(pattern as string) as boolean 273 ∗ 11.1.8 CompileMemory(pattern as memoryblock, ByteOffset as Integer) as boolean 274 ∗ 11.1.9 ConfigBSR as boolean 274 ∗ 11.1.10 ConfigLinkSize as Integer 274 ∗ 11.1.11 ConfigMallocThreshold as Integer 275 ∗ 11.1.12 ConfigMatchLimit as Integer 275 ∗ 11.1.13 ConfigMatchLimitRecursion as Integer 275 ∗ 11.1.14 ConfigNewLine as Integer 275 ∗ 11.1.15 ConfigStackRecurse as boolean 276 ∗ 11.1.16 ConfigUnicodeProperties as boolean 276 ∗ 11.1.17 ConfigUTF8 as boolean 276 ∗ 11.1.18 Constructor(VecSize as Integer = 0) 276 ∗ 11.1.19 Escape(text as string) as string 276 ∗ 11.1.20 Execute(start as Integer = 0) as Integer 277 ∗ 11.1.21 Execute(text as string, start as Integer = 0) as Integer 277 ∗ 11.1.22 ExecuteMemory(text as memoryblock, ByteOffset as Integer = 0, ByteLength as Integer = 0) as Integer 278 ∗ 11.1.23 ExecuteMemoryMT(text as memoryblock, ByteOffset as Integer = 0, ByteLength as Integer = 0) as Integer 278 ∗ 11.1.24 ExecuteMT(start as Integer = 0) as Integer 279 ∗ 11.1.25 ExecuteMT(text as string, start as Integer = 0) as Integer 279 ∗ 11.1.26 InfoNameEntry(Index as Integer) as string 279 ∗ 11.1.27 IsASCIIText(text as string) as boolean 279 ∗ 11.1.28 Match(text as string) as boolean 280 ∗ 11.1.29 Match(text() as string, inverse as boolean = false) as string() 281 ∗ 11.1.30 Match(text() as Variant, inverse as boolean = false) as string() 281 ∗ 11.1.31 Offset(index as Integer) as Integer 282 ∗ 11.1.32 OffsetCharacters(index as Integer) as Integer 283 ∗ 11.1.33 Replace(NewText as string) as string 284 ∗ 11.1.34 ReplaceAll(Target as string, NewText as string = ””) as string 284 ∗ 11.1.35 ReplaceSelection(NewText as string) as string 285 ∗ 11.1.36 StringNumber(name as string) as Integer 285 ∗ 11.1.37 Study as boolean 285 ∗ 11.1.38 Substring(index as Integer) as string 286 ∗ 11.1.39 Substring(name as string) as string 286 ∗ 11.1.40 Unescape(text as string) as string 286 ∗ 11.1.41 Version as string 287 ∗ 11.1.43 CompileOptionAnchored as Boolean 287 ∗ 11.1.44 CompileOptionAutoCallOut as Boolean 287 26 CHAPTER 1. LIST OF TOPICS ∗ 11.1.45 CompileOptionBSRAnyCRLF as Boolean 287 ∗ 11.1.46 CompileOptionBSRUnicode as Boolean 287 ∗ 11.1.47 CompileOptionCaseLess as Boolean 288 ∗ 11.1.48 CompileOptionDollarEndOnly as Boolean 289 ∗ 11.1.49 CompileOptionDotAll as Boolean 289 ∗ 11.1.50 CompileOptionDuplicateNames as Boolean 290 ∗ 11.1.51 CompileOptionExtended as Boolean 290 ∗ 11.1.52 CompileOptionFirstLine as Boolean 290 ∗ 11.1.53 CompileOptionJavaScriptCompat as Boolean 290 ∗ 11.1.54 CompileOptionMultiline as Boolean 291 ∗ 11.1.55 CompileOptionNewLineAny as Boolean 291 ∗ 11.1.56 CompileOptionNewLineAnyCRLF as Boolean 292 ∗ 11.1.57 CompileOptionNewLineCR as Boolean 292 ∗ 11.1.58 CompileOptionNewLineCRLF as Boolean 292 ∗ 11.1.59 CompileOptionNewLineLF as Boolean 293 ∗ 11.1.60 CompileOptionNoAutoCapture as Boolean 293 ∗ 11.1.61 CompileOptionNoStartOptimize as Boolean 293 ∗ 11.1.62 CompileOptionNoUTF8Check as Boolean 293 ∗ 11.1.63 CompileOptions as Integer 294 ∗ 11.1.64 CompileOptionUngreedy as Boolean 294 ∗ 11.1.65 CompileOptionUnicodeCodePoints as Boolean 294 ∗ 11.1.66 CompileOptionUTF8 as Boolean 294 ∗ 11.1.67 Count as Integer 295 ∗ 11.1.68 ErrorMessage as String 295 ∗ 11.1.69 ErrorOffset as Integer 296 ∗ 11.1.70 ExecuteOptionAnchored as Boolean 296 ∗ 11.1.71 ExecuteOptionBSRAnyCRLF as Boolean 296 ∗ 11.1.72 ExecuteOptionBSRUnicode as Boolean 296 ∗ 11.1.73 ExecuteOptionNewLineAny as Boolean 297 ∗ 11.1.74 ExecuteOptionNewLineAnyCRLF as Boolean 298 ∗ 11.1.75 ExecuteOptionNewLineCR as Boolean 298 ∗ 11.1.76 ExecuteOptionNewLineCRLF as Boolean 298 ∗ 11.1.77 ExecuteOptionNewLineLF as Boolean 298 ∗ 11.1.78 ExecuteOptionNoStartOptimize as Boolean 298 ∗ 11.1.79 ExecuteOptionNotBOL as Boolean 299 ∗ 11.1.80 ExecuteOptionNotEmpty as Boolean 300 ∗ 11.1.81 ExecuteOptionNotEmptyAtStart as Boolean 300 ∗ 11.1.82 ExecuteOptionNotEOL as Boolean 300 ∗ 11.1.83 ExecuteOptionNoUTF8Check as Boolean 300 ∗ 11.1.84 ExecuteOptionPartial as Boolean 301 ∗ 11.1.85 ExecuteOptionPartialHard as Boolean 301 ∗ 11.1.86 ExecuteOptions as Integer 301 27 ∗ 11.1.87 Handle as Integer 301 ∗ 11.1.88 InfoCaptureCount as Integer 302 ∗ 11.1.89 InfoNameCount as Integer 302 ∗ 11.1.90 InfoSize as Integer 302 ∗ 11.1.91 InfoStudySize as Integer 302 ∗ 11.1.92 Lasterror as Integer 303 ∗ 11.1.93 MatchLimit as Integer 303 ∗ 11.1.94 MatchLimitRecursion as Integer 303 ∗ 11.1.95 Text as String 304 ∗ 11.1.96 TextMemory as Memoryblock 304 ∗ 11.1.97 VectorSize as Integer 304 ∗ 11.1.99 ErrorBadCount = -15 304 ∗ 11.1.100 ErrorBadMagic = -4 304 ∗ 11.1.101 ErrorBadNewLine = -23 305 ∗ 11.1.102 ErrorBadOffset = -24 305 ∗ 11.1.103 ErrorBadOption = -3 305 ∗ 11.1.104 ErrorBadPartial = -13 305 ∗ 11.1.105 ErrorBadUTF8 = -10 305 ∗ 11.1.106 ErrorBadUTF8Offset = -11 306 ∗ 11.1.107 ErrorCallOut = -9 306 ∗ 11.1.108 ErrorDFARecurse = -20 306 ∗ 11.1.109 ErrorDFAUCond = -17 310 ∗ 11.1.110 ErrorDFAUItem = -16 310 ∗ 11.1.111 ErrorDFAUMLimit = -18 310 ∗ 11.1.112 ErrorDFAWSSize = -19 310 ∗ 11.1.113 ErrorInternal = -14 310 ∗ 11.1.114 ErrorMatchLimit = -8 310 ∗ 11.1.115 ErrorNoMatch = -1 311 ∗ 11.1.116 ErrorNoSubstring = -7 311 ∗ 11.1.117 ErrorNull = -2 311 ∗ 11.1.118 ErrorNullWSLimit = -22 311 ∗ 11.1.119 ErrorPartial = -12 311 ∗ 11.1.120 ErrorPlugin = -99 311 ∗ 11.1.121 ErrorRecursionLimit = -21 312 ∗ 11.1.122 ErrorShortUTF8 = -25 312 ∗ 11.1.123 ErrorUnknownNode = -6 312 ∗ 11.1.124 ErrorUnknownOpcode = -5 312 28 CHAPTER 1. LIST OF TOPICS • 12 RFC 313

– 12.1.1 class RFCClassDescriptionMBS 313 ∗ 12.1.3 Constructor 313 ∗ 12.1.4 Destructor 313 ∗ 12.1.6 AttributesCount as Integer 314 ∗ 12.1.7 Connection as RFCConnectionMBS 314 ∗ 12.1.8 Handle as Integer 314 ∗ 12.1.9 ImplementedInterfacesCount as Integer 314 ∗ 12.1.10 Name as String 314 ∗ 12.1.11 Parent as Variant 315 ∗ 12.1.12 ParentClassesCount as Integer 315 – 12.2.1 class RFCConnectionAttributesMBS 316 ∗ 12.2.3 Constructor 316 ∗ 12.2.5 client as String 316 ∗ 12.2.6 codepage as String 316 ∗ 12.2.7 Connection as RFCConnectionMBS 316 ∗ 12.2.8 cpicConvId as String 317 ∗ 12.2.9 dest as String 317 ∗ 12.2.10 host as String 317 ∗ 12.2.11 isoLanguage as String 317 ∗ 12.2.12 kernelRel as String 317 ∗ 12.2.13 language as String 318 ∗ 12.2.14 Parent as Variant 318 ∗ 12.2.15 partnerBytesPerChar as String 318 ∗ 12.2.16 partnerCodepage as String 318 ∗ 12.2.17 partnerHost as String 318 ∗ 12.2.18 partnerIP as String 319 ∗ 12.2.19 partnerIPv6 as String 319 ∗ 12.2.20 partnerRel as String 319 ∗ 12.2.21 partnerSystemCodepage as String 319 ∗ 12.2.22 partnerType as String 319 ∗ 12.2.23 progName as String 320 ∗ 12.2.24 rel as String 320 ∗ 12.2.25 rfcRole as String 320 ∗ 12.2.26 sysId as String 320 ∗ 12.2.27 sysNumber as String 320 ∗ 12.2.28 trace as String 321 ∗ 12.2.29 type as String 321 ∗ 12.2.30 user as String 321 – 12.3.1 class RFCConnectionMBS 322 29 ∗ 12.3.5 CachedClassDescription(repositoryID as String, Name as String) as RFCClassDescrip- tionMBS 322 ∗ 12.3.6 CachedFunctionDescription(repositoryID as String, Name as String) as RFCFunction- DescriptionMBS 323 ∗ 12.3.7 CachedTypeDescription(repositoryID as String, Name as String) as RFCTypeDescrip- tionMBS 323 ∗ 12.3.8 Cancel 324 ∗ 12.3.9 ClassDescription(Name as String) as RFCClassDescriptionMBS 324 ∗ 12.3.10 ClearRepository(repositoryID as String) 324 ∗ 12.3.11 Constructor(LoginParams as Dictionary) 324 ∗ 12.3.12 CreateFunction(Name as String) as RFCFunctionMBS 326 ∗ 12.3.13 CreateTransaction(TransactionID as String, QueueName as String) as RFCTransac- tionMBS 326 ∗ 12.3.14 Destructor 326 ∗ 12.3.15 FunctionDescription(Name as String) as RFCFunctionDescriptionMBS 326 ∗ 12.3.16 isConnected as Boolean 327 ∗ 12.3.17 Ping 327 ∗ 12.3.18 ResetServerContext 327 ∗ 12.3.19 TransactionID as String 327 ∗ 12.3.20 TypeDescription(Name as String) as RFCTypeDescriptionMBS 327 ∗ 12.3.22 ConnectionAttributes as RFCConnectionAttributesMBS 328 ∗ 12.3.23 Handle as Integer 328 – 12.4.1 class RFCContainerMBS 329 ∗ 12.4.3 Constructor 329 ∗ 12.4.4 DescribeType as RFCTypeDescriptionMBS 329 ∗ 12.4.5 Destructor 329 ∗ 12.4.6 StringLength(Index as Integer) as Integer 329 ∗ 12.4.7 StringLength(Name as String) as Integer 330 ∗ 12.4.8 Value(Index as Integer) as Variant 330 ∗ 12.4.9 Value(Name as String) as Variant 330 ∗ 12.4.11 Connection as RFCConnectionMBS 331 ∗ 12.4.12 Handle as Integer 331 ∗ 12.4.13 Parent as Variant 331 ∗ 12.4.14 Values as Dictionary 331 ∗ 12.4.15 BytesValue(Index as Integer) as Memoryblock 331 ∗ 12.4.16 BytesValue(Name as String) as Memoryblock 332 ∗ 12.4.17 CharsValue(Index as Integer, Size as Integer) as String 332 ∗ 12.4.18 CharsValue(Name as String, Size as Integer) as String 332 ∗ 12.4.19 DateValue(Index as Integer) as String 333 ∗ 12.4.20 DateValue(Name as String) as String 333 ∗ 12.4.21 FloatValue(Index as Integer) as Double 333 ∗ 12.4.22 FloatValue(Name as String) as Double 333 30 CHAPTER 1. LIST OF TOPICS ∗ 12.4.23 Int16Value(Index as Integer) as Int16 334 ∗ 12.4.24 Int16Value(Name as String) as Int16 334 ∗ 12.4.25 Int32Value(Index as Integer) as Int32 334 ∗ 12.4.26 Int32Value(Name as String) as Int32 334 ∗ 12.4.27 Int64Value(Index as Integer) as Int64 335 ∗ 12.4.28 Int64Value(Name as String) as Int64 335 ∗ 12.4.29 NumberValue(Index as Integer, Size as Integer) as String 335 ∗ 12.4.30 NumberValue(Name as String, Size as Integer) as String 335 ∗ 12.4.31 StringValue(Index as Integer) as String 336 ∗ 12.4.32 StringValue(Name as String) as String 336 ∗ 12.4.33 StructureValue(Index as Integer) as RFCStructureMBS 336 ∗ 12.4.34 StructureValue(Name as String) as RFCStructureMBS 337 ∗ 12.4.35 TableValue(Index as Integer) as RFCTableMBS 337 ∗ 12.4.36 TableValue(Name as String) as RFCTableMBS 337 ∗ 12.4.37 TimeValue(Index as Integer) as String 337 ∗ 12.4.38 TimeValue(Name as String) as String 337 ∗ 12.4.39 UInt8Value(Index as Integer) as UInt8 338 ∗ 12.4.40 UInt8Value(Name as String) as UInt8 338 – 12.6.1 class RFCExceptionDescriptionMBS 340 ∗ 12.6.3 Constructor 340 ∗ 12.6.5 Key as String 340 ∗ 12.6.6 Message as String 340 – 12.7.1 class RFCFieldDescriptionMBS 341 ∗ 12.7.3 Constructor 341 ∗ 12.7.5 Connection as RFCConnectionMBS 341 ∗ 12.7.6 decimals as Integer 341 ∗ 12.7.7 Name as String 341 ∗ 12.7.8 nucLength as Integer 342 ∗ 12.7.9 nucOffset as Integer 342 ∗ 12.7.10 Parent as Variant 342 ∗ 12.7.11 Type as Integer 342 ∗ 12.7.12 TypeDescription as RFCTypeDescriptionMBS 342 ∗ 12.7.13 TypeString as String 343 ∗ 12.7.14 ucLength as Integer 343 ∗ 12.7.15 ucOffset as Integer 343 – 12.8.1 class RFCFunctionDescriptionMBS 344 ∗ 12.8.3 Constructor 344 ∗ 12.8.4 CreateFunction as RFCFunctionMBS 344 ∗ 12.8.5 Destructor 344 ∗ 12.8.6 ExceptionDescription(Index as Integer) as RFCExceptionDescriptionMBS 344 ∗ 12.8.7 ExceptionDescription(Name as String) as RFCExceptionDescriptionMBS 345 31 ∗ 12.8.8 ExceptionDescriptions as RFCExceptionDescriptionMBS() 345 ∗ 12.8.9 ParameterDescription(Index as Integer) as RFCParameterDescriptionMBS 345 ∗ 12.8.10 ParameterDescription(Name as String) as RFCParameterDescriptionMBS 345 ∗ 12.8.11 ParameterDescriptions as RFCParameterDescriptionMBS() 345 ∗ 12.8.13 Connection as RFCConnectionMBS 346 ∗ 12.8.14 ExceptionCount as Integer 346 ∗ 12.8.15 Handle as Integer 346 ∗ 12.8.16 Name as String 346 ∗ 12.8.17 ParameterCount as Integer 346 ∗ 12.8.18 Parent as Variant 347 – 12.9.1 class RFCFunctionMBS 348 ∗ 12.9.3 Constructor(typeDescription as RFCFunctionDescriptionMBS) 348 ∗ 12.9.4 DescribeFunction as RFCFunctionDescriptionMBS 348 ∗ 12.9.5 Destructor 348 ∗ 12.9.6 Invoke 349 ∗ 12.9.8 ParameterActive(Name as String) as Boolean 349 – 12.10.1 module RFCModuleMBS 350 ∗ 12.10.5 LoadLibrary(file as folderitem) as boolean 350 ∗ 12.10.6 LoadLibrary(path as string) as boolean 351 ∗ 12.10.7 LocalTransactionID as String 351 ∗ 12.10.8 ReloadIniFile 352 ∗ 12.10.9 SetCurrentWorkingDirectory(path as folderitem) as boolean 352 ∗ 12.10.10 SetCurrentWorkingDirectory(path as String) as boolean 352 ∗ 12.10.12 IniPath as String 352 ∗ 12.10.13 LibraryLoadError as Integer 353 ∗ 12.10.14 LibraryLoadErrorMessage as String 353 ∗ 12.10.15 Loaded as Boolean 353 ∗ 12.10.16 MajorVersion as Integer 353 ∗ 12.10.17 MinorVersion as Integer 354 ∗ 12.10.18 PatchLevel as Integer 354 ∗ 12.10.19 TraceDir as String 354 ∗ 12.10.20 TraceEncoding as String 355 ∗ 12.10.21 TraceType as String 355 ∗ 12.10.22 Version as String 355 ∗ 12.10.24 kErrorAbapClassException = 27 356 ∗ 12.10.25 kErrorAbapException = 5 356 ∗ 12.10.26 kErrorAbapMessage = 4 356 ∗ 12.10.27 kErrorAbapRuntimeFailure = 3 356 ∗ 12.10.28 kErrorAuthorizationFailure = 29 356 ∗ 12.10.29 kErrorBufferTooSmall = 23 357 ∗ 12.10.30 kErrorCanceled = 7 357 32 CHAPTER 1. LIST OF TOPICS ∗ 12.10.31 kErrorClosed = 6 357 ∗ 12.10.32 kErrorCodepageConversionFailure = 21 357 ∗ 12.10.33 kErrorCommunicationFailure = 1 357 ∗ 12.10.34 kErrorConversionFailure = 22 357 ∗ 12.10.35 kErrorExecuted = 16 358 ∗ 12.10.36 kErrorExternalFailure = 15 358 ∗ 12.10.37 kErrorIllegalState = 19 358 ∗ 12.10.38 kErrorInvalidHandle = 13 358 ∗ 12.10.39 kErrorInvalidParameter = 20 358 ∗ 12.10.40 kErrorInvalidProtocol = 11 359 ∗ 12.10.41 kErrorLogonFailure = 2 359 ∗ 12.10.42 kErrorMemoryInsufficient =9 359 ∗ 12.10.43 kErrorNotFound = 17 359 ∗ 12.10.44 kErrorNotSupported = 18 359 ∗ 12.10.45 kErrorOk = 0 360 ∗ 12.10.46 kErrorRetry = 14 360 ∗ 12.10.47 kErrorSerializationFailure = 12 360 ∗ 12.10.48 kErrorStartSapguiFailure = 26 360 ∗ 12.10.49 kErrorTableMoveBof = 24 360 ∗ 12.10.50 kErrorTableMoveEof = 25 360 ∗ 12.10.51 kErrorTimeout = 8 361 ∗ 12.10.52 kErrorUnknownError = 28 361 ∗ 12.10.53 kErrorVersionMismatch = 10 361 – 12.11.1 class RFCParameterDescriptionMBS 362 ∗ 12.11.3 Constructor 362 ∗ 12.11.5 Connection as RFCConnectionMBS 362 ∗ 12.11.6 decimals as Integer 362 ∗ 12.11.7 defaultValue as String 362 ∗ 12.11.8 Direction as Integer 363 ∗ 12.11.9 isOptional as Boolean 363 ∗ 12.11.10 Name as String 363 ∗ 12.11.11 nucLength as Integer 363 ∗ 12.11.12 parameterText as String 363 ∗ 12.11.13 Parent as Variant 364 ∗ 12.11.14 Type as Integer 364 ∗ 12.11.15 TypeDescription as RFCTypeDescriptionMBS 364 ∗ 12.11.16 TypeString as String 364 ∗ 12.11.17 ucLength as Integer 364 ∗ 12.11.19 kDirectionChanging = 3 365 ∗ 12.11.20 kDirectionExport = 2 365 ∗ 12.11.21 kDirectionImport = 1 365 33 ∗ 12.11.22 kDirectionTable = 7 365 – 12.12.1 class RFCStructureMBS 366 ∗ 12.12.3 Clone as RFCStructureMBS 366 ∗ 12.12.4 Constructor(typeDescription as RFCTypeDescriptionMBS) 366 ∗ 12.12.5 Destructor 366 – 12.13.1 class RFCTableMBS 367 ∗ 12.13.3 AppendNewRow as RFCStructureMBS 367 ∗ 12.13.4 AppendNewRows(numRows as Integer) 367 ∗ 12.13.5 AppendRow(row as RFCStructureMBS) 367 ∗ 12.13.6 Clone as RFCTableMBS 367 ∗ 12.13.7 Constructor(TypeDescription as RFCTypeDescriptionMBS) 367 ∗ 12.13.8 CurrentRow as RFCStructureMBS 368 ∗ 12.13.9 DeleteAllRows 368 ∗ 12.13.10 DeleteCurrentRow 368 ∗ 12.13.11 Destructor 368 ∗ 12.13.12 InsertNewRow as RFCStructureMBS 368 ∗ 12.13.13 InsertRow(row as RFCStructureMBS) 368 ∗ 12.13.14 MoveTo(row as Integer) 369 ∗ 12.13.15 MoveToFirstRow 369 ∗ 12.13.16 MoveToLastRow 369 ∗ 12.13.17 MoveToNextRow 369 ∗ 12.13.18 MoveToPreviousRow 369 ∗ 12.13.19 ReserveCapacity(numRows as Integer) 369 ∗ 12.13.21 RowCount as Integer 370 ∗ 12.13.22 RowType as RFCTypeDescriptionMBS 370 – 12.14.1 class RFCTransactionMBS 371 ∗ 12.14.3 ConfirmTransaction 371 ∗ 12.14.4 Constructor(connection as RFCConnectionMBS, TransactionID as String, Queue- Name as String) 371 ∗ 12.14.5 Destructor 371 ∗ 12.14.6 InvokeInTransaction(funcHandle as RFCFunctionMBS) 372 ∗ 12.14.7 SubmitTransaction 372 ∗ 12.14.9 Handle as Integer 372 ∗ 12.14.10 TransactionID as String 372 – 12.15.1 class RFCTypeDescriptionMBS 373 ∗ 12.15.3 Constructor 373 ∗ 12.15.4 CreateStructure as RFCStructureMBS 373 ∗ 12.15.5 CreateTable as RFCTableMBS 373 ∗ 12.15.6 FieldDescription(Index as Integer) as RFCFieldDescriptionMBS 373 ∗ 12.15.7 FieldDescription(Name as String) as RFCFieldDescriptionMBS 374 ∗ 12.15.8 FieldDescriptions as RFCFieldDescriptionMBS() 374 34 CHAPTER 1. LIST OF TOPICS ∗ 12.15.10 Connection as RFCConnectionMBS 374 ∗ 12.15.11 FieldCount as Integer 374 ∗ 12.15.12 Handle as Integer 374 ∗ 12.15.13 Name as String 375 ∗ 12.15.14 Parent as Variant 375 35 • 14 SmartCard 401

– 14.1.1 class SmartCardContextMBS 401 ∗ 14.1.5 Cancel 401 ∗ 14.1.6 Connect(reader as string, ShareMode as UInt32, PreferredProtocols as UInt32) as SmartCardMBS 402 ∗ 14.1.7 Constructor 403 ∗ 14.1.8 IsValid as boolean 403 ∗ 14.1.9 ReaderGroups as string() 403 ∗ 14.1.10 Readers as string() 403 ∗ 14.1.11 Readers(ReaderGroups() as string) as string() 404 ∗ 14.1.13 Available as Boolean 404 ∗ 14.1.14 Handle as Integer 404 ∗ 14.1.15 Lasterror as Integer 404 ∗ 14.1.17 kErrorBadSeek = & H80100029 405 ∗ 14.1.18 kErrorCancelled = & H80100002 405 ∗ 14.1.19 kErrorCancelledByUser = & H8010006E 405 ∗ 14.1.20 kErrorCantDispose = & H8010000E 405 ∗ 14.1.21 kErrorCardNotAuthenticated = & H8010006F 405 ∗ 14.1.22 kErrorCardUnsupported = & H8010001C 406 ∗ 14.1.23 kErrorCertificateUnavailable = & H8010002D 406 ∗ 14.1.24 kErrorChvBlocked = & H8010006C 406 ∗ 14.1.25 kErrorCommDataLost = & H8010002F 406 ∗ 14.1.26 kErrorCommError = & H80100013 406 ∗ 14.1.27 kErrorDirNotFound = & H80100023 406 ∗ 14.1.28 kErrorDuplicateReader = & H8010001B 407 ∗ 14.1.29 kErrorEof = & H8010006D 407 ∗ 14.1.30 kErrorFileNotFound = & H80100024 407 ∗ 14.1.31 kErrorIccCreateorder = & H80100021 407 ∗ 14.1.32 kErrorIccInstallation = & H80100020 407 ∗ 14.1.33 kErrorInsufficientBuffer = & H80100008 408 ∗ 14.1.34 kErrorInternalError = & H80100001 408 ∗ 14.1.35 kErrorInvalidAtr = & H80100015 408 ∗ 14.1.36 kErrorInvalidChv = & H8010002A 408 ∗ 14.1.37 kErrorInvalidHandle = & H80100003 408 ∗ 14.1.38 kErrorInvalidParameter = & H80100004 408 ∗ 14.1.39 kErrorInvalidTarget = & H80100005 409 ∗ 14.1.40 kErrorInvalidValue = & H80100011 409 ∗ 14.1.41 kErrorNoAccess = & H80100027 409 ∗ 14.1.42 kErrorNoDir = & H80100025 409 ∗ 14.1.43 kErrorNoFile = & H80100026 409 ∗ 14.1.44 kErrorNoKeyContainer = & H80100030 410 36 CHAPTER 1. LIST OF TOPICS ∗ 14.1.45 kErrorNoMemory = & H80100006 410 ∗ 14.1.46 kErrorNoReadersAvailable = & H8010002E 410 ∗ 14.1.47 kErrorNoService = & H8010001D 410 ∗ 14.1.48 kErrorNoSmartcard = & H8010000C 410 ∗ 14.1.49 kErrorNoSuchCertificate = & H8010002C 410 ∗ 14.1.50 kErrorNotReady = & H80100010 411 ∗ 14.1.51 kErrorNotTransacted = & H80100016 411 ∗ 14.1.52 kErrorPciTooSmall = & H80100019 411 ∗ 14.1.53 kErrorProtoMismatch = & H8010000F 411 ∗ 14.1.54 kErrorReaderUnavailable = & H80100017 411 ∗ 14.1.55 kErrorReaderUnsupported = & H8010001A 412 ∗ 14.1.56 kErrorRemovedCard = & H80100069 412 ∗ 14.1.57 kErrorResetCard = & H80100068 412 ∗ 14.1.58 kErrorSecurityViolation = & H8010006A 412 ∗ 14.1.59 kErrorServerTooBusy = & H80100031 412 ∗ 14.1.60 kErrorServiceStopped = & H8010001E 412 ∗ 14.1.61 kErrorSharingViolation = & H8010000B 413 ∗ 14.1.62 kErrorShutdown = & H80100018 413 ∗ 14.1.63 kErrorSuccess = 0 413 ∗ 14.1.64 kErrorSystemCancelled = & H80100012 413 ∗ 14.1.65 kErrorTimeout = & H8010000A 413 ∗ 14.1.66 kErrorUnexpected = & H8010001F 414 ∗ 14.1.67 kErrorUnknownCard = & H8010000D 414 ∗ 14.1.68 kErrorUnknownError = & H80100014 414 ∗ 14.1.69 kErrorUnknownReader = & H80100009 414 ∗ 14.1.70 kErrorUnknownResMng = & H8010002B 414 ∗ 14.1.71 kErrorUnpoweredCard = & H80100067 414 ∗ 14.1.72 kErrorUnresponsiveCard = & H80100066 415 ∗ 14.1.73 kErrorUnsupportedCard = & H80100065 415 ∗ 14.1.74 kErrorUnsupportedFeature = & H80100022 415 ∗ 14.1.75 kErrorWaitedTooLong = & H80100007 415 ∗ 14.1.76 kErrorWriteTooMany = & H80100028 415 ∗ 14.1.77 kErrorWrongChv = & H8010006B 416 – 14.2.1 class SmartCardMBS 417 ∗ 14.2.5 BeginTransaction 417 ∗ 14.2.6 CancelTransaction 418 ∗ 14.2.7 Constructor 418 ∗ 14.2.8 Control(ControlCode as Integer, input as ptr, inputLength as UInt32, output as ptr, byref outputLength as UInt32) 418 ∗ 14.2.9 Disconnect(Disposition as Integer = 0) 419 ∗ 14.2.10 EndTransaction(Disposition as Integer = 0) 419 37 ∗ 14.2.11 GetAttrib(AttrId as UInt32) as Memoryblock 420 ∗ 14.2.12 ReadFile(FileID as MemoryBlock) as MemoryBlock 420 ∗ 14.2.13 Reconnect(ShareMode as UInt32, PreferredProtocols as UInt32, Initialization as UInt32) 420 ∗ 14.2.14 SetAttrib(AttrId as UInt32, mem as Memoryblock) 421 ∗ 14.2.15 SplitValues(Data as MemoryBlock) as Dictionary 421 ∗ 14.2.16 Status(byref Reader as string, byref State as Integer, byref Protocol as Integer, byref CardID as string) 421 ∗ 14.2.17 Status(byref State as Integer, byref Protocol as Integer, byref CardID as string) 422 ∗ 14.2.18 Transmit(ioSendPci as Ptr, SendBuffer as ptr, SendLength as UInt32, ioRecvPci as ptr, RecvBuffer as Ptr, byref RecvLength as UInt32) 422 ∗ 14.2.20 ActiveProtocol as Integer 424 ∗ 14.2.21 Handle as Integer 424 ∗ 14.2.22 Lasterror as Integer 425 ∗ 14.2.24 kAttributeAtrString = 590595 425 ∗ 14.2.25 kAttributeChannelId = 131344 425 ∗ 14.2.26 kAttributeCharacteristics = 393552 425 ∗ 14.2.27 kAttributeCurrentBwt = 524809 426 ∗ 14.2.28 kAttributeCurrentClk = 524802 426 ∗ 14.2.29 kAttributeCurrentCwt = 524810 426 ∗ 14.2.30 kAttributeCurrentD = 524804 426 ∗ 14.2.31 kAttributeCurrentEbcEncoding = 524811 426 ∗ 14.2.32 kAttributeCurrentF = 524803 427 ∗ 14.2.33 kAttributeCurrentIfsc = 524807 427 ∗ 14.2.34 kAttributeCurrentIfsd = 524808 427 ∗ 14.2.35 kAttributeCurrentIoState = 590594 427 ∗ 14.2.36 kAttributeCurrentN = 524805 427 ∗ 14.2.37 kAttributeCurrentProtocolType = 524801 428 ∗ 14.2.38 kAttributeCurrentW = 524806 428 ∗ 14.2.39 kAttributeDefaultClk = 196897 428 ∗ 14.2.40 kAttributeDefaultDataRate = 196899 428 ∗ 14.2.41 kAttributeDeviceFriendlyNameA = 2147418115 428 ∗ 14.2.42 kAttributeDeviceFriendlyNameW = 2147418117 428 ∗ 14.2.43 kAttributeDeviceInUse = 2147418114 429 ∗ 14.2.44 kAttributeDeviceSystemNameA = 2147418116 429 ∗ 14.2.45 kAttributeDeviceSystemNameW = 2147418118 429 ∗ 14.2.46 kAttributeDeviceUnit = 2147418113 429 ∗ 14.2.47 kAttributeEscAuthrequest = 499717 429 ∗ 14.2.48 kAttributeEscCancel = 499715 430 ∗ 14.2.49 kAttributeEscReset = 499712 430 ∗ 14.2.50 kAttributeExtendedBwt = 524812 430 ∗ 14.2.51 kAttributeIccInterfaceStatus = 590593 430 38 CHAPTER 1. LIST OF TOPICS ∗ 14.2.52 kAttributeIccPresence = 590592 430 ∗ 14.2.53 kAttributeIccTypePerAtr = 590596 431 ∗ 14.2.54 kAttributeMaxClk = 196898 431 ∗ 14.2.55 kAttributeMaxDataRate = 196900 431 ∗ 14.2.56 kAttributeMaxIfsd = 196901 431 ∗ 14.2.57 kAttributeMaxinput = 499719 431 ∗ 14.2.58 kAttributePowerMgmtSupport = 262449 432 ∗ 14.2.59 kAttributeProtocolTypes = 196896 432 ∗ 14.2.60 kAttributeSupressT1IfsRequest = 2147418119 432 ∗ 14.2.61 kAttributeUserAuthInputDevice = 328002 432 ∗ 14.2.62 kAttributeUserToCardAuthDevice = 328000 432 ∗ 14.2.63 kAttributeVendorIfdSerialNo = 65795 433 ∗ 14.2.64 kAttributeVendorIfdType = 65793 433 ∗ 14.2.65 kAttributeVendorIfdVersion = 65794 433 ∗ 14.2.66 kAttributeVendorName = 65792 433 ∗ 14.2.67 kCardStateAbsent = 2 433 ∗ 14.2.68 kCardStateNegotiable = 32 433 ∗ 14.2.69 kCardStatePowered = 16 434 ∗ 14.2.70 kCardStatePresent = 4 434 ∗ 14.2.71 kCardStateSpecific = 64 434 ∗ 14.2.72 kCardStateSwallowed = 8 434 ∗ 14.2.73 kCardStateUnknown = 1 434 ∗ 14.2.74 kEjectCard = 3 435 ∗ 14.2.75 kLeaveCard = 0 435 ∗ 14.2.76 kProtocolAny = 3 435 ∗ 14.2.77 kProtocolRAW = 4 435 ∗ 14.2.78 kProtocolT0 = 1 435 ∗ 14.2.79 kProtocolT1 = 2 435 ∗ 14.2.80 kProtocolT15 = 8 436 ∗ 14.2.81 kProtocolUndefined = 0 436 ∗ 14.2.82 kProtocolUnset = 0 436 ∗ 14.2.83 kResetCard = 1 436 ∗ 14.2.84 kShareDirect = 3 436 ∗ 14.2.85 kShareExclusive = 1 437 ∗ 14.2.86 kShareShared = 2 437 ∗ 14.2.87 kUnpowerCard = 2 437 39 • 4 Audio 77

– 4.1.1 class SoundFileInfoMBS 77 ∗ 4.1.3 Channels as Integer 77 ∗ 4.1.4 Format as Integer 77 ∗ 4.1.5 FormatEndianName as String 78 ∗ 4.1.6 FormatName as String 78 ∗ 4.1.7 FormatSubName as String 78 ∗ 4.1.8 Frames as Int64 78 ∗ 4.1.9 IsValid as Boolean 78 ∗ 4.1.10 SampleRate as Integer 79 ∗ 4.1.11 Sections as Integer 79 ∗ 4.1.12 Seekable as Boolean 79 ∗ 4.1.14 kFormatAIFF = & h020000 79 ∗ 4.1.15 kFormatALAC16 = & h0070 79 ∗ 4.1.16 kFormatALAC20 = & h0071 80 ∗ 4.1.17 kFormatALAC24 = & h0072 80 ∗ 4.1.18 kFormatALAC32 = & h0073 80 ∗ 4.1.19 kFormatALAW = & h0011 80 ∗ 4.1.20 kFormatAU = & h030000 80 ∗ 4.1.21 kFormatAVR = & h120000 80 ∗ 4.1.22 kFormatCAF = & h180000 81 ∗ 4.1.23 kFormatDouble = & h0007 81 ∗ 4.1.24 kFormatDPCM_16 = & h0051 81 ∗ 4.1.25 kFormatDPCM_8 = & h0050 81 ∗ 4.1.26 kFormatDWVW_12 = & h0040 81 ∗ 4.1.27 kFormatDWVW_16 = & h0041 82 ∗ 4.1.28 kFormatDWVW_24 = & h0042 82 ∗ 4.1.29 kFormatDWVW_N = & h0043 82 ∗ 4.1.30 kFormatEndianBig = & h20000000 82 ∗ 4.1.31 kFormatEndianCPU = & h30000000 82 ∗ 4.1.32 kFormatEndianFile = & h00000000 82 ∗ 4.1.33 kFormatEndianLittle = & h10000000 83 ∗ 4.1.34 kFormatEndianMask = & h30000000 83 ∗ 4.1.35 kFormatFLAC = & h170000 83 ∗ 4.1.36 kFormatFloat = & h0006 83 ∗ 4.1.37 kFormatG721_32 = & h0030 83 ∗ 4.1.38 kFormatG723_24 = & h0031 84 ∗ 4.1.39 kFormatG723_40 = & h0032 84 ∗ 4.1.40 kFormatGSM610 = & h0020 84 ∗ 4.1.41 kFormatHTK = & h100000 84 ∗ 4.1.42 kFormatIMA_ADPCM = & h0012 84 40 CHAPTER 1. LIST OF TOPICS ∗ 4.1.43 kFormatIRCAM = & h0A0000 84 ∗ 4.1.44 kFormatMAT4 = & h0C0000 85 ∗ 4.1.45 kFormatMAT5 = & h0D0000 85 ∗ 4.1.46 kFormatMPC2K = & h210000 85 ∗ 4.1.47 kFormatMS_ADPCM = & h0013 85 ∗ 4.1.48 kFormatNIST = & h070000 85 ∗ 4.1.49 kFormatOGG = & h200000 86 ∗ 4.1.50 kFormatPAF = & h050000 86 ∗ 4.1.51 kFormatPCM16 = & h0002 86 ∗ 4.1.52 kFormatPCM24 = & h0003 86 ∗ 4.1.53 kFormatPCM32 = & h0004 86 ∗ 4.1.54 kFormatPCMS8 = & h0001 86 ∗ 4.1.55 kFormatPCMU8 = & h0005 87 ∗ 4.1.56 kFormatPVF = & h0E0000 87 ∗ 4.1.57 kFormatRAW = & h040000 87 ∗ 4.1.58 kFormatRF64 = & h220000 87 ∗ 4.1.59 kFormatSD2 = & h160000 87 ∗ 4.1.60 kFormatSDS = & h110000 88 ∗ 4.1.61 kFormatSubMask = & h0000FFFF 88 ∗ 4.1.62 kFormatSVX = & h060000 88 ∗ 4.1.63 kFormatTypeMask = & h0FFF0000 88 ∗ 4.1.64 kFormatULAW = & h0010 88 ∗ 4.1.65 kFormatVOC = & h080000 88 ∗ 4.1.66 kFormatVORBIS = & h0060 89 ∗ 4.1.67 kFormatVOX_ADPCM = & h0021 89 ∗ 4.1.68 kFormatW64 = & h0B0000 89 ∗ 4.1.69 kFormatWAV = & h010000 89 ∗ 4.1.70 kFormatWAVEX = & h130000 89 ∗ 4.1.71 kFormatWVE = & h190000 90 ∗ 4.1.72 kFormatXI = & h0F0000 90 – 4.2.1 class SoundFileMBS 91 ∗ 4.2.7 Close 91 ∗ 4.2.8 Constructor 92 ∗ 4.2.9 Create(file as folderitem, Info as SoundFileInfoMBS) as SoundFileMBS 92 ∗ 4.2.10 ErrorMessage(errorNumber as integer) as string 92 ∗ 4.2.11 GetString(type as Integer) as string 92 ∗ 4.2.12 Loaded as Boolean 92 ∗ 4.2.13 LoadErrorMessage as String 92 ∗ 4.2.14 LoadLibrary(file as folderitem) as boolean 93 ∗ 4.2.15 Open(data as MemoryBlock) as SoundFileMBS 93 ∗ 4.2.16 Open(data as String) as SoundFileMBS 93 41 ∗ 4.2.17 Open(file as folderitem, readwrite As Boolean = False) as SoundFileMBS 93 ∗ 4.2.18 ReadDouble(p as ptr, items as Int64) as Int64 94 ∗ 4.2.19 ReadDoubleFrames(p as ptr, items as Int64) as Int64 94 ∗ 4.2.20 ReadInt(p as ptr, items as Int64) as Int64 94 ∗ 4.2.21 ReadIntFrames(p as ptr, items as Int64) as Int64 94 ∗ 4.2.22 ReadRaw(p as ptr, bytes as Int64) as Int64 95 ∗ 4.2.23 ReadShort(p as ptr, items as Int64) as Int64 95 ∗ 4.2.24 ReadShortFrames(p as ptr, items as Int64) as Int64 95 ∗ 4.2.25 ReadSingle(p as ptr, items as Int64) as Int64 95 ∗ 4.2.26 ReadSingleFrames(p as ptr, items as Int64) as Int64 95 ∗ 4.2.27 Seek(frames as Int64, whence as Integer) as Int64 96 ∗ 4.2.28 SetString(type as Integer, data as Memoryblock) as Integer 96 ∗ 4.2.29 SetString(type as Integer, text as string) as Integer 96 ∗ 4.2.30 Version as string 96 ∗ 4.2.31 WriteDouble(p as ptr, items as Int64) as Int64 97 ∗ 4.2.32 WriteDoubleFrames(p as ptr, items as Int64) as Int64 97 ∗ 4.2.33 WriteInt(p as ptr, items as Int64) as Int64 97 ∗ 4.2.34 WriteIntFrames(p as ptr, items as Int64) as Int64 97 ∗ 4.2.35 WriteRaw(p as ptr, bytes as Int64) as Int64 97 ∗ 4.2.36 WriteShort(p as ptr, items as Int64) as Int64 98 ∗ 4.2.37 WriteShortFrames(p as ptr, items as Int64) as Int64 98 ∗ 4.2.38 WriteSingle(p as ptr, items as Int64) as Int64 98 ∗ 4.2.39 WriteSingleFrames(p as ptr, items as Int64) as Int64 98 ∗ 4.2.40 WriteSync 99 ∗ 4.2.42 ErrorMessage as String 99 ∗ 4.2.43 ErrorNumber as Integer 99 ∗ 4.2.44 Handle as Integer 99 ∗ 4.2.45 Info as SoundFileInfoMBS 99 ∗ 4.2.47 kSeekCurrent = 1 100 ∗ 4.2.48 kSeekEnd = 2 100 ∗ 4.2.49 kSeekSet = 0 100 ∗ 4.2.50 kStringAlbum = 7 100 ∗ 4.2.51 kStringArtist = 4 100 ∗ 4.2.52 kStringComment = 5 101 ∗ 4.2.53 kStringCopyright = 2 101 ∗ 4.2.54 kStringDate = 6 101 ∗ 4.2.55 kStringGenre = 10 101 ∗ 4.2.56 kStringLicense = 8 101 ∗ 4.2.57 kStringSoftware = 3 101 ∗ 4.2.58 kStringTitle = 1 102 ∗ 4.2.59 kStringTrackNumber = 9 102 – 4.3.1 class TagLibAudioPropertiesMBS 103 42 CHAPTER 1. LIST OF TOPICS ∗ 4.3.3 Bitrate as Integer 103 ∗ 4.3.4 Channels as Integer 103 ∗ 4.3.5 Length as Integer 103 ∗ 4.3.6 SampleRate as Integer 103 – 4.4.1 class TagLibFileRefMBS 105 ∗ 4.4.5 Constructor(file as folderitem) 105 ∗ 4.4.6 Save as Boolean 106 ∗ 4.4.7 SetProperties(Dic as Dictionary) 106 ∗ 4.4.9 audioProperties as TagLibAudioPropertiesMBS 107 ∗ 4.4.10 Handle as Integer 107 ∗ 4.4.11 Properties as Dictionary 107 ∗ 4.4.12 tags as TagLibTagMBS 108 – 4.5.1 class TagLibTagMBS 109 ∗ 4.5.7 Constructor 110 ∗ 4.5.8 setTags(Values as Dictionary) as Dictionary 110 ∗ 4.5.10 Album as String 110 ∗ 4.5.11 Artist as String 110 ∗ 4.5.12 Comment as String 110 ∗ 4.5.13 Genre as String 111 ∗ 4.5.14 Handle as Integer 111 ∗ 4.5.15 isEmpty as Boolean 111 ∗ 4.5.16 Tags as Dictionary 111 ∗ 4.5.17 Title as String 111 ∗ 4.5.18 Track as Integer 112 ∗ 4.5.19 Year as Integer 112 43 • 15 String 439 – 15.1.1 class TextConverterMBS 439 ∗ 15.1.9 Canonicalize(name as String) as String 446 ∗ 15.1.10 Constructor 446 ∗ 15.1.11 Convert 446 ∗ 15.1.12 EncodingNames(Mode as Integer = 0) as String() 447 ∗ 15.1.13 LoadIconvLibrary(path as String, byref Error as String) as boolean 447 ∗ 15.1.15 ErrorCode as Integer 447 ∗ 15.1.16 ErrorMessage as String 448 ∗ 15.1.17 Ignore as Boolean 448 ∗ 15.1.18 Input as String 448 ∗ 15.1.19 InputData as MemoryBlock 448 ∗ 15.1.20 InputEncoding as String 448 ∗ 15.1.21 InputPosition as Integer 449 ∗ 15.1.22 LibVersion as Integer 449 ∗ 15.1.23 Output as String 449 ∗ 15.1.24 OutputEncoding as String 449 ∗ 15.1.25 OutputLength as Integer 450 ∗ 15.1.26 Translit as Boolean 450 44 CHAPTER 1. LIST OF TOPICS • 16 Tidy 451

– 16.1.1 class TidyAttributeMBS 451 ∗ 16.1.5 Document as TidyDocumentMBS 451 ∗ 16.1.6 ID as Integer 452 ∗ 16.1.7 IsABBR as Boolean 452 ∗ 16.1.8 IsALINK as Boolean 452 ∗ 16.1.9 IsALT as Boolean 452 ∗ 16.1.10 IsBGCOLOR as Boolean 452 ∗ 16.1.11 IsCHECKED as Boolean 453 ∗ 16.1.12 IsCOLSPAN as Boolean 453 ∗ 16.1.13 IsCONTENT as Boolean 453 ∗ 16.1.14 IsDATAFLD as Boolean 453 ∗ 16.1.15 IsEvent as Boolean 453 ∗ 16.1.16 IsFOR as Boolean 453 ∗ 16.1.17 IsHEIGHT as Boolean 454 ∗ 16.1.18 IsHREF as Boolean 454 ∗ 16.1.19 IsHTTP_EQUIV as Boolean 454 ∗ 16.1.20 IsID as Boolean 454 ∗ 16.1.21 IsISMAP as Boolean 454 ∗ 16.1.22 IsLANG as Boolean 455 ∗ 16.1.23 IsLANGUAGE as Boolean 455 ∗ 16.1.24 IsLINK as Boolean 455 ∗ 16.1.25 IsLONGDESC as Boolean 455 ∗ 16.1.26 IsNAME as Boolean 455 ∗ 16.1.27 IsOnBLUR as Boolean 455 ∗ 16.1.28 IsOnCLICK as Boolean 456 ∗ 16.1.29 IsOnFOCUS as Boolean 456 ∗ 16.1.30 IsOnKEYDOWN as Boolean 456 ∗ 16.1.31 IsOnKEYPRESS as Boolean 456 ∗ 16.1.32 IsOnKEYUP as Boolean 456 ∗ 16.1.33 IsOnMOUSEDOWN as Boolean 457 ∗ 16.1.34 IsOnMOUSEMOVE as Boolean 457 ∗ 16.1.35 IsOnMOUSEOUT as Boolean 457 ∗ 16.1.36 IsOnMOUSEOVER as Boolean 457 ∗ 16.1.37 IsOnMOUSEUP as Boolean 457 ∗ 16.1.38 IsProp as Boolean 457 ∗ 16.1.39 IsREL as Boolean 458 ∗ 16.1.40 IsROWSPAN as Boolean 458 ∗ 16.1.41 IsSELECTED as Boolean 458 ∗ 16.1.42 IsSRC as Boolean 458 ∗ 16.1.43 IsSTYLE as Boolean 458 45 ∗ 16.1.44 IsSUMMARY as Boolean 459 ∗ 16.1.45 IsTARGET as Boolean 459 ∗ 16.1.46 IsTEXT as Boolean 459 ∗ 16.1.47 IsTITLE as Boolean 459 ∗ 16.1.48 IsTYPE as Boolean 459 ∗ 16.1.49 IsUSEMAP as Boolean 459 ∗ 16.1.50 IsVALUE as Boolean 460 ∗ 16.1.51 IsVLINK as Boolean 460 ∗ 16.1.52 IsWIDTH as Boolean 460 ∗ 16.1.53 IsXMLNS as Boolean 460 ∗ 16.1.54 Name as string 460 ∗ 16.1.55 NextAttribute as TidyAttributeMBS 461 ∗ 16.1.56 Value as string 461 – 16.2.1 module TidyAttrIdMBS 462 ∗ 16.2.3 TidyAttrABBR=1 462 ∗ 16.2.4 TidyAttrABOUT=315 462 ∗ 16.2.5 TidyAttrACCEPT=2 462 ∗ 16.2.6 TidyAttrACCEPT_CHARSET=3 462 ∗ 16.2.7 TidyAttrACCESSKEY=4 462 ∗ 16.2.8 TidyAttrACTION=5 463 ∗ 16.2.9 TidyAttrADD_DATE=6 463 ∗ 16.2.10 TidyAttrALIGN=7 463 ∗ 16.2.11 TidyAttrALINK=8 463 ∗ 16.2.12 TidyAttrALLOWFULLSCREEN=9 463 ∗ 16.2.13 TidyAttrALT=10 463 ∗ 16.2.14 TidyAttrARCHIVE=11 464 ∗ 16.2.15 TidyAttrARIA_ACTIVEDESCENDANT=271 464 ∗ 16.2.16 TidyAttrARIA_ATOMIC=272 464 ∗ 16.2.17 TidyAttrARIA_AUTOCOMPLETE=273 464 ∗ 16.2.18 TidyAttrARIA_BUSY=274 464 ∗ 16.2.19 TidyAttrARIA_CHECKED=275 464 ∗ 16.2.20 TidyAttrARIA_CONTROLS=276 465 ∗ 16.2.21 TidyAttrARIA_DESCRIBEDBY=277 465 ∗ 16.2.22 TidyAttrARIA_DISABLED=278 465 ∗ 16.2.23 TidyAttrARIA_DROPEFFECT=279 465 ∗ 16.2.24 TidyAttrARIA_EXPANDED=280 465 ∗ 16.2.25 TidyAttrARIA_FLOWTO=281 465 ∗ 16.2.26 TidyAttrARIA_GRABBED=282 466 ∗ 16.2.27 TidyAttrARIA_HASPOPUP=283 466 ∗ 16.2.28 TidyAttrARIA_HIDDEN=284 466 ∗ 16.2.29 TidyAttrARIA_INVALID=285 466 46 CHAPTER 1. LIST OF TOPICS ∗ 16.2.30 TidyAttrARIA_LABEL=286 466 ∗ 16.2.31 TidyAttrARIA_LABELLEDBY=287 466 ∗ 16.2.32 TidyAttrARIA_LEVEL=288 467 ∗ 16.2.33 TidyAttrARIA_LIVE=289 467 ∗ 16.2.34 TidyAttrARIA_MULTILINE=290 467 ∗ 16.2.35 TidyAttrARIA_MULTISELECTABLE=291 467 ∗ 16.2.36 TidyAttrARIA_ORIENTATION=292 467 ∗ 16.2.37 TidyAttrARIA_OWNS=293 467 ∗ 16.2.38 TidyAttrARIA_POSINSET=294 468 ∗ 16.2.39 TidyAttrARIA_PRESSED=295 468 ∗ 16.2.40 TidyAttrARIA_READONLY=296 468 ∗ 16.2.41 TidyAttrARIA_RELEVANT=297 468 ∗ 16.2.42 TidyAttrARIA_REQUIRED=298 468 ∗ 16.2.43 TidyAttrARIA_SELECTED=299 468 ∗ 16.2.44 TidyAttrARIA_SETSIZE=300 469 ∗ 16.2.45 TidyAttrARIA_SORT=301 469 ∗ 16.2.46 TidyAttrARIA_VALUEMAX=302 469 ∗ 16.2.47 TidyAttrARIA_VALUEMIN=303 469 ∗ 16.2.48 TidyAttrARIA_VALUENOW=304 469 ∗ 16.2.49 TidyAttrARIA_VALUETEXT=305 469 ∗ 16.2.50 TidyAttrAS=324 470 ∗ 16.2.51 TidyAttrASYNC=171 470 ∗ 16.2.52 TidyAttrAUTOCOMPLETE=172 470 ∗ 16.2.53 TidyAttrAUTOFOCUS=173 470 ∗ 16.2.54 TidyAttrAUTOPLAY=174 470 ∗ 16.2.55 TidyAttrAXIS=12 470 ∗ 16.2.56 TidyAttrBACKGROUND=13 471 ∗ 16.2.57 TidyAttrBASEPROFILE=311 471 ∗ 16.2.58 TidyAttrBGCOLOR=14 471 ∗ 16.2.59 TidyAttrBGPROPERTIES=15 471 ∗ 16.2.60 TidyAttrBORDER=16 471 ∗ 16.2.61 TidyAttrBORDERCOLOR=17 471 ∗ 16.2.62 TidyAttrBOTTOMMARGIN=18 472 ∗ 16.2.63 TidyAttrCELLPADDING=19 472 ∗ 16.2.64 TidyAttrCELLSPACING=20 472 ∗ 16.2.65 TidyAttrCHALLENGE=175 472 ∗ 16.2.66 TidyAttrCHAR=21 472 ∗ 16.2.67 TidyAttrCHAROFF=22 472 ∗ 16.2.68 TidyAttrCHARSET=23 473 ∗ 16.2.69 TidyAttrCHECKED=24 473 ∗ 16.2.70 TidyAttrCITE=25 473 ∗ 16.2.71 TidyAttrCLASS=26 473 47 ∗ 16.2.72 TidyAttrCLASSID=27 473 ∗ 16.2.73 TidyAttrCLEAR=28 473 ∗ 16.2.74 TidyAttrCODE=29 474 ∗ 16.2.75 TidyAttrCODEBASE=30 474 ∗ 16.2.76 TidyAttrCODETYPE=31 474 ∗ 16.2.77 TidyAttrCOLOR=32 474 ∗ 16.2.78 TidyAttrCOLS=33 474 ∗ 16.2.79 TidyAttrCOLSPAN=34 474 ∗ 16.2.80 TidyAttrCOMPACT=35 475 ∗ 16.2.81 TidyAttrCONTENT=36 475 ∗ 16.2.82 TidyAttrCONTENTEDITABLE=176 475 ∗ 16.2.83 TidyAttrCONTENTSCRIPTTYPE=312 475 ∗ 16.2.84 TidyAttrCONTENTSTYLETYPE=313 475 ∗ 16.2.85 TidyAttrCONTEXTMENU=177 475 ∗ 16.2.86 TidyAttrCONTROLS=178 476 ∗ 16.2.87 TidyAttrCOORDS=37 476 ∗ 16.2.88 TidyAttrCROSSORIGIN=179 476 ∗ 16.2.89 TidyAttrDATA=38 476 ∗ 16.2.90 TidyAttrDATAFLD=39 476 ∗ 16.2.91 TidyAttrDATAFORMATAS=40 476 ∗ 16.2.92 TidyAttrDATAPAGESIZE=41 477 ∗ 16.2.93 TidyAttrDATASRC=42 477 ∗ 16.2.94 TidyAttrDATATYPE=316 477 ∗ 16.2.95 TidyAttrDATETIME=43 477 ∗ 16.2.96 TidyAttrDECLARE=44 477 ∗ 16.2.97 TidyAttrDEFAULT=180 477 ∗ 16.2.98 TidyAttrDEFER=45 478 ∗ 16.2.99 TidyAttrDIR=46 478 ∗ 16.2.100 TidyAttrDIRNAME=181 478 ∗ 16.2.101 TidyAttrDISABLED=47 478 ∗ 16.2.102 TidyAttrDISPLAY=314 478 ∗ 16.2.103 TidyAttrDRAGGABLE=182 479 ∗ 16.2.104 TidyAttrDROPZONE=183 479 ∗ 16.2.105 TidyAttrENCODING=48 479 ∗ 16.2.106 TidyAttrENCTYPE=49 479 ∗ 16.2.107 TidyAttrEVENT=164 479 ∗ 16.2.108 TidyAttrFACE=50 479 ∗ 16.2.109 TidyAttrFOR=51 480 ∗ 16.2.110 TidyAttrFORM=184 480 ∗ 16.2.111 TidyAttrFORMACTION=185 480 ∗ 16.2.112 TidyAttrFORMENCTYPE=186 480 ∗ 16.2.113 TidyAttrFORMMETHOD=187 480 48 CHAPTER 1. LIST OF TOPICS ∗ 16.2.114 TidyAttrFORMNOVALIDATE=188 480 ∗ 16.2.115 TidyAttrFORMTARGET=189 481 ∗ 16.2.116 TidyAttrFRAME=52 481 ∗ 16.2.117 TidyAttrFRAMEBORDER=53 481 ∗ 16.2.118 TidyAttrFRAMESPACING=54 481 ∗ 16.2.119 TidyAttrGRIDX=55 481 ∗ 16.2.120 TidyAttrGRIDY=56 481 ∗ 16.2.121 TidyAttrHEADERS=57 482 ∗ 16.2.122 TidyAttrHEIGHT=58 482 ∗ 16.2.123 TidyAttrHIDDEN=190 482 ∗ 16.2.124 TidyAttrHIGH=191 482 ∗ 16.2.125 TidyAttrHREF=59 482 ∗ 16.2.126 TidyAttrHREFLANG=60 482 ∗ 16.2.127 TidyAttrHSPACE=61 483 ∗ 16.2.128 TidyAttrHTTP_EQUIV=62 483 ∗ 16.2.129 TidyAttrICON=192 483 ∗ 16.2.130 TidyAttrID=63 483 ∗ 16.2.131 TidyAttrINLIST=317 483 ∗ 16.2.132 TidyAttrINTEGRITY=323 483 ∗ 16.2.133 TidyAttrISMAP=64 484 ∗ 16.2.134 TidyAttrITEMID=65 484 ∗ 16.2.135 TidyAttrITEMPROP=66 484 ∗ 16.2.136 TidyAttrITEMREF=67 484 ∗ 16.2.137 TidyAttrITEMSCOPE=68 484 ∗ 16.2.138 TidyAttrITEMTYPE=69 484 ∗ 16.2.139 TidyAttrKEYTYPE=193 485 ∗ 16.2.140 TidyAttrKIND=194 485 ∗ 16.2.141 TidyAttrLABEL=70 485 ∗ 16.2.142 TidyAttrLANG=71 485 ∗ 16.2.143 TidyAttrLANGUAGE=72 485 ∗ 16.2.144 TidyAttrLAST_MODIFIED=73 485 ∗ 16.2.145 TidyAttrLAST_VISIT=74 486 ∗ 16.2.146 TidyAttrLEFTMARGIN=75 486 ∗ 16.2.147 TidyAttrLINK=76 486 ∗ 16.2.148 TidyAttrLIST=195 486 ∗ 16.2.149 TidyAttrLONGDESC=77 486 ∗ 16.2.150 TidyAttrLOOP=196 486 ∗ 16.2.151 TidyAttrLOW=197 487 ∗ 16.2.152 TidyAttrLOWSRC=78 487 ∗ 16.2.153 TidyAttrMANIFEST=198 487 ∗ 16.2.154 TidyAttrMARGINHEIGHT=79 487 ∗ 16.2.155 TidyAttrMARGINWIDTH=80 487 49 ∗ 16.2.156 TidyAttrMAX=199 487 ∗ 16.2.157 TidyAttrMAXLENGTH=81 488 ∗ 16.2.158 TidyAttrMEDIA=82 488 ∗ 16.2.159 TidyAttrMEDIAGROUP=200 488 ∗ 16.2.160 TidyAttrMETHOD=83 488 ∗ 16.2.161 TidyAttrMETHODS=165 488 ∗ 16.2.162 TidyAttrMIN=201 488 ∗ 16.2.163 TidyAttrMULTIPLE=84 489 ∗ 16.2.164 TidyAttrN=166 489 ∗ 16.2.165 TidyAttrNAME=85 489 ∗ 16.2.166 TidyAttrNOHREF=86 489 ∗ 16.2.167 TidyAttrNORESIZE=87 489 ∗ 16.2.168 TidyAttrNOSHADE=88 489 ∗ 16.2.169 TidyAttrNOVALIDATE=202 490 ∗ 16.2.170 TidyAttrNOWRAP=89 490 ∗ 16.2.171 TidyAttrOBJECT=90 490 ∗ 16.2.172 TidyAttrOnABORT=205 490 ∗ 16.2.173 TidyAttrOnAFTERPRINT=206 490 ∗ 16.2.174 TidyAttrOnAFTERUPDATE=91 490 ∗ 16.2.175 TidyAttrOnBEFOREPRINT=207 491 ∗ 16.2.176 TidyAttrOnBEFOREUNLOAD=92 491 ∗ 16.2.177 TidyAttrOnBEFOREUPDATE=93 491 ∗ 16.2.178 TidyAttrOnBLUR=94 491 ∗ 16.2.179 TidyAttrOnCANPLAY=208 491 ∗ 16.2.180 TidyAttrOnCANPLAYTHROUGH=209 491 ∗ 16.2.181 TidyAttrOnCHANGE=95 492 ∗ 16.2.182 TidyAttrOnCLICK=96 492 ∗ 16.2.183 TidyAttrOnCONTEXTMENU=210 492 ∗ 16.2.184 TidyAttrOnCUECHANGE=211 492 ∗ 16.2.185 TidyAttrOnDATAAVAILABLE=97 492 ∗ 16.2.186 TidyAttrOnDATASETCHANGED=98 492 ∗ 16.2.187 TidyAttrOnDATASETCOMPLETE=99 493 ∗ 16.2.188 TidyAttrOnDBLCLICK=100 493 ∗ 16.2.189 TidyAttrOnDRAG=212 493 ∗ 16.2.190 TidyAttrOnDRAGEND=213 493 ∗ 16.2.191 TidyAttrOnDRAGENTER=214 493 ∗ 16.2.192 TidyAttrOnDRAGLEAVE=215 493 ∗ 16.2.193 TidyAttrOnDRAGOVER=216 494 ∗ 16.2.194 TidyAttrOnDRAGSTART=217 494 ∗ 16.2.195 TidyAttrOnDROP=218 494 ∗ 16.2.196 TidyAttrOnDURATIONCHANGE=219 494 ∗ 16.2.197 TidyAttrOnEMPTIED=220 494 50 CHAPTER 1. LIST OF TOPICS ∗ 16.2.198 TidyAttrOnENDED=221 494 ∗ 16.2.199 TidyAttrOnERROR=222 495 ∗ 16.2.200 TidyAttrOnERRORUPDATE=101 495 ∗ 16.2.201 TidyAttrOnFOCUS=102 495 ∗ 16.2.202 TidyAttrOnHASHCHANGE=223 495 ∗ 16.2.203 TidyAttrOnINPUT=224 495 ∗ 16.2.204 TidyAttrOnINVALID=225 495 ∗ 16.2.205 TidyAttrOnKEYDOWN=103 496 ∗ 16.2.206 TidyAttrOnKEYPRESS=104 496 ∗ 16.2.207 TidyAttrOnKEYUP=105 496 ∗ 16.2.208 TidyAttrOnLOAD=106 496 ∗ 16.2.209 TidyAttrOnLOADEDDATA=226 496 ∗ 16.2.210 TidyAttrOnLOADEDMETADATA=227 496 ∗ 16.2.211 TidyAttrOnLOADSTART=228 497 ∗ 16.2.212 TidyAttrOnMESSAGE=229 497 ∗ 16.2.213 TidyAttrOnMOUSEDOWN=107 497 ∗ 16.2.214 TidyAttrOnMOUSEMOVE=108 497 ∗ 16.2.215 TidyAttrOnMOUSEOUT=109 497 ∗ 16.2.216 TidyAttrOnMOUSEOVER=110 497 ∗ 16.2.217 TidyAttrOnMOUSEUP=111 498 ∗ 16.2.218 TidyAttrOnMOUSEWHEEL=230 498 ∗ 16.2.219 TidyAttrOnOFFLINE=231 498 ∗ 16.2.220 TidyAttrOnONLINE=232 498 ∗ 16.2.221 TidyAttrOnPAGEHIDE=233 498 ∗ 16.2.222 TidyAttrOnPAGESHOW=234 498 ∗ 16.2.223 TidyAttrOnPAUSE=235 499 ∗ 16.2.224 TidyAttrOnPLAY=236 499 ∗ 16.2.225 TidyAttrOnPLAYING=237 499 ∗ 16.2.226 TidyAttrOnPOPSTATE=238 499 ∗ 16.2.227 TidyAttrOnPROGRESS=239 499 ∗ 16.2.228 TidyAttrOnRATECHANGE=240 499 ∗ 16.2.229 TidyAttrOnREADYSTATECHANGE=241 500 ∗ 16.2.230 TidyAttrOnREDO=242 500 ∗ 16.2.231 TidyAttrOnRESET=112 500 ∗ 16.2.232 TidyAttrOnRESIZE=243 500 ∗ 16.2.233 TidyAttrOnROWENTER=113 500 ∗ 16.2.234 TidyAttrOnROWEXIT=114 500 ∗ 16.2.235 TidyAttrOnSCROLL=244 501 ∗ 16.2.236 TidyAttrOnSEEKED=245 501 ∗ 16.2.237 TidyAttrOnSEEKING=246 501 ∗ 16.2.238 TidyAttrOnSELECT=115 501 ∗ 16.2.239 TidyAttrOnSHOW=247 501 51 ∗ 16.2.240 TidyAttrOnSTALLED=248 501 ∗ 16.2.241 TidyAttrOnSTORAGE=249 502 ∗ 16.2.242 TidyAttrOnSUBMIT=116 502 ∗ 16.2.243 TidyAttrOnSUSPEND=250 502 ∗ 16.2.244 TidyAttrOnTIMEUPDATE=251 502 ∗ 16.2.245 TidyAttrOnUNDO=252 502 ∗ 16.2.246 TidyAttrOnUNLOAD=117 502 ∗ 16.2.247 TidyAttrOnVOLUMECHANGE=253 503 ∗ 16.2.248 TidyAttrOnWAITING=254 503 ∗ 16.2.249 TidyAttrOPEN=203 503 ∗ 16.2.250 TidyAttrOPTIMUM=204 503 ∗ 16.2.251 TidyAttrPATTERN=255 503 ∗ 16.2.252 TidyAttrPLACEHOLDER=256 503 ∗ 16.2.253 TidyAttrPOSTER=257 504 ∗ 16.2.254 TidyAttrPREFIX=318 504 ∗ 16.2.255 TidyAttrPRELOAD=258 504 ∗ 16.2.256 TidyAttrPRESERVEASPECTRATIO=309 504 ∗ 16.2.257 TidyAttrPROFILE=118 504 ∗ 16.2.258 TidyAttrPROMPT=119 504 ∗ 16.2.259 TidyAttrPROPERTY=319 505 ∗ 16.2.260 TidyAttrPUBDATE=259 505 ∗ 16.2.261 TidyAttrRADIOGROUP=260 505 ∗ 16.2.262 TidyAttrRBSPAN=120 505 ∗ 16.2.263 TidyAttrREADONLY=121 505 ∗ 16.2.264 TidyAttrREL=122 505 ∗ 16.2.265 TidyAttrREQUIRED=261 506 ∗ 16.2.266 TidyAttrRESOURCE=320 506 ∗ 16.2.267 TidyAttrREV=123 506 ∗ 16.2.268 TidyAttrREVERSED=262 506 ∗ 16.2.269 TidyAttrRIGHTMARGIN=124 506 ∗ 16.2.270 TidyAttrROLE=125 506 ∗ 16.2.271 TidyAttrROWS=126 507 ∗ 16.2.272 TidyAttrROWSPAN=127 507 ∗ 16.2.273 TidyAttrRULES=128 507 ∗ 16.2.274 TidyAttrSANDBOX=263 507 ∗ 16.2.275 TidyAttrSCHEME=129 507 ∗ 16.2.276 TidyAttrSCOPE=130 507 ∗ 16.2.277 TidyAttrSCOPED=264 508 ∗ 16.2.278 TidyAttrSCROLLING=131 508 ∗ 16.2.279 TidyAttrSDAFORM=167 508 ∗ 16.2.280 TidyAttrSDAPREF=168 508 ∗ 16.2.281 TidyAttrSDASUFF=169 508 52 CHAPTER 1. LIST OF TOPICS ∗ 16.2.282 TidyAttrSEAMLESS=265 508 ∗ 16.2.283 TidyAttrSELECTED=132 509 ∗ 16.2.284 TidyAttrSHAPE=133 509 ∗ 16.2.285 TidyAttrSHOWGRID=134 509 ∗ 16.2.286 TidyAttrSHOWGRIDX=135 509 ∗ 16.2.287 TidyAttrSHOWGRIDY=136 509 ∗ 16.2.288 TidyAttrSIZE=137 509 ∗ 16.2.289 TidyAttrSIZES=266 510 ∗ 16.2.290 TidyAttrSPAN=138 510 ∗ 16.2.291 TidyAttrSPELLCHECK=267 510 ∗ 16.2.292 TidyAttrSRC=139 510 ∗ 16.2.293 TidyAttrSRCDOC=268 510 ∗ 16.2.294 TidyAttrSRCLANG=269 510 ∗ 16.2.295 TidyAttrSRCSET=140 511 ∗ 16.2.296 TidyAttrSTANDBY=141 511 ∗ 16.2.297 TidyAttrSTART=142 511 ∗ 16.2.298 TidyAttrSTEP=270 511 ∗ 16.2.299 TidyAttrSTYLE=143 511 ∗ 16.2.300 TidyAttrSUMMARY=144 511 ∗ 16.2.301 TidyAttrTABINDEX=145 512 ∗ 16.2.302 TidyAttrTARGET=146 512 ∗ 16.2.303 TidyAttrTEXT=147 512 ∗ 16.2.304 TidyAttrTITLE=148 512 ∗ 16.2.305 TidyAttrTOPMARGIN=149 512 ∗ 16.2.306 TidyAttrTRANSLATE=150 512 ∗ 16.2.307 TidyAttrTYPE=151 513 ∗ 16.2.308 TidyAttrTYPEOF=321 513 ∗ 16.2.309 TidyAttrUNKNOWN=0 513 ∗ 16.2.310 TidyAttrURN=170 513 ∗ 16.2.311 TidyAttrUSEMAP=152 513 ∗ 16.2.312 TidyAttrVALIGN=153 513 ∗ 16.2.313 TidyAttrVALUE=154 514 ∗ 16.2.314 TidyAttrVALUETYPE=155 514 ∗ 16.2.315 TidyAttrVERSION=156 514 ∗ 16.2.316 TidyAttrVIEWBOX=308 514 ∗ 16.2.317 TidyAttrVLINK=157 514 ∗ 16.2.318 TidyAttrVOCAB=322 514 ∗ 16.2.319 TidyAttrVSPACE=158 515 ∗ 16.2.320 TidyAttrWIDTH=159 515 ∗ 16.2.321 TidyAttrWRAP=160 515 ∗ 16.2.322 TidyAttrX=306 515 ∗ 16.2.323 TidyAttrXMLNS=163 515 53 ∗ 16.2.324 TidyAttrXMLNSXLINK=325 515 ∗ 16.2.325 TidyAttrXML_LANG=161 516 ∗ 16.2.326 TidyAttrXML_SPACE=162 516 ∗ 16.2.327 TidyAttrY=307 516 ∗ 16.2.328 TidyAttrZOOMANDPAN=310 516 – 16.3.1 module TidyConfigCategoryMBS 517 ∗ 16.3.3 TidyDiagnostics=1 517 ∗ 16.3.4 TidyEncoding=3 517 ∗ 16.3.5 TidyMarkup=0 517 ∗ 16.3.6 TidyMiscellaneous=4 517 ∗ 16.3.7 TidyPrettyPrint=2 517 – 16.4.1 module TidyDoctypeModesMBS 519 ∗ 16.4.3 TidyDoctypeAuto=2 519 ∗ 16.4.4 TidyDoctypeHtml5=0 519 ∗ 16.4.5 TidyDoctypeLoose=4 519 ∗ 16.4.6 TidyDoctypeOmit=1 519 ∗ 16.4.7 TidyDoctypeStrict=3 519 ∗ 16.4.8 TidyDoctypeUser=5 520 – 16.5.1 class TidyDocumentMBS 521 ∗ 16.5.5 AccessWarningCount as Integer 521 ∗ 16.5.6 Body as TidyNodeMBS 521 ∗ 16.5.7 CleanAndRepair as Integer 522 ∗ 16.5.8 ConfigErrorCount as Integer 522 ∗ 16.5.9 CopyConfig(otherDocument as TidyDocumentMBS) as boolean 522 ∗ 16.5.10 DetectedGenericXml as boolean 522 ∗ 16.5.11 DetectedHtmlVersion as Integer 522 ∗ 16.5.12 DetectedXhtml as boolean 523 ∗ 16.5.13 ErrorBuffer as string 523 ∗ 16.5.14 ErrorCount as Integer 523 ∗ 16.5.15 ErrorSummary 523 ∗ 16.5.16 FileExists(filename as string) as boolean 523 ∗ 16.5.17 GeneralInfo 523 ∗ 16.5.18 GetBooleanOption(OptionID as Integer) as boolean 524 ∗ 16.5.19 GetIntegerOption(OptionID as Integer) as Integer 524 ∗ 16.5.20 GetStringOption(OptionID as Integer) as string 524 ∗ 16.5.21 Head as TidyNodeMBS 524 ∗ 16.5.22 Html as TidyNodeMBS 524 ∗ 16.5.23 InstallErrorBuffer 524 ∗ 16.5.24 LibraryVersion as string 525 ∗ 16.5.25 LoadConfigFile(filename as string) as Integer 525 54 CHAPTER 1. LIST OF TOPICS ∗ 16.5.26 LoadConfigFileWithEncoding(Filename as string, CharacterEncoding as string) as Integer 525 ∗ 16.5.27 NextOption(Iterator as TidyIteratorMBS) as TidyOptionMBS 525 ∗ 16.5.28 NextRelatedOption(Iterator as TidyIteratorMBS) as TidyOptionMBS 525 ∗ 16.5.29 NextUserDeclaredTag(OptionID as Integer, Iterator as TidyIteratorMBS) as string 526 ∗ 16.5.30 OptionCharcterEncodingName(OptionID as Integer) as String 526 ∗ 16.5.31 OptionCurrentPick(OptionID as Integer) as String 526 ∗ 16.5.32 OptionForID(OptionID as Integer) as TidyOptionMBS 526 ∗ 16.5.33 OptionForName(OptionName as string) as TidyOptionMBS 526 ∗ 16.5.34 OptionIDForName(OptionName as string) as Integer 526 ∗ 16.5.35 OptionList as TidyIteratorMBS 527 ∗ 16.5.36 OptionResetToDefault(OptionID as Integer) as boolean 527 ∗ 16.5.37 OptionsDifferentThanDefault as boolean 527 ∗ 16.5.38 OptionsDifferentThanSnapshot as boolean 527 ∗ 16.5.39 OptionsResetAllToDefault as boolean 527 ∗ 16.5.40 OptionsResetToSnapshot as boolean 527 ∗ 16.5.41 OptionsSnapshot as boolean 528 ∗ 16.5.42 ParseFile(filename as string) as Integer 528 ∗ 16.5.43 ParseSource(theInput as TidyInputMBS) as Integer 528 ∗ 16.5.44 ParseString(data as string) as Integer 528 ∗ 16.5.45 ParseStringOption(OptionName as string, value as string) as boolean 528 ∗ 16.5.46 RelatedOptionsList(Option as TidyOptionMBS) as TidyIteratorMBS 529 ∗ 16.5.47 ReleaseDate as string 529 ∗ 16.5.48 ReportDoctype as Integer 529 ∗ 16.5.49 Root as TidyNodeMBS 529 ∗ 16.5.50 RunDiagnostics as Integer 530 ∗ 16.5.51 SaveConfig(theOutput as TidyOutputMBS) as Integer 530 ∗ 16.5.52 SaveConfigFile(filename as string) as Integer 530 ∗ 16.5.53 SaveFile(filename as string) as Integer 530 ∗ 16.5.54 SaveOutput(theOutput as TidyOutputMBS) as Integer 530 ∗ 16.5.55 SaveString as string 530 ∗ 16.5.56 SetBooleanOption(OptionID as Integer, value as boolean) as boolean 531 ∗ 16.5.57 SetCharacterEncoding(encodingName as string) as Integer 531 ∗ 16.5.58 SetErrorFile(filename as string) as boolean 531 ∗ 16.5.59 SetInputCharacterEncoding(encodingName as string) as Integer 531 ∗ 16.5.60 SetIntegerOption(OptionID as Integer, value as Integer) as boolean 532 ∗ 16.5.61 SetOutputCharacterEncoding(encodingName as string) as Integer 532 ∗ 16.5.62 SetStringOption(OptionID as Integer, value as string) as boolean 532 ∗ 16.5.63 Status as Integer 532 ∗ 16.5.64 UserDeclaredTagList as TidyIteratorMBS 533 ∗ 16.5.65 WarningCount as Integer 533 55 ∗ 16.5.67 ErrorOutput as TidyOutputMBS 533 ∗ 16.5.68 Handle as Integer 533 ∗ 16.5.69 OptionAccessibilityCheck as Integer 533 ∗ 16.5.70 OptionAccessibilityCheckLevel as Integer 534 ∗ 16.5.71 OptionAddXmlDecl as Boolean 534 ∗ 16.5.72 OptionAddXmlSpace as Boolean 534 ∗ 16.5.73 OptionAltText as String 534 ∗ 16.5.74 OptionAnchorAsName as Boolean 535 ∗ 16.5.75 OptionAsciiChars as Boolean 535 ∗ 16.5.76 OptionAssumeXmlProcins as Boolean 535 ∗ 16.5.77 OptionBare as Boolean 536 ∗ 16.5.78 OptionBlockTags as String 536 ∗ 16.5.79 OptionBodyOnly as Integer 536 ∗ 16.5.80 OptionBreakBeforeBr as Boolean 536 ∗ 16.5.81 OptionCharEncoding as Integer 537 ∗ 16.5.82 OptionClean as Boolean 537 ∗ 16.5.83 OptionCoerceEndtags as Boolean 537 ∗ 16.5.84 OptionCssPrefix as String 538 ∗ 16.5.85 OptionDecorateInferredUl as Boolean 538 ∗ 16.5.86 OptionDoctype as String 538 ∗ 16.5.87 OptionDoctypeMode as Integer 539 ∗ 16.5.88 OptionDropEmptyElements as Boolean 539 ∗ 16.5.89 OptionDropEmptyParas as Boolean 539 ∗ 16.5.90 OptionDropFontTags as Boolean 539 ∗ 16.5.91 OptionDropPropAttrs as Boolean 540 ∗ 16.5.92 OptionDropProprietaryAttributes as Boolean 540 ∗ 16.5.93 OptionDuplicateAttrs as Integer 540 ∗ 16.5.94 OptionEmacs as Boolean 540 ∗ 16.5.95 OptionEmacsFile as String 541 ∗ 16.5.96 OptionEmptyTags as String 541 ∗ 16.5.97 OptionEncloseBlockText as Boolean 541 ∗ 16.5.98 OptionEncloseBodyText as Boolean 541 ∗ 16.5.99 OptionEncloseText as Boolean 542 ∗ 16.5.100 OptionErrFile as String 542 ∗ 16.5.101 OptionErrorFile as String 542 ∗ 16.5.102 OptionEscapeCdata as Boolean 542 ∗ 16.5.103 OptionEscapeScripts as Boolean 543 ∗ 16.5.104 OptionFixBackslash as Boolean 543 ∗ 16.5.105 OptionFixBadComments as Boolean 543 ∗ 16.5.106 OptionFixComments as Boolean 544 ∗ 16.5.107 OptionFixUri as Boolean 544 ∗ 16.5.108 OptionForceOutput as Boolean 544 56 CHAPTER 1. LIST OF TOPICS ∗ 16.5.109 OptionGdoc as Boolean 544 ∗ 16.5.110 OptionGnuEmacs as Boolean 545 ∗ 16.5.111 OptionGnuEmacsFile as String 545 ∗ 16.5.112 OptionHideComments as Boolean 545 ∗ 16.5.113 OptionHideEndtags as Boolean 545 ∗ 16.5.114 OptionHtmlOut as Boolean 546 ∗ 16.5.115 OptionInCharEncoding as Integer 546 ∗ 16.5.116 OptionIndent as Integer 546 ∗ 16.5.117 OptionIndentAttributes as Boolean 546 ∗ 16.5.118 OptionIndentCdata as Boolean 547 ∗ 16.5.119 OptionIndentContent as Integer 547 ∗ 16.5.120 OptionIndentSpaces as Integer 547 ∗ 16.5.121 OptionIndentWithTabs as Boolean 547 ∗ 16.5.122 OptionInlineTags as String 548 ∗ 16.5.123 OptionInputEncoding as Integer 548 ∗ 16.5.124 OptionInputXml as Boolean 548 ∗ 16.5.125 OptionJoinClasses as Boolean 548 ∗ 16.5.126 OptionJoinStyles as Boolean 549 ∗ 16.5.127 OptionKeepFileTimes as Boolean 549 ∗ 16.5.128 OptionKeepTime as Boolean 549 ∗ 16.5.129 OptionLanguage as String 549 ∗ 16.5.130 OptionLiteralAttribs as Boolean 550 ∗ 16.5.131 OptionLiteralAttributes as Boolean 550 ∗ 16.5.132 OptionLogicalEmphasis as Boolean 550 ∗ 16.5.133 OptionLowerLiterals as Boolean 550 ∗ 16.5.134 OptionMakeBare as Boolean 551 ∗ 16.5.135 OptionMakeClean as Boolean 551 ∗ 16.5.136 OptionMark as Boolean 551 ∗ 16.5.137 OptionMarkup as Boolean 551 ∗ 16.5.138 OptionMergeDivs as Integer 552 ∗ 16.5.139 OptionMergeEmphasis as Boolean 552 ∗ 16.5.140 OptionMergeSpans as Integer 552 ∗ 16.5.141 OptionNcr as Boolean 553 ∗ 16.5.142 OptionNewBlocklevelTags as String 553 ∗ 16.5.143 OptionNewEmptyTags as String 553 ∗ 16.5.144 OptionNewInlineTags as String 554 ∗ 16.5.145 OptionNewline as Integer 554 ∗ 16.5.146 OptionNewPreTags as String 554 ∗ 16.5.147 OptionNumEntities as Boolean 554 ∗ 16.5.148 OptionNumericEntities as Boolean 555 ∗ 16.5.149 OptionOmitOptionalTags as Boolean 555 ∗ 16.5.150 OptionOutCharEncoding as Integer 555 57 ∗ 16.5.151 OptionOutFile as String 556 ∗ 16.5.152 OptionOutputBom as Integer 556 ∗ 16.5.153 OptionOutputEncoding as Integer 556 ∗ 16.5.154 OptionOutputFile as String 557 ∗ 16.5.155 OptionOutputHtml as Boolean 557 ∗ 16.5.156 OptionOutputXhtml as Boolean 557 ∗ 16.5.157 OptionOutputXml as Boolean 557 ∗ 16.5.158 OptionPreserveEntities as Boolean 558 ∗ 16.5.159 OptionPreTags as String 558 ∗ 16.5.160 OptionPunctuationWrap as Boolean 558 ∗ 16.5.161 OptionPunctWrap as Boolean 558 ∗ 16.5.162 OptionQuiet as Boolean 559 ∗ 16.5.163 OptionQuoteAmpersand as Boolean 559 ∗ 16.5.164 OptionQuoteMarks as Boolean 559 ∗ 16.5.165 OptionQuoteNbsp as Boolean 559 ∗ 16.5.166 OptionRepeatedAttributes as Integer 560 ∗ 16.5.167 OptionReplaceColor as Boolean 560 ∗ 16.5.168 OptionShowBodyOnly as Integer 560 ∗ 16.5.169 OptionShowErrors as Integer 560 ∗ 16.5.170 OptionShowInfo as Boolean 561 ∗ 16.5.171 OptionShowMarkup as Boolean 561 ∗ 16.5.172 OptionShowWarnings as Boolean 561 ∗ 16.5.173 OptionSkipNested as Boolean 561 ∗ 16.5.174 OptionSlideStyle as String 562 ∗ 16.5.175 OptionSortAttributes as Integer 562 ∗ 16.5.176 OptionSplit as Boolean 562 ∗ 16.5.177 OptionStrictTagsAttributes as Boolean 562 ∗ 16.5.178 OptionTabSize as Integer 563 ∗ 16.5.179 OptionTidyMark as Boolean 563 ∗ 16.5.180 OptionUppercaseAttributes as Boolean 563 ∗ 16.5.181 OptionUpperCaseAttrs as Boolean 563 ∗ 16.5.182 OptionUppercaseTags as Boolean 564 ∗ 16.5.183 OptionVerticalSpace as Integer 564 ∗ 16.5.184 OptionVertSpace as Integer 564 ∗ 16.5.185 OptionWord2000 as Boolean 564 ∗ 16.5.186 OptionWrap as Integer 565 ∗ 16.5.187 OptionWrapAsp as Boolean 565 ∗ 16.5.188 OptionWrapAttributes as Boolean 565 ∗ 16.5.189 OptionWrapAttVals as Boolean 566 ∗ 16.5.190 OptionWrapJste as Boolean 566 ∗ 16.5.191 OptionWrapLen as Integer 566 ∗ 16.5.192 OptionWrapPhp as Boolean 566 58 CHAPTER 1. LIST OF TOPICS ∗ 16.5.193 OptionWrapScriptlets as Boolean 567 ∗ 16.5.194 OptionWrapScriptLiterals as Boolean 567 ∗ 16.5.195 OptionWrapSection as Boolean 567 ∗ 16.5.196 OptionWrapSections as Boolean 567 ∗ 16.5.197 OptionWriteBack as Boolean 567 ∗ 16.5.198 OptionXhtmlOut as Boolean 568 ∗ 16.5.199 OptionXmlDecl as Boolean 568 ∗ 16.5.200 OptionXmlOut as Boolean 568 ∗ 16.5.201 OptionXmlPIs as Boolean 569 ∗ 16.5.202 OptionXmlSpace as Boolean 569 ∗ 16.5.203 OptionXmlTags as Boolean 569 ∗ 16.5.205 Filter(level as Integer, line as Integer, column as Integer, message as string) as boolean 569 ∗ 16.5.206 PrettyPrintProgress(line as Integer, column as Integer, destLine as Integer) 570 – 16.6.1 module TidyDupAttrModesMBS 571 ∗ 16.6.3 TidyKeepFirst=0 571 ∗ 16.6.4 TidyKeepLast=1 571 – 16.7.1 class TidyInputMBS 572 ∗ 16.7.3 EndOfFile as boolean 572 ∗ 16.7.4 GetByte as Integer 572 ∗ 16.7.5 UngetByte(value as Integer) 572 – 16.8.1 class TidyIteratorMBS 573 ∗ 16.8.3 Handle as Integer 573 – 16.9.1 module TidyLineEndingMBS 574 ∗ 16.9.3 TidyCR=2 574 ∗ 16.9.4 TidyCRLF=1 574 ∗ 16.9.5 TidyLF=0 574 – 16.10.1 class TidyNodeMBS 575 ∗ 16.10.5 Child as TidyNodeMBS 575 ∗ 16.10.6 Column as Integer 576 ∗ 16.10.7 Document as TidyDocumentMBS 576 ∗ 16.10.8 FirstAttribute as TidyAttributeMBS 576 ∗ 16.10.9 GetABBR as TidyAttributeMBS 576 ∗ 16.10.10 GetALINK as TidyAttributeMBS 576 ∗ 16.10.11 GetALT as TidyAttributeMBS 577 ∗ 16.10.12 GetBGCOLOR as TidyAttributeMBS 577 ∗ 16.10.13 GetCHECKED as TidyAttributeMBS 577 ∗ 16.10.14 GetCOLSPAN as TidyAttributeMBS 577 ∗ 16.10.15 GetCONTENT as TidyAttributeMBS 577 ∗ 16.10.16 GetDATAFLD as TidyAttributeMBS 577 59 ∗ 16.10.17 GetFOR as TidyAttributeMBS 578 ∗ 16.10.18 GetHEIGHT as TidyAttributeMBS 578 ∗ 16.10.19 GetHREF as TidyAttributeMBS 578 ∗ 16.10.20 GetHTTP_EQUIV as TidyAttributeMBS 578 ∗ 16.10.21 GetID as TidyAttributeMBS 578 ∗ 16.10.22 GetISMAP as TidyAttributeMBS 579 ∗ 16.10.23 GetLANG as TidyAttributeMBS 579 ∗ 16.10.24 GetLANGUAGE as TidyAttributeMBS 579 ∗ 16.10.25 GetLINK as TidyAttributeMBS 579 ∗ 16.10.26 GetLONGDESC as TidyAttributeMBS 579 ∗ 16.10.27 GetNAME as TidyAttributeMBS 579 ∗ 16.10.28 GetOnBLUR as TidyAttributeMBS 580 ∗ 16.10.29 GetOnCLICK as TidyAttributeMBS 580 ∗ 16.10.30 GetOnFOCUS as TidyAttributeMBS 580 ∗ 16.10.31 GetOnKEYDOWN as TidyAttributeMBS 580 ∗ 16.10.32 GetOnKEYPRESS as TidyAttributeMBS 580 ∗ 16.10.33 GetOnKEYUP as TidyAttributeMBS 581 ∗ 16.10.34 GetOnMOUSEDOWN as TidyAttributeMBS 581 ∗ 16.10.35 GetOnMOUSEMOVE as TidyAttributeMBS 581 ∗ 16.10.36 GetOnMOUSEOUT as TidyAttributeMBS 581 ∗ 16.10.37 GetOnMOUSEOVER as TidyAttributeMBS 581 ∗ 16.10.38 GetOnMOUSEUP as TidyAttributeMBS 581 ∗ 16.10.39 GetREL as TidyAttributeMBS 582 ∗ 16.10.40 GetROWSPAN as TidyAttributeMBS 582 ∗ 16.10.41 GetSELECTED as TidyAttributeMBS 582 ∗ 16.10.42 GetSRC as TidyAttributeMBS 582 ∗ 16.10.43 GetSTYLE as TidyAttributeMBS 582 ∗ 16.10.44 GetSUMMARY as TidyAttributeMBS 583 ∗ 16.10.45 GetTARGET as TidyAttributeMBS 583 ∗ 16.10.46 GetTEXT as TidyAttributeMBS 583 ∗ 16.10.47 GetTITLE as TidyAttributeMBS 583 ∗ 16.10.48 GetTYPE as TidyAttributeMBS 583 ∗ 16.10.49 GetUSEMAP as TidyAttributeMBS 583 ∗ 16.10.50 GetVALUE as TidyAttributeMBS 584 ∗ 16.10.51 GetVLINK as TidyAttributeMBS 584 ∗ 16.10.52 GetWIDTH as TidyAttributeMBS 584 ∗ 16.10.53 GetXMLNS as TidyAttributeMBS 584 ∗ 16.10.54 Handle as Integer 584 ∗ 16.10.55 HasText as boolean 585 ∗ 16.10.56 ID as Integer 585 ∗ 16.10.57 IsDATALIST as Boolean 585 ∗ 16.10.58 IsProperty as boolean 585 60 CHAPTER 1. LIST OF TOPICS ∗ 16.10.59 Line as Integer 585 ∗ 16.10.60 Name as string 586 ∗ 16.10.61 NextNode as TidyNodeMBS 586 ∗ 16.10.62 NodeIsA as boolean 586 ∗ 16.10.63 NodeIsADDRESS as boolean 586 ∗ 16.10.64 NodeIsAPPLET as boolean 586 ∗ 16.10.65 NodeIsAREA as boolean 586 ∗ 16.10.66 NodeIsB as boolean 587 ∗ 16.10.67 NodeIsBASE as boolean 587 ∗ 16.10.68 NodeIsBASEFONT as boolean 587 ∗ 16.10.69 NodeIsBIG as boolean 587 ∗ 16.10.70 NodeIsBLINK as boolean 587 ∗ 16.10.71 NodeIsBLOCKQUOTE as boolean 588 ∗ 16.10.72 NodeIsBODY as boolean 588 ∗ 16.10.73 NodeIsBR as boolean 588 ∗ 16.10.74 NodeIsCAPTION as boolean 588 ∗ 16.10.75 NodeIsCENTER as boolean 588 ∗ 16.10.76 NodeIsCOL as boolean 588 ∗ 16.10.77 NodeIsCOLGROUP as boolean 589 ∗ 16.10.78 NodeIsDD as boolean 589 ∗ 16.10.79 NodeIsDIR as boolean 589 ∗ 16.10.80 NodeIsDIV as boolean 589 ∗ 16.10.81 NodeIsDL as boolean 589 ∗ 16.10.82 NodeIsDT as boolean 590 ∗ 16.10.83 NodeIsEM as boolean 590 ∗ 16.10.84 NodeIsEMBED as boolean 590 ∗ 16.10.85 NodeIsFONT as boolean 590 ∗ 16.10.86 NodeIsFORM as boolean 590 ∗ 16.10.87 NodeIsFRAME as boolean 590 ∗ 16.10.88 NodeIsFRAMESET as boolean 591 ∗ 16.10.89 NodeIsH1 as boolean 591 ∗ 16.10.90 NodeIsH2 as boolean 591 ∗ 16.10.91 NodeIsH3 as boolean 591 ∗ 16.10.92 NodeIsH4 as boolean 591 ∗ 16.10.93 NodeIsH5 as boolean 592 ∗ 16.10.94 NodeIsH6 as boolean 592 ∗ 16.10.95 NodeIsHEAD as boolean 592 ∗ 16.10.96 NodeIsHeader as boolean 592 ∗ 16.10.97 NodeIsHR as boolean 592 ∗ 16.10.98 NodeIsHTML as boolean 592 ∗ 16.10.99 NodeIsI as boolean 593 ∗ 16.10.100 NodeIsIFRAME as boolean 593 61 ∗ 16.10.101 NodeIsIMG as boolean 593 ∗ 16.10.102 NodeIsINPUT as boolean 593 ∗ 16.10.103 NodeIsISINDEX as boolean 593 ∗ 16.10.104 NodeIsLABEL as boolean 594 ∗ 16.10.105 NodeIsLAYER as boolean 595 ∗ 16.10.106 NodeIsLI as boolean 595 ∗ 16.10.107 NodeIsLINK as boolean 595 ∗ 16.10.108 NodeIsLISTING as boolean 595 ∗ 16.10.109 NodeIsMAP as boolean 595 ∗ 16.10.110 NodeIsMARQUEE as boolean 595 ∗ 16.10.111 NodeIsMENU as boolean 596 ∗ 16.10.112 NodeIsMETA as boolean 596 ∗ 16.10.113 NodeIsNOBR as boolean 596 ∗ 16.10.114 NodeIsNOFRAMES as boolean 596 ∗ 16.10.115 NodeIsNOSCRIPT as boolean 596 ∗ 16.10.116 NodeIsOBJECT as boolean 597 ∗ 16.10.117 NodeIsOL as boolean 597 ∗ 16.10.118 NodeIsOPTGROUP as boolean 597 ∗ 16.10.119 NodeIsOPTION as boolean 597 ∗ 16.10.120 NodeIsP as boolean 597 ∗ 16.10.121 NodeIsPARAM as boolean 597 ∗ 16.10.122 NodeIsPRE as boolean 598 ∗ 16.10.123 NodeIsQ as boolean 598 ∗ 16.10.124 NodeIsS as boolean 598 ∗ 16.10.125 NodeIsSCRIPT as boolean 598 ∗ 16.10.126 NodeIsSELECT as boolean 598 ∗ 16.10.127 NodeIsSMALL as boolean 599 ∗ 16.10.128 NodeIsSPACER as boolean 599 ∗ 16.10.129 NodeIsSPAN as boolean 599 ∗ 16.10.130 NodeIsSTRIKE as boolean 599 ∗ 16.10.131 NodeIsSTRONG as boolean 599 ∗ 16.10.132 NodeIsSTYLE as boolean 599 ∗ 16.10.133 NodeIsTABLE as boolean 600 ∗ 16.10.134 NodeIsTD as boolean 600 ∗ 16.10.135 NodeIsText as boolean 600 ∗ 16.10.136 NodeIsTEXTAREA as boolean 600 ∗ 16.10.137 NodeIsTH as boolean 600 ∗ 16.10.138 NodeIsTITLE as boolean 601 ∗ 16.10.139 NodeIsTR as boolean 601 ∗ 16.10.140 NodeIsU as boolean 601 ∗ 16.10.141 NodeIsUL as boolean 601 ∗ 16.10.142 NodeIsWBR as boolean 601 62 CHAPTER 1. LIST OF TOPICS ∗ 16.10.143 NodeIsXMP as boolean 601 ∗ 16.10.144 Parent as TidyNodeMBS 602 ∗ 16.10.145 PrevNode as TidyNodeMBS 602 ∗ 16.10.146 Text as string 602 ∗ 16.10.147 Type as Integer 603 ∗ 16.10.148 Value as string 603 – 16.11.1 module TidyNodeTypeMBS 604 ∗ 16.11.3 TidyNodeAsp=10 604 ∗ 16.11.4 TidyNodeCDATA=8 604 ∗ 16.11.5 TidyNodeComment=2 604 ∗ 16.11.6 TidyNodeDocType=1 604 ∗ 16.11.7 TidyNodeEnd=6 604 ∗ 16.11.8 TidyNodeJste=11 605 ∗ 16.11.9 TidyNodePhp=12 605 ∗ 16.11.10 TidyNodeProcIns=3 605 ∗ 16.11.11 TidyNodeRoot=0 605 ∗ 16.11.12 TidyNodeSection=9 605 ∗ 16.11.13 TidyNodeStart=5 605 ∗ 16.11.14 TidyNodeStartEnd=7 606 ∗ 16.11.15 TidyNodeText=4 606 ∗ 16.11.16 TidyNodeXmlDecl=13 606 – 16.12.1 module TidyOptionIdMBS 607 ∗ 16.12.3 TidyAccessibilityCheckLevel=84 607 ∗ 16.12.4 TidyAltText=11 607 ∗ 16.12.5 TidyAnchorAsName=93 607 ∗ 16.12.6 TidyAsciiChars=71 607 ∗ 16.12.7 TidyBlockTags=81 607 ∗ 16.12.8 TidyBodyOnly=64 608 ∗ 16.12.9 TidyBreakBeforeBR=40 608 ∗ 16.12.10 TidyBurstSlides=41 608 ∗ 16.12.11 TidyCharEncoding=4 608 ∗ 16.12.12 TidyCoerceEndTags=21 608 ∗ 16.12.13 TidyCSSPrefix=79 608 ∗ 16.12.14 TidyDecorateInferredUL=89 609 ∗ 16.12.15 TidyDoctype=9 609 ∗ 16.12.16 TidyDoctypeMode=8 609 ∗ 16.12.17 TidyDropEmptyElems=37 609 ∗ 16.12.18 TidyDropEmptyParas=38 609 ∗ 16.12.19 TidyDropFontTags=36 609 ∗ 16.12.20 TidyDropPropAttrs=35 610 ∗ 16.12.21 TidyDuplicateAttrs=10 610 63 ∗ 16.12.22 TidyEmacs=61 610 ∗ 16.12.23 TidyEmacsFile=62 610 ∗ 16.12.24 TidyEmptyTags=82 610 ∗ 16.12.25 TidyEncloseBlockText=57 610 ∗ 16.12.26 TidyEncloseBodyText=56 611 ∗ 16.12.27 TidyErrFile=13 611 ∗ 16.12.28 TidyEscapeCdata=74 611 ∗ 16.12.29 TidyEscapeScripts=97 611 ∗ 16.12.30 TidyFixBackslash=52 611 ∗ 16.12.31 TidyFixComments=39 611 ∗ 16.12.32 TidyFixUri=65 612 ∗ 16.12.33 TidyForceOutput=69 612 ∗ 16.12.34 TidyGDocClean=33 612 ∗ 16.12.35 TidyHideComments=67 612 ∗ 16.12.36 TidyHideEndTags=23 612 ∗ 16.12.37 TidyHtmlOut=27 612 ∗ 16.12.38 TidyInCharEncoding=5 613 ∗ 16.12.39 TidyIndentAttributes=53 613 ∗ 16.12.40 TidyIndentCdata=68 613 ∗ 16.12.41 TidyIndentContent=20 613 ∗ 16.12.42 TidyIndentSpaces=1 613 ∗ 16.12.43 TidyInlineTags=80 613 ∗ 16.12.44 TidyJoinClasses=72 614 ∗ 16.12.45 TidyJoinStyles=73 614 ∗ 16.12.46 TidyKeepFileTimes=58 614 ∗ 16.12.47 TidyLanguage=75 614 ∗ 16.12.48 TidyLiteralAttribs=63 614 ∗ 16.12.49 TidyLogicalEmphasis=34 614 ∗ 16.12.50 TidyLowerLiterals=66 615 ∗ 16.12.51 TidyMakeBare=31 615 ∗ 16.12.52 TidyMakeClean=32 615 ∗ 16.12.53 TidyMark=60 615 ∗ 16.12.54 TidyMergeDivs=88 615 ∗ 16.12.55 TidyMergeEmphasis=87 615 ∗ 16.12.56 TidyMergeSpans=92 616 ∗ 16.12.57 TidyNCR=76 616 ∗ 16.12.58 TidyNewline=7 616 ∗ 16.12.59 TidyNumEntities=42 616 ∗ 16.12.60 TidyOmitOptionalTags=22 616 ∗ 16.12.61 TidyOutCharEncoding=6 616 ∗ 16.12.62 TidyOutFile=14 617 ∗ 16.12.63 TidyOutputBOM=77 617 64 CHAPTER 1. LIST OF TOPICS ∗ 16.12.64 TidyPPrintTabs=94 617 ∗ 16.12.65 TidyPreserveEntities=90 617 ∗ 16.12.66 TidyPreTags=83 617 ∗ 16.12.67 TidyPunctWrap=86 617 ∗ 16.12.68 TidyQuiet=19 618 ∗ 16.12.69 TidyQuoteAmpersand=45 618 ∗ 16.12.70 TidyQuoteMarks=43 618 ∗ 16.12.71 TidyQuoteNbsp=44 618 ∗ 16.12.72 TidyReplaceColor=78 618 ∗ 16.12.73 TidyShowErrors=70 618 ∗ 16.12.74 TidyShowInfo=17 619 ∗ 16.12.75 TidyShowMarkup=16 619 ∗ 16.12.76 TidyShowWarnings=18 619 ∗ 16.12.77 TidySkipNested=95 619 ∗ 16.12.78 TidySlideStyle=12 619 ∗ 16.12.79 TidySortAttributes=91 619 ∗ 16.12.80 TidyStrictTagsAttr=96 620 ∗ 16.12.81 TidyTabSize=3 620 ∗ 16.12.82 TidyUnknownOption=0 620 ∗ 16.12.83 TidyUpperCaseAttrs=30 620 ∗ 16.12.84 TidyUpperCaseTags=29 620 ∗ 16.12.85 TidyVertSpace=85 620 ∗ 16.12.86 TidyWord2000=59 621 ∗ 16.12.87 TidyWrapAsp=49 621 ∗ 16.12.88 TidyWrapAttVals=46 621 ∗ 16.12.89 TidyWrapJste=50 621 ∗ 16.12.90 TidyWrapLen=2 621 ∗ 16.12.91 TidyWrapPhp=51 621 ∗ 16.12.92 TidyWrapScriptlets=47 622 ∗ 16.12.93 TidyWrapSection=48 622 ∗ 16.12.94 TidyWriteBack=15 622 ∗ 16.12.95 TidyXhtmlOut=26 622 ∗ 16.12.96 TidyXmlDecl=28 622 ∗ 16.12.97 TidyXmlOut=25 622 ∗ 16.12.98 TidyXmlPIs=54 623 ∗ 16.12.99 TidyXmlSpace=55 623 ∗ 16.12.100 TidyXmlTags=24 623 – 16.13.1 class TidyOptionMBS 624 ∗ 16.13.3 Category as Integer 624 ∗ 16.13.4 DefaultBoolean as boolean 624 ∗ 16.13.5 DefaultInteger as Integer 624 65 ∗ 16.13.6 DefaultString as String 624 ∗ 16.13.7 Description as string 624 ∗ 16.13.8 ID as Integer 625 ∗ 16.13.9 IsReadOnly as boolean 625 ∗ 16.13.10 Name as string 625 ∗ 16.13.11 Type as Integer 625 ∗ 16.13.13 Document as TidyDocumentMBS 625 ∗ 16.13.14 Handle as Integer 626 – 16.14.1 module TidyOptionTypeMBS 627 ∗ 16.14.3 TidyBoolean=2 627 ∗ 16.14.4 TidyInteger=1 627 ∗ 16.14.5 TidyString=0 627 – 16.15.1 class TidyOutputMBS 628 ∗ 16.15.3 WriteByte(value as Integer) 628 – 16.16.1 module TidyReportLevelKeysMBS 629 ∗ 16.16.3 TidyAccessString=603 629 ∗ 16.16.4 TidyBadDocumentString=605 629 ∗ 16.16.5 TidyConfigString=602 629 ∗ 16.16.6 TidyErrorString=604 629 ∗ 16.16.7 TidyFatalString=606 629 ∗ 16.16.8 TidyInfoString=600 630 ∗ 16.16.9 TidyWarningString=601 630 – 16.17.1 module TidyReportLevelMBS 631 ∗ 16.17.3 TidyAccess=3 631 ∗ 16.17.4 TidyBadDocument=5 631 ∗ 16.17.5 TidyConfig=2 631 ∗ 16.17.6 TidyError=4 631 ∗ 16.17.7 TidyFatal=6 631 ∗ 16.17.8 TidyInfo=0 632 ∗ 16.17.9 TidyWarning=1 632 – 16.18.1 module TidyTagIdMBS 633 ∗ 16.18.3 TidyTagA=1 633 ∗ 16.18.4 TidyTagABBR=2 633 ∗ 16.18.5 TidyTagACRONYM=3 633 ∗ 16.18.6 TidyTagADDRESS=4 633 ∗ 16.18.7 TidyTagALIGN=5 633 ∗ 16.18.8 TidyTagAPPLET=6 634 ∗ 16.18.9 TidyTagAREA=7 634 ∗ 16.18.10 TidyTagARTICLE=123 634 ∗ 16.18.11 TidyTagASIDE=124 634 66 CHAPTER 1. LIST OF TOPICS ∗ 16.18.12 TidyTagAUDIO=125 634 ∗ 16.18.13 TidyTagB=8 634 ∗ 16.18.14 TidyTagBASE=9 635 ∗ 16.18.15 TidyTagBASEFONT=10 635 ∗ 16.18.16 TidyTagBDI=126 635 ∗ 16.18.17 TidyTagBDO=11 635 ∗ 16.18.18 TidyTagBGSOUND=12 635 ∗ 16.18.19 TidyTagBIG=13 635 ∗ 16.18.20 TidyTagBLINK=14 636 ∗ 16.18.21 TidyTagBLOCKQUOTE=15 636 ∗ 16.18.22 TidyTagBODY=16 636 ∗ 16.18.23 TidyTagBR=17 636 ∗ 16.18.24 TidyTagBUTTON=18 636 ∗ 16.18.25 TidyTagCANVAS=127 636 ∗ 16.18.26 TidyTagCAPTION=19 637 ∗ 16.18.27 TidyTagCENTER=20 637 ∗ 16.18.28 TidyTagCITE=21 637 ∗ 16.18.29 TidyTagCODE=22 637 ∗ 16.18.30 TidyTagCOL=23 637 ∗ 16.18.31 TidyTagCOLGROUP=24 637 ∗ 16.18.32 TidyTagCOMMAND=128 638 ∗ 16.18.33 TidyTagCOMMENT=25 638 ∗ 16.18.34 TidyTagDATALIST=129 638 ∗ 16.18.35 TidyTagDD=26 638 ∗ 16.18.36 TidyTagDEL=27 638 ∗ 16.18.37 TidyTagDETAILS=130 638 ∗ 16.18.38 TidyTagDFN=28 639 ∗ 16.18.39 TidyTagDIALOG=131 639 ∗ 16.18.40 TidyTagDIR=29 639 ∗ 16.18.41 TidyTagDIV=30 639 ∗ 16.18.42 TidyTagDL=31 639 ∗ 16.18.43 TidyTagDT=32 639 ∗ 16.18.44 TidyTagEM=33 640 ∗ 16.18.45 TidyTagEMBED=34 640 ∗ 16.18.46 TidyTagFIELDSET=35 640 ∗ 16.18.47 TidyTagFIGCAPTION=132 640 ∗ 16.18.48 TidyTagFIGURE=133 640 ∗ 16.18.49 TidyTagFONT=36 640 ∗ 16.18.50 TidyTagFOOTER=134 641 ∗ 16.18.51 TidyTagFORM=37 641 ∗ 16.18.52 TidyTagFRAME=38 641 ∗ 16.18.53 TidyTagFRAMESET=39 641 67 ∗ 16.18.54 TidyTagH1=40 641 ∗ 16.18.55 TidyTagH2=41 641 ∗ 16.18.56 TidyTagH3=42 642 ∗ 16.18.57 TidyTagH4=43 642 ∗ 16.18.58 TidyTagH5=44 642 ∗ 16.18.59 TidyTagH6=45 642 ∗ 16.18.60 TidyTagHEAD=46 642 ∗ 16.18.61 TidyTagHEADER=135 642 ∗ 16.18.62 TidyTagHGROUP=136 643 ∗ 16.18.63 TidyTagHR=47 643 ∗ 16.18.64 TidyTagHTML=48 643 ∗ 16.18.65 TidyTagI=49 643 ∗ 16.18.66 TidyTagIFRAME=50 643 ∗ 16.18.67 TidyTagILAYER=51 643 ∗ 16.18.68 TidyTagIMG=52 644 ∗ 16.18.69 TidyTagINPUT=53 644 ∗ 16.18.70 TidyTagINS=54 644 ∗ 16.18.71 TidyTagISINDEX=55 644 ∗ 16.18.72 TidyTagKBD=56 644 ∗ 16.18.73 TidyTagKEYGEN=57 644 ∗ 16.18.74 TidyTagLABEL=58 645 ∗ 16.18.75 TidyTagLAYER=59 645 ∗ 16.18.76 TidyTagLEGEND=60 645 ∗ 16.18.77 TidyTagLI=61 645 ∗ 16.18.78 TidyTagLINK=62 645 ∗ 16.18.79 TidyTagLISTING=63 645 ∗ 16.18.80 TidyTagMAIN=137 646 ∗ 16.18.81 TidyTagMAP=64 646 ∗ 16.18.82 TidyTagMARK=138 646 ∗ 16.18.83 TidyTagMARQUEE=66 646 ∗ 16.18.84 TidyTagMATHML=65 646 ∗ 16.18.85 TidyTagMENU=67 646 ∗ 16.18.86 TidyTagMENUITEM=139 647 ∗ 16.18.87 TidyTagMETA=68 647 ∗ 16.18.88 TidyTagMETER=140 647 ∗ 16.18.89 TidyTagMULTICOL=69 647 ∗ 16.18.90 TidyTagNAV=141 647 ∗ 16.18.91 TidyTagNEXTID=122 647 ∗ 16.18.92 TidyTagNOBR=70 648 ∗ 16.18.93 TidyTagNOEMBED=71 648 ∗ 16.18.94 TidyTagNOFRAMES=72 648 ∗ 16.18.95 TidyTagNOLAYER=73 648 68 CHAPTER 1. LIST OF TOPICS ∗ 16.18.96 TidyTagNOSAVE=74 648 ∗ 16.18.97 TidyTagNOSCRIPT=75 648 ∗ 16.18.98 TidyTagOBJECT=76 649 ∗ 16.18.99 TidyTagOL=77 649 ∗ 16.18.100 TidyTagOPTGROUP=78 649 ∗ 16.18.101 TidyTagOPTION=79 649 ∗ 16.18.102 TidyTagOUTPUT=142 649 ∗ 16.18.103 TidyTagP=80 650 ∗ 16.18.104 TidyTagPARAM=81 650 ∗ 16.18.105 TidyTagPICTURE=82 650 ∗ 16.18.106 TidyTagPLAINTEXT=83 650 ∗ 16.18.107 TidyTagPRE=84 650 ∗ 16.18.108 TidyTagPROGRESS=143 650 ∗ 16.18.109 TidyTagQ=85 651 ∗ 16.18.110 TidyTagRB=86 651 ∗ 16.18.111 TidyTagRBC=87 651 ∗ 16.18.112 TidyTagRP=88 651 ∗ 16.18.113 TidyTagRT=89 651 ∗ 16.18.114 TidyTagRTC=90 651 ∗ 16.18.115 TidyTagRUBY=91 652 ∗ 16.18.116 TidyTagS=92 652 ∗ 16.18.117 TidyTagSAMP=93 652 ∗ 16.18.118 TidyTagSCRIPT=94 652 ∗ 16.18.119 TidyTagSECTION=144 652 ∗ 16.18.120 TidyTagSELECT=95 652 ∗ 16.18.121 TidyTagSERVER=96 653 ∗ 16.18.122 TidyTagSERVLET=97 653 ∗ 16.18.123 TidyTagSMALL=98 653 ∗ 16.18.124 TidyTagSOURCE=145 653 ∗ 16.18.125 TidyTagSPACER=99 653 ∗ 16.18.126 TidyTagSPAN=100 653 ∗ 16.18.127 TidyTagSTRIKE=101 654 ∗ 16.18.128 TidyTagSTRONG=102 654 ∗ 16.18.129 TidyTagSTYLE=103 654 ∗ 16.18.130 TidyTagSUB=104 654 ∗ 16.18.131 TidyTagSUMMARY=146 654 ∗ 16.18.132 TidyTagSUP=105 654 ∗ 16.18.133 TidyTagSVG=106 655 ∗ 16.18.134 TidyTagTABLE=107 655 ∗ 16.18.135 TidyTagTBODY=108 655 ∗ 16.18.136 TidyTagTD=109 655 ∗ 16.18.137 TidyTagTEMPLATE=147 655 69 ∗ 16.18.138 TidyTagTEXTAREA=110 655 ∗ 16.18.139 TidyTagTFOOT=111 656 ∗ 16.18.140 TidyTagTH=112 656 ∗ 16.18.141 TidyTagTHEAD=113 656 ∗ 16.18.142 TidyTagTIME=148 656 ∗ 16.18.143 TidyTagTITLE=114 656 ∗ 16.18.144 TidyTagTR=115 656 ∗ 16.18.145 TidyTagTRACK=149 657 ∗ 16.18.146 TidyTagTT=116 657 ∗ 16.18.147 TidyTagU=117 657 ∗ 16.18.148 TidyTagUL=118 657 ∗ 16.18.149 TidyTagUNKNOWN=0 657 ∗ 16.18.150 TidyTagVAR=119 657 ∗ 16.18.151 TidyTagVIDEO=150 658 ∗ 16.18.152 TidyTagWBR=120 658 ∗ 16.18.153 TidyTagXMP=121 658 – 16.19.1 module TidyTriStateMBS 659 ∗ 16.19.3 TidyAutoState=2 659 ∗ 16.19.4 TidyNoState=0 659 ∗ 16.19.5 TidyYesState=1 659 70 CHAPTER 1. LIST OF TOPICS Chapter 2

List of all classes

• ClipperEngineMBS 113

• ClipperExceptionMBS 126

• ClipperOffsetMBS 138

• ClipperPathMBS 144

• ClipperPathsMBS 151

• ClipperPointMBS 155

• ClipperPolyNodeMBS 157

• ClipperPolyNodesMBS 160

• ClipperPolyTreeMBS 163

• CUPSDestinationMBS 165

• CUPSErrorExceptionMBS 168

• CUPSJobMBS 169

• CUPSMissingFunctionExceptionMBS 206

• CUPSOptionMBS 207

• JavaScriptDateComponentsMBS 209

• JavaScriptEngineExceptionMBS 213

• JavaScriptEngineMBS 214

• LGLAbortedExceptionMBS 377

• LGLMBS 378

71 72 CHAPTER 2. LIST OF ALL CLASSES • LMFitControlMBS 229

• LMFitMBS 233

• LMFitStatusMBS 238

• LTCDecoderMBS 661

• LTCEncoderMBS 669

• LTCFrameExtMBS 677

• LTCFrameMBS 680

• LTCSMPTETimecodeMBS 696

• MarkdownDocumentMBS 241

• MarkdownFootnoteMBS 250

• MarkdownLineMBS 253

• MarkdownParagraphMBS 257

• PHPMBS 263

• RegExMBS 271

• RFCClassDescriptionMBS 313

• RFCConnectionAttributesMBS 316

• RFCConnectionMBS 322

• RFCContainerMBS 329

• RFCErrorExceptionMBS 339

• RFCExceptionDescriptionMBS 340

• RFCFieldDescriptionMBS 341

• RFCFunctionDescriptionMBS 344

• RFCFunctionMBS 348

• RFCParameterDescriptionMBS 362

• RFCStructureMBS 366

• RFCTableMBS 367

• RFCTransactionMBS 371

• RFCTypeDescriptionMBS 373

• SmartCardContextMBS 401 73 • SmartCardMBS 417 • SoundFileInfoMBS 77 • SoundFileMBS 91 • TagLibAudioPropertiesMBS 103 • TagLibFileRefMBS 105 • TagLibTagMBS 109 • TextConverterMBS 439 • TidyAttributeMBS 451 • TidyDocumentMBS 521 • TidyInputMBS 572 • TidyIteratorMBS 573 • TidyNodeMBS 575 • TidyOptionMBS 624 • TidyOutputMBS 628 74 CHAPTER 2. LIST OF ALL CLASSES Chapter 3

List of all modules

• ClipperMBS 127 • CUPSMBS 176 • LTCMBS 691 • RFCModuleMBS 350 • TidyAttrIdMBS 462 • TidyConfigCategoryMBS 517 • TidyDoctypeModesMBS 519 • TidyDupAttrModesMBS 571 • TidyLineEndingMBS 574 • TidyNodeTypeMBS 604 • TidyOptionIdMBS 607 • TidyOptionTypeMBS 627 • TidyReportLevelKeysMBS 629 • TidyReportLevelMBS 631 • TidyTagIdMBS 633 • TidyTriStateMBS 659

75 76 CHAPTER 3. LIST OF ALL MODULES Chapter 4

Audio

4.1 class SoundFileInfoMBS

4.1.1 class SoundFileInfoMBS

Plugin Version: 17.4, Platforms: macOS, , Windows, Targets: All. Function: The class for the file info of a sound file. Notes: When you open a sound file, the library will fill this and provide you the file format details. When writing a sound file, you need to build valid format.

4.1.2 Properties

4.1.3 Channels as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The number of channels. Notes: (Read and Write property)

4.1.4 Format as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The format ID. Notes:

77 78 CHAPTER 4. AUDIO See kFormat constants. (Read and Write property)

4.1.5 FormatEndianName as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The endian description for the format. Notes: (Read only property)

4.1.6 FormatName as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The format description for the format. Notes: (Read only property)

4.1.7 FormatSubName as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The sub format description for the format. Notes: (Read only property)

4.1.8 Frames as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The number of frames. Notes: (Read and Write property)

4.1.9 IsValid as Boolean

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether format is valid. Notes: Returns true if valid. (Read only property) 4.1. CLASS SOUNDFILEINFOMBS 79

4.1.10 SampleRate as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The sample rate in Hz. Notes: (Read and Write property)

4.1.11 Sections as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The number of sections. Notes: (Read and Write property)

4.1.12 Seekable as Boolean

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether format is seekable. Notes: (Read and Write property)

4.1.13 Constants

4.1.14 kFormatAIFF = & h020000

Plugin Version: 17.4. Function: One of the format constants. Notes: Apple/SGI AIFF format (big endian).

4.1.15 kFormatALAC16 = & h0070

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Apple Lossless Audio Codec (16 bit). 80 CHAPTER 4. AUDIO 4.1.16 kFormatALAC20 = & h0071

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Apple Lossless Audio Codec (20 bit).

4.1.17 kFormatALAC24 = & h0072

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Apple Lossless Audio Codec (24 bit).

4.1.18 kFormatALAC32 = & h0073

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Apple Lossless Audio Codec (32 bit).

4.1.19 kFormatALAW = & h0011

Plugin Version: 17.4. Function: One of the sub format constants. Notes: A-Law encoded.

4.1.20 kFormatAU = & h030000

Plugin Version: 17.4. Function: One of the format constants. Notes: Sun/NeXT AU format (big endian).

4.1.21 kFormatAVR = & h120000

Plugin Version: 17.4. 4.1. CLASS SOUNDFILEINFOMBS 81 Function: One of the format constants. Notes: Audio Visual Research

4.1.22 kFormatCAF = & h180000

Plugin Version: 17.4. Function: One of the format constants. Notes: Core Audio File format

4.1.23 kFormatDouble = & h0007

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 64 bit float data

4.1.24 kFormatDPCM_16 = & h0051

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 16 bit differential PCM (XI only)

4.1.25 kFormatDPCM_8 = & h0050

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 8 bit differential PCM (XI only)

4.1.26 kFormatDWVW_12 = & h0040

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 12 bit Delta Width Variable Word encoding. 82 CHAPTER 4. AUDIO 4.1.27 kFormatDWVW_16 = & h0041

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 16 bit Delta Width Variable Word encoding.

4.1.28 kFormatDWVW_24 = & h0042

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 24 bit Delta Width Variable Word encoding.

4.1.29 kFormatDWVW_N = & h0043

Plugin Version: 17.4. Function: One of the sub format constants. Notes: N bit Delta Width Variable Word encoding.

4.1.30 kFormatEndianBig = & h20000000

Plugin Version: 17.4. Function: One of the endian format constants. Notes: Force big endian-ness.

4.1.31 kFormatEndianCPU = & h30000000

Plugin Version: 17.4. Function: One of the endian format constants. Notes: Force CPU endian-ness.

4.1.32 kFormatEndianFile = & h00000000

Plugin Version: 17.4. 4.1. CLASS SOUNDFILEINFOMBS 83 Function: One of the endian format constants. Notes: Default file endian-ness.

4.1.33 kFormatEndianLittle = & h10000000

Plugin Version: 17.4. Function: One of the endian format constants. Notes: Force little endian-ness.

4.1.34 kFormatEndianMask = & h30000000

Plugin Version: 17.4. Function: One of the format constants. Notes: Bitmask for the endian format.

4.1.35 kFormatFLAC = & h170000

Plugin Version: 17.4. Function: One of the format constants. Notes: FLAC lossless file format

4.1.36 kFormatFloat = & h0006

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 32 bit float data

4.1.37 kFormatG721_32 = & h0030

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 32kbs G721 ADPCM encoding. 84 CHAPTER 4. AUDIO 4.1.38 kFormatG723_24 = & h0031

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 24kbs G723 ADPCM encoding.

4.1.39 kFormatG723_40 = & h0032

Plugin Version: 17.4. Function: One of the sub format constants. Notes: 40kbs G723 ADPCM encoding.

4.1.40 kFormatGSM610 = & h0020

Plugin Version: 17.4. Function: One of the sub format constants. Notes: GSM 6.10 encoding.

4.1.41 kFormatHTK = & h100000

Plugin Version: 17.4. Function: One of the format constants. Notes: HMM Tool Kit format

4.1.42 kFormatIMA_ADPCM = & h0012

Plugin Version: 17.4. Function: One of the sub format constants. Notes: IMA ADPCM.

4.1.43 kFormatIRCAM = & h0A0000

Plugin Version: 17.4. 4.1. CLASS SOUNDFILEINFOMBS 85 Function: One of the format constants. Notes: Berkeley/IRCAM/CARL

4.1.44 kFormatMAT4 = & h0C0000

Plugin Version: 17.4. Function: One of the format constants. Notes: Matlab (tm) V4.2 / GNU Octave 2.0

4.1.45 kFormatMAT5 = & h0D0000

Plugin Version: 17.4. Function: One of the format constants. Notes: Matlab (tm) V5.0 / GNU Octave 2.1

4.1.46 kFormatMPC2K = & h210000

Plugin Version: 17.4. Function: One of the format constants. Notes: Akai MPC 2000 sampler

4.1.47 kFormatMS_ADPCM = & h0013

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Microsoft ADPCM.

4.1.48 kFormatNIST = & h070000

Plugin Version: 17.4. Function: One of the format constants. Notes: Sphere NIST format. 86 CHAPTER 4. AUDIO 4.1.49 kFormatOGG = & h200000

Plugin Version: 17.4. Function: One of the format constants. Notes: Xiph OGG container

4.1.50 kFormatPAF = & h050000

Plugin Version: 17.4. Function: One of the format constants. Notes: Ensoniq PARIS file format.

4.1.51 kFormatPCM16 = & h0002

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Signed 16 bit data

4.1.52 kFormatPCM24 = & h0003

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Signed 24 bit data

4.1.53 kFormatPCM32 = & h0004

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Signed 32 bit data

4.1.54 kFormatPCMS8 = & h0001

Plugin Version: 17.4. 4.1. CLASS SOUNDFILEINFOMBS 87 Function: One of the sub format constants. Notes: Signed 8 bit data

4.1.55 kFormatPCMU8 = & h0005

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Unsigned 8 bit data (WAV and RAW only)

4.1.56 kFormatPVF = & h0E0000

Plugin Version: 17.4. Function: One of the format constants. Notes: Portable Voice Format

4.1.57 kFormatRAW = & h040000

Plugin Version: 17.4. Function: One of the format constants. Notes: RAW PCM data.

4.1.58 kFormatRF64 = & h220000

Plugin Version: 17.4. Function: One of the format constants. Notes: RF64 WAV file

4.1.59 kFormatSD2 = & h160000

Plugin Version: 17.4. Function: One of the format constants. Notes: Sound Designer 2 88 CHAPTER 4. AUDIO 4.1.60 kFormatSDS = & h110000

Plugin Version: 17.4. Function: One of the format constants. Notes: Midi Sample Dump Standard

4.1.61 kFormatSubMask = & h0000FFFF

Plugin Version: 17.4. Function: One of the format constants. Notes: Bitmask for the sub format.

4.1.62 kFormatSVX = & h060000

Plugin Version: 17.4. Function: One of the format constants. Notes: Amiga IFF / SVX8 / SV16 format.

4.1.63 kFormatTypeMask = & h0FFF0000

Plugin Version: 17.4. Function: One of the format constants. Notes: Bitmask for the type format.

4.1.64 kFormatULAW = & h0010

Plugin Version: 17.4. Function: One of the sub format constants. Notes: U-Law encoded.

4.1.65 kFormatVOC = & h080000

Plugin Version: 17.4. 4.1. CLASS SOUNDFILEINFOMBS 89 Function: One of the format constants. Notes: VOC files.

4.1.66 kFormatVORBIS = & h0060

Plugin Version: 17.4. Function: One of the sub format constants. Notes: Xiph encoding.

4.1.67 kFormatVOX_ADPCM = & h0021

Plugin Version: 17.4. Function: One of the sub format constants. Notes: OKI / Dialogix ADPCM

4.1.68 kFormatW64 = & h0B0000

Plugin Version: 17.4. Function: One of the format constants. Notes: Sonic Foundry’s 64 bit RIFF/WAV

4.1.69 kFormatWAV = & h010000

Plugin Version: 17.4. Function: One of the format constants. Notes: Microsoft WAV format (little endian default).

4.1.70 kFormatWAVEX = & h130000

Plugin Version: 17.4. Function: One of the format constants. Notes: MS WAVE with WAVEFORMATEX 90 CHAPTER 4. AUDIO 4.1.71 kFormatWVE = & h190000

Plugin Version: 17.4. Function: One of the format constants. Notes: Psion WVE format

4.1.72 kFormatXI = & h0F0000

Plugin Version: 17.4. Function: One of the format constants. Notes: Fasttracker 2 Extended Instrument 4.2. CLASS SOUNDFILEMBS 91 4.2 class SoundFileMBS

4.2.1 class SoundFileMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: A cross platform class to use sndfile library to read/write audio samples. Notes: As sndfile library is LGPL, you need to include library within your app folder and load it atruntime. This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

4.2.2 Blog Entries

• MBS Xojo Plugins, version 17.4pr3

• LibSndfile and TagLib plugins for Xojo

4.2.3 Videos

• Presentation from Munich conference about MBS Plugins.

4.2.4 Blog Entries

• MBS Xojo Plugins, version 17.4pr3

• LibSndfile and TagLib plugins for Xojo

4.2.5 Videos

• Presentation from Munich conference about MBS Plugins.

4.2.6 Methods

4.2.7 Close

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Closes file now. Notes: Same as destructor, but you can call it early. 92 CHAPTER 4. AUDIO 4.2.8 Constructor

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Private constructor.

4.2.9 Create(file as folderitem, Info as SoundFileInfoMBS) as SoundFileMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new audio file with given format. Notes: On success returns new sound file object.

4.2.10 ErrorMessage(errorNumber as integer) as string

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries error message for error number. See also:

• 4.2.42 ErrorMessage as String 99

4.2.11 GetString(type as Integer) as string

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries one of the strings. Notes: See kString* constants. Returns ”” in case of error.

4.2.12 Loaded as Boolean

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether library is loaded.

4.2.13 LoadErrorMessage as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. 4.2. CLASS SOUNDFILEMBS 93 Function: The error message from loading library.

4.2.14 LoadLibrary(file as folderitem) as boolean

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Loads sndfile library. Notes: Returns true on error.

4.2.15 Open(data as MemoryBlock) as SoundFileMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Opens an audio file from in memory data. Notes: On success returns the sound file object. See also:

• 4.2.16 Open(data as String) as SoundFileMBS 93

• 4.2.17 Open(file as folderitem, readwrite As Boolean = False) as SoundFileMBS 93

4.2.16 Open(data as String) as SoundFileMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Opens an audio file from in memory data. Notes: On success returns the sound file object. See also:

• 4.2.15 Open(data as MemoryBlock) as SoundFileMBS 93

• 4.2.17 Open(file as folderitem, readwrite As Boolean = False) as SoundFileMBS 93

4.2.17 Open(file as folderitem, readwrite As Boolean = False) as SoundFileMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Opens an audio file. Notes: On success returns the sound file object. Pass readwrite = true to write to the file. See also: 94 CHAPTER 4. AUDIO • 4.2.15 Open(data as MemoryBlock) as SoundFileMBS 93

• 4.2.16 Open(data as String) as SoundFileMBS 93

4.2.18 ReadDouble(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads data as double values, converts if necessary. Notes: Pointer should point to memmoryblock with 8 * Items in size. Returns number of items read.

4.2.19 ReadDoubleFrames(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads frames as double values, converts if necessary. Notes: Pointer should point to memmoryblock with 8 * Items * Channels in size. Returns number of items read.

4.2.20 ReadInt(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads data as Int32 values, converts if necessary. Notes: Pointer should point to memmoryblock with 4 * Items in size. Returns number of items read.

4.2.21 ReadIntFrames(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads frames as Int32 values, converts if necessary. Notes: Pointer should point to memmoryblock with 4 * Items * Channels in size. Returns number of items read. 4.2. CLASS SOUNDFILEMBS 95 4.2.22 ReadRaw(p as ptr, bytes as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Read raw data. Notes: Pointer should point to memmoryblock with Bytes in size. Returns number of bytes read.

4.2.23 ReadShort(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads data as Int16 values, converts if necessary. Notes: Pointer should point to memmoryblock with 2 * Items in size. Returns number of items read.

4.2.24 ReadShortFrames(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads frames as Int16 values, converts if necessary. Notes: Pointer should point to memmoryblock with 2 * Items * Channels in size. Returns number of items read.

4.2.25 ReadSingle(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads data as single values, converts if necessary. Notes: Pointer should point to memmoryblock with 4 * Items in size. Returns number of items read.

4.2.26 ReadSingleFrames(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. 96 CHAPTER 4. AUDIO Function: Reads frames as single values, converts if necessary. Notes: Pointer should point to memmoryblock with 4 * Items * Channels in size. Returns number of items read.

4.2.27 Seek(frames as Int64, whence as Integer) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Seeks within the audio file. Notes: See kSeek* constants for whence parameter.

4.2.28 SetString(type as Integer, data as Memoryblock) as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets one of the strings. Notes: See kString* constants. Returns zero on success. See also:

• 4.2.29 SetString(type as Integer, text as string) as Integer 96

4.2.29 SetString(type as Integer, text as string) as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets one of the strings. Notes: See kString* constants. Returns zero on success. See also:

• 4.2.28 SetString(type as Integer, data as Memoryblock) as Integer 96

4.2.30 Version as string

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries version of the library. 4.2. CLASS SOUNDFILEMBS 97 4.2.31 WriteDouble(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Writes data to file in double format. Notes: Pointer should point to memmoryblock with 8 * Items in size. Returns number of items written.

4.2.32 WriteDoubleFrames(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Writes frames to file in double format. Notes: Pointer should point to memmoryblock with 8 * Items * Channels in size. Returns number of items written.

4.2.33 WriteInt(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Writes data to file in Int32 format. Notes: Pointer should point to memmoryblock with 4 * Items in size. Returns number of items written.

4.2.34 WriteIntFrames(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Writes frames to file in Int32 format. Notes: Pointer should point to memmoryblock with 4 * Items * Channels in size. Returns number of items written.

4.2.35 WriteRaw(p as ptr, bytes as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. 98 CHAPTER 4. AUDIO Function: Writes raw data to file. Notes: Pointer should point to memmoryblock with Bytes in size. Returns number of bytes written.

4.2.36 WriteShort(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Writes data to file in Int16 format. Notes: Pointer should point to memmoryblock with 2 * Items in size. Returns number of items written.

4.2.37 WriteShortFrames(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Writes frames to file in Int16 format. Notes: Pointer should point to memmoryblock with 2 * Items * Channels in size. Returns number of items written.

4.2.38 WriteSingle(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Writes data to file in single format. Notes: Pointer should point to memmoryblock with 4 * Items in size. Returns number of items written.

4.2.39 WriteSingleFrames(p as ptr, items as Int64) as Int64

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Writes frames to file in single format. Notes: 4.2. CLASS SOUNDFILEMBS 99 Pointer should point to memmoryblock with 4 * Items * Channels in size. Returns number of items written.

4.2.40 WriteSync

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Writes recent changes in file to disk.

4.2.41 Properties

4.2.42 ErrorMessage as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The last error message. Notes: (Read only property) See also:

• 4.2.10 ErrorMessage(errorNumber as integer) as string 92

4.2.43 ErrorNumber as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The last error number. Notes: (Read only property)

4.2.44 Handle as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

4.2.45 Info as SoundFileInfoMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. 100 CHAPTER 4. AUDIO Function: Queries current format. Notes: (Read only property)

4.2.46 Constants

4.2.47 kSeekCurrent = 1

Plugin Version: 17.4. Function: One of the seek mode constants. Notes: Seek relative to current position.

4.2.48 kSeekEnd = 2

Plugin Version: 17.4. Function: One of the seek mode constants. Notes: Seek relative to end.

4.2.49 kSeekSet = 0

Plugin Version: 17.4. Function: One of the seek mode constants. Notes: Seek relative to begin.

4.2.50 kStringAlbum = 7

Plugin Version: 17.4. Function: One of the string constants. Notes: Album

4.2.51 kStringArtist = 4

Plugin Version: 17.4. Function: One of the string constants. Notes: Artist 4.2. CLASS SOUNDFILEMBS 101 4.2.52 kStringComment = 5

Plugin Version: 17.4. Function: One of the string constants. Notes: Comment

4.2.53 kStringCopyright = 2

Plugin Version: 17.4. Function: One of the string constants. Notes: Copyright

4.2.54 kStringDate = 6

Plugin Version: 17.4. Function: One of the string constants. Notes: Date

4.2.55 kStringGenre = 10

Plugin Version: 17.4. Function: One of the string constants. Notes: Genre

4.2.56 kStringLicense = 8

Plugin Version: 17.4. Function: One of the string constants. Notes: License

4.2.57 kStringSoftware = 3

Plugin Version: 17.4. 102 CHAPTER 4. AUDIO Function: One of the string constants. Notes: Software

4.2.58 kStringTitle = 1

Plugin Version: 17.4. Function: One of the string constants. Notes: Title

4.2.59 kStringTrackNumber = 9

Plugin Version: 17.4. Function: One of the string constants. Notes: Track Number. 4.3. CLASS TAGLIBAUDIOPROPERTIESMBS 103 4.3 class TagLibAudioPropertiesMBS

4.3.1 class TagLibAudioPropertiesMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for audio properties.

4.3.2 Properties

4.3.3 Bitrate as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The bit rate for the sound. Notes: Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate. (Read and Write property)

4.3.4 Channels as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The number of channels. Notes: (Read and Write property)

4.3.5 Length as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The length of the file in second. Notes: (Read and Write property)

4.3.6 SampleRate as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The sample rate in Hz. Notes: (Read and Write property) 104 CHAPTER 4. AUDIO 4.4. CLASS TAGLIBFILEREFMBS 105 4.4 class TagLibFileRefMBS

4.4.1 class TagLibFileRefMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for file loading in TagLib. Notes: Uses TagLib, an open source library to read metadata from audio files, e.g. ID3 tags. Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, , WavPack, TrueAudio, WAV, AIFF, MP4 and ASF files.

4.4.2 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 19.4

• MBS Xojo Plugins, version 19.4pr8

• TagLib to write ID3v2 Tags in Xojo

• MBS Xojo Plugins, version 19.3pr4

• MBS Xojo Plugins, version 19.3pr3

• MBS Xojo Plugins, version 17.5pr1

4.4.3 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 19.4

• MBS Xojo Plugins, version 19.4pr8

• TagLib to write ID3v2 Tags in Xojo

• MBS Xojo Plugins, version 19.3pr4

• MBS Xojo Plugins, version 19.3pr3

• MBS Xojo Plugins, version 17.5pr1

4.4.4 Methods

4.4.5 Constructor(file as folderitem)

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. 106 CHAPTER 4. AUDIO Function: The constructor. Notes: Please point to valid audio file. May raise error exception.

Uses TagLib, an open source library to read metadata from audio files, e.g. ID3 tags. Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack, TrueAudio, WAV, AIFF, MP4 and ASF files.

4.4.6 Save as Boolean

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Saves changes to the file.

4.4.7 SetProperties(Dic as Dictionary)

Plugin Version: 19.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets audio tags for audio file. Example: Dim file As FolderItem = SpecialFolder.Desktop.Child(”test.”)

Dim tag As New TagLibFileRefMBS(file) Dim dic As Dictionary = tag.Properties

Break // inspect dictionary

dic.Value(”ARTIST”) = ”John Doe” dic.Value(”ALBUM”) = Nil // clear this one

tag.SetProperties(dic)

If tag.Save Then MsgBox ”OK” Else MsgBox ”Failed to save” End If

Notes: Please provide dictionary with new tags. 4.4. CLASS TAGLIBFILEREFMBS 107 If tags are nil values, we remove them. If they are text values, we update the text.

4.4.8 Properties

4.4.9 audioProperties as TagLibAudioPropertiesMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries audio properties of the audio file. Notes: (Read only property)

4.4.10 Handle as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

4.4.11 Properties as Dictionary

Plugin Version: 19.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries properties for this file. Notes: Builds and returns a dictionary with all the properties found by the file handler. This may include IDv3 tags.

List of ID3v2 tag names: ALBUM, ALBUMARTIST, ALBUMARTISTSORT, ALBUMSORT, ARTIST, ARTISTSORT, ARTIST- WEBPAGE, AUDIOSOURCEWEBPAGE, BPM, COMMENT, COMPOSER, CONDUCTOR, CONTENT- GROUP, COPYRIGHT, COPYRIGHTURL, DATE, DISCNUMBER, ENCODEDBY, ENCODING, EN- CODINGTIME, FILETYPE, FILEWEBPAGE, GENRE, INITIALKEY, INVOLVEDPEOPLE, ISRC, LA- BEL, LANGUAGE, LENGTH, LYRICIST, LYRICS, MEDIA, MOOD, MUSICIANCREDITS, ORIGINALAL- BUM, ORIGINALARTIST, ORIGINALDATE, ORIGINALFILENAME, ORIGINALLYRICIST, OWNER, PAYMENTWEBPAGE, PLAYLISTDELAY, PODCAST, PODCASTCATEGORY, PODCASTDESC, POD- CASTID, PODCASTURL, PRODUCEDNOTICE, PUBLISHERWEBPAGE, RADIOSTATION, RADIO- STATIONOWNER, RADIOSTATIONWEBPAGE, RELEASEDATE, REMIXER, SUBTITLE, TAGGING- DATE, TITLE, TITLESORT, TRACKNUMBER, URL. (Read only property) 108 CHAPTER 4. AUDIO 4.4.12 tags as TagLibTagMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The tags in that file. Notes: (Read only property) 4.5. CLASS TAGLIBTAGMBS 109 4.5 class TagLibTagMBS

4.5.1 class TagLibTagMBS

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for tags. Notes: We do have common values in properties like title, comment and track. Other properties can be found in tags dictionary.

Please use TagLibFileRefMBS to load file and query it for the tags.

This is an attempt to abstract away the difference in the meta data formats of various audio codecs and tagging schemes. As such it is generally a subset of what is available in the specific formats but should be suitable for most applications. This is meant to compliment the generic APIs found in TagLibAudioProper- tiesMBS and TagLibFileRefMBS. This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

4.5.2 Blog Entries

• MBS Xojo Plugins, version 17.4pr3

• LibSndfile and TagLib plugins for Xojo

4.5.3 Videos

• XDC 2020 MBS Plugins Presentation

• Presentation from Munich conference about MBS Plugins.

4.5.4 Blog Entries

• MBS Xojo Plugins, version 17.4pr3

• LibSndfile and TagLib plugins for Xojo

4.5.5 Videos

• XDC 2020 MBS Plugins Presentation

• Presentation from Munich conference about MBS Plugins. 110 CHAPTER 4. AUDIO 4.5.6 Methods

4.5.7 Constructor

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

4.5.8 setTags(Values as Dictionary) as Dictionary

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets the tags. Notes: Returns a new dictionary with values which are not supported.

4.5.9 Properties

4.5.10 Album as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The name of the album. Notes: (Read and Write property)

4.5.11 Artist as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The name of the artist. Notes: (Read and Write property)

4.5.12 Comment as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The comment field. Notes: (Read and Write property) 4.5. CLASS TAGLIBTAGMBS 111 4.5.13 Genre as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The genre. Notes: (Read and Write property)

4.5.14 Handle as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

4.5.15 isEmpty as Boolean

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this tag set is empty. Notes: (Read only property)

4.5.16 Tags as Dictionary

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries list of properties. Notes: You get a copy as a dictionary with all keys and values. Values could be strings or array of strings. (Read only property)

4.5.17 Title as String

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The title. Notes: (Read and Write property) 112 CHAPTER 4. AUDIO 4.5.18 Track as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The track number. Notes: (Read and Write property)

4.5.19 Year as Integer

Plugin Version: 17.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The year. Notes: (Read and Write property) Chapter 5

Clipper

5.1 class ClipperEngineMBS

5.1.1 class ClipperEngineMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The Clipper class encapsulates boolean operations on polygons (intersection, union, difference and XOR), which is also called polygon clipping. Notes: Input polygons, both subject and clip sets, are passed to a Clipper object by its AddPath and Ad- dPaths methods, and the clipping operation is performed by calling its Execute method. Multiple boolean operations can be performed on the same input polygon sets by repeat calls to Execute.

5.1.2 Videos

• Presentation from Munich conference about MBS Plugins.

5.1.3 Videos

• Presentation from Munich conference about MBS Plugins.

5.1.4 Methods

5.1.5 AddPath(path as ClipperPathMBS, PolyType as ClipperMBS.PolyType, Closed as Boolean) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All.

113 114 CHAPTER 5. CLIPPER Function: Any number of subject and clip paths can be added to a clipping task, either individually via the AddPath() method, or as groups via the AddPaths() method, or even using both methods. Notes: ’Subject’ paths may be either open (lines) or closed (polygons) or even a mixture of both, but ’clipping’ paths must always be closed. Clipper allows polygons to clip both lines and other polygons, but doesn’t allow lines to clip either lines or polygons.

With closed paths, orientation should conform with the filling rule that will be passed via Clippper’s Execute method.

Path Coordinate range: Path coordinates must be between ± & h3FFFFFFFFFFFFFFF (± 4.6e+18), otherwise a range error will be thrown when attempting to add the path to the Clipper object. If coordinates can be kept between ± 0x3FFFFFFF (± 1.0e+9), a modest increase in performance (approx. 15-20% ) over the larger range can be achieved by avoiding large integer math.

Return Value: The function will return false if the path is invalid for clipping. A path is invalid for clipping when:

• it has less than 2 vertices

• it has 2 vertices but is not an open path

• the vertices are all co-linear and it is not an open path

Returns true on success. See also:

• 5.1.6 AddPath(path as ClipperPathMBS, PolyType as Integer, Closed as Boolean) as Boolean 114

5.1.6 AddPath(path as ClipperPathMBS, PolyType as Integer, Closed as Boolean) as Boolean

Plugin Version: 18.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Any number of subject and clip paths can be added to a clipping task, either individually via the AddPath() method, or as groups via the AddPaths() method, or even using both methods. See also:

• 5.1.5 AddPath(path as ClipperPathMBS, PolyType as ClipperMBS.PolyType, Closed as Boolean) as Boolean 113 5.1. CLASS CLIPPERENGINEMBS 115 5.1.7 AddPaths(paths as ClipperPathsMBS, PolyType as ClipperMBS.Poly- Type, Closed as Boolean) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Any number of subject and clip paths can be added to a clipping task, either individually via the AddPath() method, or as groups via the AddPaths() method, or even using both methods. Notes: ’Subject’ paths may be either open (lines) or closed (polygons) or even a mixture of both, but ’clipping’ paths must always be closed. Clipper allows polygons to clip both lines and other polygons, but doesn’t allow lines to clip either lines or polygons.

With closed paths, orientation should conform with the filling rule that will be passed via Clippper’s Execute method.

Path Coordinate range: Path coordinates must be between ± & h3FFFFFFFFFFFFFFF (± 4.6e+18), otherwise a range error will be thrown when attempting to add the path to the Clipper object. If coordinates can be kept between ± 0x3FFFFFFF (± 1.0e+9), a modest increase in performance (approx. 15-20% ) over the larger range can be achieved by avoiding large integer math.

Return Value: The function will return false if the path is invalid for clipping. A path is invalid for clipping when:

• it has less than 2 vertices

• it has 2 vertices but is not an open path

• the vertices are all co-linear and it is not an open path

Returns true on success. See also:

• 5.1.8 AddPaths(paths as ClipperPathsMBS, PolyType as Integer, Closed as Boolean) as Boolean 115

5.1.8 AddPaths(paths as ClipperPathsMBS, PolyType as Integer, Closed as Boolean) as Boolean

Plugin Version: 18.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Any number of subject and clip paths can be added to a clipping task, either individually via the AddPath() method, or as groups via the AddPaths() method, or even using both methods. See also: 116 CHAPTER 5. CLIPPER • 5.1.7 AddPaths(paths as ClipperPathsMBS, PolyType as ClipperMBS.PolyType, Closed as Boolean) as Boolean 115

5.1.9 Clear

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The Clear method removes any existing subject and clip polygons allowing the Clipper object to be reused for clipping operations on different polygon sets.

5.1.10 Constructor(initOptions as integer = 0)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The Clipper constructor creates an instance of the Clipper class. Notes: One or more InitOptions may be passed as a parameter to set the corresponding properties. (These proper- ties can still be set or reset after construction.)

Options:

ReverseSolution 1 StrictlySimple 2 PreserveCollinear 4

5.1.11 Execute(clipType as ClipperMBS.ClipType, byref solution as Clipper- PathsMBS, fillType as ClipperMBS.PolyFillType) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper engine. See also:

• 5.1.12 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.13 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.14 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, subjFill- Type as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 118 5.1. CLASS CLIPPERENGINEMBS 117 • 5.1.15 Execute(clipType as Integer, byref solution as ClipperPathsMBS, fillType as Integer) as Boolean 119

• 5.1.16 Execute(clipType as Integer, byref solution as ClipperPathsMBS, subjFillType as Integer, clip- FillType as Integer) as Boolean 120

• 5.1.17 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fillType as Integer) as Boolean 121

• 5.1.18 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean 121

5.1.12 Execute(clipType as ClipperMBS.ClipType, byref solution as Clipper- PathsMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper engine. See also:

• 5.1.11 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType) as Boolean 116

• 5.1.13 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.14 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, subjFill- Type as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 118

• 5.1.15 Execute(clipType as Integer, byref solution as ClipperPathsMBS, fillType as Integer) as Boolean 119

• 5.1.16 Execute(clipType as Integer, byref solution as ClipperPathsMBS, subjFillType as Integer, clip- FillType as Integer) as Boolean 120

• 5.1.17 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fillType as Integer) as Boolean 121

• 5.1.18 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean 121

5.1.13 Execute(clipType as ClipperMBS.ClipType, byref solution as Clipper- PolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper engine. See also: 118 CHAPTER 5. CLIPPER • 5.1.11 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType) as Boolean 116

• 5.1.12 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.14 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, subjFill- Type as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 118

• 5.1.15 Execute(clipType as Integer, byref solution as ClipperPathsMBS, fillType as Integer) as Boolean 119

• 5.1.16 Execute(clipType as Integer, byref solution as ClipperPathsMBS, subjFillType as Integer, clip- FillType as Integer) as Boolean 120

• 5.1.17 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fillType as Integer) as Boolean 121

• 5.1.18 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean 121

5.1.14 Execute(clipType as ClipperMBS.ClipType, byref solution as Clipper- PolyTreeMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper engine. See also:

• 5.1.11 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType) as Boolean 116

• 5.1.12 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.13 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.15 Execute(clipType as Integer, byref solution as ClipperPathsMBS, fillType as Integer) as Boolean 119

• 5.1.16 Execute(clipType as Integer, byref solution as ClipperPathsMBS, subjFillType as Integer, clip- FillType as Integer) as Boolean 120

• 5.1.17 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fillType as Integer) as Boolean 121

• 5.1.18 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean 121 5.1. CLASS CLIPPERENGINEMBS 119 5.1.15 Execute(clipType as Integer, byref solution as ClipperPathsMBS, fill- Type as Integer) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper engine. Notes: Once subject and clip paths have been assigned (via AddPath and/or AddPaths), Execute can then perform the clipping operation (intersection, union, difference or XOR) specified by the clipType parameter.

The solution parameter can be either a Paths or PolyTree. The Paths is simpler than the PolyTree. Because of this it is quicker to populate and hence clipping performance is a little better (it’s roughly 10% faster). However, the PolyTree class provides more information about the returned paths which may be important to users. Firstly, the PolyTree class preserves nested parent-child polygon relationships (ie outer polygons owning/containing holes and holes owning/containing other outer polygons etc). Also, only the PolyTree class can differentiate between open and closed paths since each PolyNode has an IsOpen property. (The Path structure has no member indicating whether it’s open or closed.) For this reason, when open paths are passed to a Clipper object, the user must use a PolyTree object as the solution parameter, otherwise an exception will be raised.

When a PolyTree object is used in a clipping operation on open paths, two ancilliary functions have been provided to quickly separate out open and closed paths from the solution - ClipperMBS.OpenPathsFromPoly- Tree and ClipperMBS.ClosedPathsFromPolyTree. PolyTreeToPaths is also available to convert path data to a Paths structure (irrespective of whether they’re open or closed).

There are several things to note about the solution paths returned:

• they aren’t in any specific order

• they should never overlap or be self-intersecting (but see notes on rounding)

• holes will be oriented opposite outer polygons

• the solution fill type can be considered either EvenOdd or NonZero since it will comply witheither filling rule

• polygons may rarely share a common edge (though this is now very rare as of version 6)

The subjFillType and clipFillType parameters define the polygon fill rule to be applied to the polygons (ie closed paths) in the subject and clip paths respectively. (It’s usual though obviously not essential that both sets of polygons use the same fill rule.)

Execute can be called multiple times without reassigning subject and clip polygons (ie when different clipping operations are required on the same polygon sets). See also: 120 CHAPTER 5. CLIPPER • 5.1.11 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType) as Boolean 116

• 5.1.12 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.13 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.14 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, subjFill- Type as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 118

• 5.1.16 Execute(clipType as Integer, byref solution as ClipperPathsMBS, subjFillType as Integer, clip- FillType as Integer) as Boolean 120

• 5.1.17 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fillType as Integer) as Boolean 121

• 5.1.18 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean 121

5.1.16 Execute(clipType as Integer, byref solution as ClipperPathsMBS, subj- FillType as Integer, clipFillType as Integer) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper engine. See also:

• 5.1.11 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType) as Boolean 116

• 5.1.12 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.13 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean 117

• 5.1.14 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, subjFill- Type as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 118

• 5.1.15 Execute(clipType as Integer, byref solution as ClipperPathsMBS, fillType as Integer) as Boolean 119

• 5.1.17 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fillType as Integer) as Boolean 121

• 5.1.18 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean 121 5.1. CLASS CLIPPERENGINEMBS 121 5.1.17 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fill- Type as Integer) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper engine. See also:

• 5.1.11 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType) as Boolean 116 • 5.1.12 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 117 • 5.1.13 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean 117 • 5.1.14 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, subjFill- Type as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 118 • 5.1.15 Execute(clipType as Integer, byref solution as ClipperPathsMBS, fillType as Integer) as Boolean 119 • 5.1.16 Execute(clipType as Integer, byref solution as ClipperPathsMBS, subjFillType as Integer, clip- FillType as Integer) as Boolean 120 • 5.1.18 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean 121

5.1.18 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper engine. See also:

• 5.1.11 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType) as Boolean 116 • 5.1.12 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPathsMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 117 • 5.1.13 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean 117 • 5.1.14 Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, subjFill- Type as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean 118 • 5.1.15 Execute(clipType as Integer, byref solution as ClipperPathsMBS, fillType as Integer) as Boolean 119 122 CHAPTER 5. CLIPPER • 5.1.16 Execute(clipType as Integer, byref solution as ClipperPathsMBS, subjFillType as Integer, clip- FillType as Integer) as Boolean 120

• 5.1.17 Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fillType as Integer) as Boolean 121

5.1.19 GetBounds(byref left as integer, byref top as integer, byref right as in- teger, byref bottom as integer)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: This method returns the axis-aligned bounding rectangle of all polygons that have been added to the Clipper object. Notes: This call is more efficient than querying all bounds properties.

5.1.20 Properties

5.1.21 BoundsBottom as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Bottom of bounds. Notes: This method returns the bottom value of the axis-aligned bounding rectangle of all polygons that have been added to the Clipper object. (Read only property)

5.1.22 BoundsLeft as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Left of bounds. Notes: This method returns the left value of the axis-aligned bounding rectangle of all polygons that have been added to the Clipper object. (Read only property)

5.1.23 BoundsRight as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. 5.1. CLASS CLIPPERENGINEMBS 123 Function: Right of bounds. Notes: This method returns the right value of the axis-aligned bounding rectangle of all polygons that have been added to the Clipper object. (Read only property)

5.1.24 BoundsTop as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Top of bounds. Notes: This method returns the top value of the axis-aligned bounding rectangle of all polygons that have been added to the Clipper object. (Read only property)

5.1.25 Handle as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

5.1.26 Owner as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: To avoid Xojo freeing the parent too quick, we keep a reference here. (Read only property)

5.1.27 PreserveCollinear as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether to preserve collinear in input polygons. Notes: 124 CHAPTER 5. CLIPPER By default, when three or more vertices are collinear in input polygons (subject or clip), the Clipper object removes the ’inner’ vertices before clipping. When enabled the PreserveCollinear property prevents this default behavior to allow these inner vertices to appear in the solution. (Read and Write property)

5.1.28 ReverseSolution as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: When this property is set to true, polygons returned in the solution parameter of the Execute() method will have orientations opposite to their normal orientations. Notes: (Read and Write property)

5.1.29 StrictlySimple as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether to do strictly simple polygon. Notes: Terminology:

• A simple polygon is one that does not self-intersect.

• A weakly simple polygon is a simple polygon that contains ’touching’ vertices, or ’touching’ edges.

• A strictly simple polygon is a simple polygon that does not contain ’touching’ vertices, or ’touching’ edges.

Vertices ’touch’ if they share the same coordinates (and are not adjacent). An edge touches another if one of its end vertices touches another edge excluding its adjacent edges, or if they are co-linear and overlapping (including adjacent edges).

Polygons returned by clipping operations (see Clipper.Execute()) should always be simple polygons. When the StrictlySimply property is enabled, polygons returned will be strictly simple, otherwise they may be weakly simple. It’s computationally expensive ensuring polygons are strictly simple and so this property is disabled by default.

Note: There’s currently no guarantee that polygons will be strictly simple since ’simplifying’ is still a work in progress. (Read and Write property) 5.1. CLASS CLIPPERENGINEMBS 125 5.1.30 Tag as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The tag value. Notes: You can store here whatever value you like. (Read and Write property) 126 CHAPTER 5. CLIPPER 5.2 class ClipperExceptionMBS

5.2.1 class ClipperExceptionMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The exception class for clipper. Notes: Subclass of the RuntimeException class. 5.3. MODULE CLIPPERMBS 127 5.3 module ClipperMBS

5.3.1 module ClipperMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The central module for Clipper library methods.

5.3.2 Blog Entries

• Did you try our new Clipper plugin classes?

• MonkeyBread Software Releases the MBS Xojo Plugins in version 18.0

• MBS Xojo Plugins, version 18.0pr7

5.3.3 Xojo Developer Magazine

• 16.2, page 9: News

5.3.4 Blog Entries

• Did you try our new Clipper plugin classes?

• MonkeyBread Software Releases the MBS Xojo Plugins in version 18.0

• MBS Xojo Plugins, version 18.0pr7

5.3.5 Xojo Developer Magazine

• 16.2, page 9: News

5.3.6 Methods

5.3.7 Area(path as ClipperPathMBS) as double

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: This function returns the area of the supplied polygon. Notes: It’s assumed that the path is closed and does not self-intersect. Depending on orientation, this value may be positive or negative. If Orientation is true, then the area will be positive and conversely, if Orientation is false, then the area will be negative. 128 CHAPTER 5. CLIPPER 5.3.8 CleanPolygon(InPoly as ClipperPathMBS, byref OutPolys as Clipper- PathsMBS, distance as double = 1.415)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a clean polygon. Notes: Removes vertices: that join co-linear edges, or join edges that are almost co-linear (such that if the vertex was moved no more than the specified distance the edges would be co-linear) that are within the specified distance of an adjacent vertex that are within the specified distance of a semi-adjacent vertex together with their out-lying vertices Vertices are semi-adjacent when they are separated by a single (out-lying) vertex.

The distance parameter’s default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

This function is overloaded. In the first definition, the InPoly and OutPolys parameters can reference the same Path object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used. See also:

• 5.3.9 CleanPolygon(Poly as ClipperPathMBS, distance as double = 1.415) 128

5.3.9 CleanPolygon(Poly as ClipperPathMBS, distance as double = 1.415)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a clean polygon. Notes: Removes vertices: that join co-linear edges, or join edges that are almost co-linear (such that if the vertex was moved no more than the specified distance the edges would be co-linear) that are within the specified distance of an adjacent vertex that are within the specified distance of a semi-adjacent vertex together with their out-lying vertices Vertices are semi-adjacent when they are separated by a single (out-lying) vertex.

The distance parameter’s default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

This function is overloaded. In the first definition, the in_poly and out_poly parameters can reference the same Path object though in that case the calling code might be clearer if the second definition (accepting a 5.3. MODULE CLIPPERMBS 129 single Paths parameter) is used. See also:

• 5.3.8 CleanPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, distance as dou- ble = 1.415) 128

5.3.10 CleanPolygons(InPoly as ClipperPathsMBS, byref OutPolys as Clipper- PathsMBS, distance as double = 1.415)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates clean polygons. Notes: Removes vertices: that join co-linear edges, or join edges that are almost co-linear (such that if the vertex was moved no more than the specified distance the edges would be co-linear) that are within the specified distance of an adjacent vertex that are within the specified distance of a semi-adjacent vertex together with their out-lying vertices Vertices are semi-adjacent when they are separated by a single (out-lying) vertex.

The distance parameter’s default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

This function is overloaded. In the first definition, the InPoly and OutPoly parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used. See also:

• 5.3.11 CleanPolygons(Poly as ClipperPathsMBS, distance as double = 1.415) 129

5.3.11 CleanPolygons(Poly as ClipperPathsMBS, distance as double = 1.415)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates clean polygons. Notes: Removes vertices: that join co-linear edges, or join edges that are almost co-linear (such that if the vertex was moved no more than the specified distance the edges would be co-linear) that are within the specified distance of an adjacent vertex that are within the specified distance of a semi-adjacent vertex together with their out-lying vertices Vertices are semi-adjacent when they are separated by a single (out-lying) vertex. 130 CHAPTER 5. CLIPPER The distance parameter’s default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

This function is overloaded. In the first definition, the InPoly and OutPoly parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used. See also:

• 5.3.10 CleanPolygons(InPoly as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, distance as double = 1.415) 129

5.3.12 ClosedPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: This function filters out open paths from the PolyTree structure and returns only closed paths in a Paths structure.

5.3.13 EllipsePoints(Left as Double, Top as Double, Right as Double, Bottom as Double) as ClipperPathMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates an ellipse as path of points with given bounding rectangle. Example: dim p as ClipperPathMBS = ClipperMBS.EllipsePoints(100,100,300,300)

5.3.14 MinkowskiDiff(poly1 as ClipperPathMBS, poly2 as ClipperPathMBS, byref solution as ClipperPathsMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates Minkowski Difference. Notes: Minkowski Difference is performed by subtracting each point in a polygon from the set of points inanopen or closed path. A key feature of Minkowski Difference is that when it’s applied to two polygons, the resulting polygon will contain the coordinate space origin whenever the two polygons touch or overlap. (This function is often used to determine when polygons collide.) 5.3. MODULE CLIPPERMBS 131 In the image on the left the blue polygon is the ’minkowski difference’ of the two red boxes. The black dot represents the coordinate space origin.

5.3.15 MinkowskiSum(pattern as ClipperPathMBS, path as ClipperPathMBS, byref solution as ClipperPathsMBS, pathIsClosed as boolean)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates Minkowski sum. Notes: Minkowski Addition is performed by adding each point in a polygon ’pattern’ to the set of points in an open or closed path. The resulting polygon (or polygons) defines the region that the ’pattern’ would pass over in moving from the beginning to the end of the ’path’. See also:

• 5.3.16 MinkowskiSum(pattern as ClipperPathMBS, paths as ClipperPathsMBS, byref solution as Clip- perPathsMBS, pathIsClosed as boolean) 131

5.3.16 MinkowskiSum(pattern as ClipperPathMBS, paths as ClipperPathsMBS, byref solution as ClipperPathsMBS, pathIsClosed as boolean)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates Minkowski sum. Notes: Minkowski Addition is performed by adding each point in a polygon ’pattern’ to the set of points in an open or closed path. The resulting polygon (or polygons) defines the region that the ’pattern’ would pass over in moving from the beginning to the end of the ’path’. See also:

• 5.3.15 MinkowskiSum(pattern as ClipperPathMBS, path as ClipperPathMBS, byref solution as Clip- perPathsMBS, pathIsClosed as boolean) 131

5.3.17 OpenPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: This function filters out closed paths from the PolyTree structure and returns only open paths in a Paths structure.

5.3.18 Orientation(path as ClipperPathMBS) as boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. 132 CHAPTER 5. CLIPPER Function: Queries orientation of path. Notes: Orientation is only important to closed paths. Given that vertices are declared in a specific order, orienta- tion refers to the direction (clockwise or counter-clockwise) that these vertices progress around a closed path.

Orientation is also dependent on axis direction:

• On Y-axis positive upward displays, Orientation will return true if the polygon’s orientation is counter- clockwise.

• On Y-axis positive downward displays, Orientation will return true if the polygon’s orientation is clockwise.

Notes:

• Self-intersecting polygons have indeterminate orientations in which case this function won’t return a meaningful value.

• The majority of 2D graphic display libraries (eg GDI, GDI+, XLib, Cairo, AGG, Graphics32) and even the SVG file format have their coordinate origins at the top-left corner of their respective viewports with their Y axes increasing downward. However, some display libraries (eg Quartz, OpenGL) have their coordinate origins undefined or in the classic bottom-left position with their Y axes increasing upward.

• For Non-Zero filled polygons, the orientation of holes must be opposite that of outer polygons.

• For closed paths (polygons) in the solution returned by Clipper’s Execute method, their orientations will always be true for outer polygons and false for hole polygons (unless the ReverseSolution property has been enabled).

5.3.19 PointInPolygon(path as ClipperPathMBS, pt as ClipperPointMBS) as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns 0 when false, -1 when pt is on poly and +1 when pt is in poly. Notes: It’s assumed that ’poly’ is closed and does not self-intersect.

5.3.20 PolyTreeToPaths(polytree as ClipperPolyTreeMBS, byref paths as Clip- perPathsMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. 5.3. MODULE CLIPPERMBS 133 Function: This function converts a PolyTree structure into a Paths structure.

5.3.21 ReversePath(path as ClipperPathMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Reverses the vertex order (and hence orientation) in the specified path.

5.3.22 ReversePaths(paths as ClipperPathsMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Reverses the vertex order (and hence orientation) in each contained path.

5.3.23 SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as Clipper- PathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.Poly- FillType.EvenOdd)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes self-intersections from the supplied polygon (by performing a boolean union operation using the nominated PolyFillType). Notes: Polygons with non-contiguous duplicate vertices (ie ’touching’) will be split into two polygons.

Note: There’s currently no guarantee that polygons will be strictly simple since ’simplifying’ is still a work in progress. See also:

• 5.3.24 SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer) 133

5.3.24 SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as Clip- perPathsMBS, fillType as Integer)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes self-intersections from the supplied polygon (by performing a boolean union operation using the nominated PolyFillType). Notes: 134 CHAPTER 5. CLIPPER Polygons with non-contiguous duplicate vertices (ie ’touching’) will be split into two polygons.

Note: There’s currently no guarantee that polygons will be strictly simple since ’simplifying’ is still a work in progress. See also:

• 5.3.23 SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd) 133

5.3.25 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as Clip- perPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.Poly- FillType.EvenOdd)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType). Notes: Polygons with non-contiguous duplicate vertices (ie ’vertices are touching’) will be split into two polygons.

This function is overloaded. In the first definition, the InPolys and OutPolys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

Note: There’s currently no guarantee that polygons will be strictly simple since ’simplifying’ is still a work in progress. See also:

• 5.3.26 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer) 134

• 5.3.27 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = Clip- perMBS.PolyFillType.EvenOdd) 135

• 5.3.28 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as Integer) 136

5.3.26 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as Clip- perPathsMBS, fillType as Integer)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType). Notes: 5.3. MODULE CLIPPERMBS 135 Polygons with non-contiguous duplicate vertices (ie ’vertices are touching’) will be split into two polygons.

This function is overloaded. In the first definition, the InPolys and OutPolys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

Note: There’s currently no guarantee that polygons will be strictly simple since ’simplifying’ is still a work in progress. See also:

• 5.3.25 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd) 134

• 5.3.27 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = Clip- perMBS.PolyFillType.EvenOdd) 135

• 5.3.28 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as Integer) 136

5.3.27 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as ClipperMBS.Poly- FillType = ClipperMBS.PolyFillType.EvenOdd)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType). Notes: Polygons with non-contiguous duplicate vertices (ie ’vertices are touching’) will be split into two polygons.

This function is overloaded. In the first definition, the InPolys and OutPolys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

Note: There’s currently no guarantee that polygons will be strictly simple since ’simplifying’ is still a work in progress. See also:

• 5.3.25 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd) 134

• 5.3.26 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer) 134

• 5.3.28 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as Integer) 136 136 CHAPTER 5. CLIPPER 5.3.28 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as Integer)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType). Notes: Polygons with non-contiguous duplicate vertices (ie ’vertices are touching’) will be split into two polygons.

This function is overloaded. In the first definition, the InPolys and OutPolys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

Note: There’s currently no guarantee that polygons will be strictly simple since ’simplifying’ is still a work in progress. See also:

• 5.3.25 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd) 134

• 5.3.26 SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer) 134

• 5.3.27 SimplifyPolygons(Polys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = Clip- perMBS.PolyFillType.EvenOdd) 135

5.3.29 TranslatePath(path as ClipperPathMBS, delta as ClipperPointMBS) as ClipperPathMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Offsets each point in path by x andy. Notes: Returns a new path. See also:

• 5.3.30 TranslatePath(path as ClipperPathMBS, x as Int64, y as Int64) as ClipperPathMBS 136

5.3.30 TranslatePath(path as ClipperPathMBS, x as Int64, y as Int64) as Clip- perPathMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Offsets each point in path by x andy. Notes: Returns a new path. See also: 5.3. MODULE CLIPPERMBS 137 • 5.3.29 TranslatePath(path as ClipperPathMBS, delta as ClipperPointMBS) as ClipperPathMBS 136

5.3.31 Version as string

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries the version of the Clipper library used.

5.3.32 Constants

5.3.33 hiRange = & h3FFFFFFFFFFFFFFF

Plugin Version: 18.0. Function: The higher range.

5.3.34 loRange = & h3FFFFFFF

Plugin Version: 18.0. Function: The lower range. 138 CHAPTER 5. CLIPPER 5.4 class ClipperOffsetMBS

5.4.1 class ClipperOffsetMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The ClipperOffset class encapsulates the process of offsetting (inflating/deflating) both openand closed paths using a number of different join types and end types. Notes: Preconditions for offsetting: 1. The orientations of closed paths must be consistent such that outer polygons share the same orientation, and any holes have the opposite orientation (ie non-zero filling). Open paths must be oriented with closed outer polygons. 2. Polygons must not self-intersect.

Limitations: When offsetting, small artefacts may appear where polygons overlap. To avoid these artefacts, offsetover- lapping polygons separately.

5.4.2 Blog Entries

• Did you try our new Clipper plugin classes?

5.4.3 Blog Entries

• Did you try our new Clipper plugin classes?

5.4.4 Methods

5.4.5 AddPath(path as ClipperPathMBS, joinType as ClipperMBS.JoinType, endType as ClipperMBS.EndType)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Adds a Path to a ClipperOffset object in preparation for offsetting. Notes: Any number of paths can be added, and each has its own JoinType and EndType. All ’outer’ Paths must have the same orientation, and any ’hole’ paths must have reverse orientation. Closed paths must have at least 3 vertices. Open paths may have as few as one vertex. Open paths can only be offset with positive deltas. See also:

• 5.4.6 AddPath(path as ClipperPathMBS, joinType as Integer, endType as Integer) 139 5.4. CLASS CLIPPEROFFSETMBS 139 5.4.6 AddPath(path as ClipperPathMBS, joinType as Integer, endType as In- teger)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Adds a Path to a ClipperOffset object in preparation for offsetting. Notes: Any number of paths can be added, and each has its own JoinType and EndType. All ’outer’ Paths must have the same orientation, and any ’hole’ paths must have reverse orientation. Closed paths must have at least 3 vertices. Open paths may have as few as one vertex. Open paths can only be offset with positive deltas. See also:

• 5.4.5 AddPath(path as ClipperPathMBS, joinType as ClipperMBS.JoinType, endType as ClipperMBS.End- Type) 138

5.4.7 AddPaths(paths as ClipperPathsMBS, joinType as ClipperMBS.JoinType, endType as ClipperMBS.EndType)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Adds Paths to a ClipperOffset object in preparation for offsetting. Notes: Any number of paths can be added, and each path has its own JoinType and EndType. All ’outer’ Paths must have the same orientation, and any ’hole’ paths must have reverse orientation. Closed paths must have at least 3 vertices. Open paths may have as few as one vertex. Open paths can only be offset with positive deltas. See also:

• 5.4.8 AddPaths(paths as ClipperPathsMBS, joinType as Integer, endType as Integer) 139

5.4.8 AddPaths(paths as ClipperPathsMBS, joinType as Integer, endType as Integer)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Adds Paths to a ClipperOffset object in preparation for offsetting. Notes: Any number of paths can be added, and each path has its own JoinType and EndType. All ’outer’ Paths must have the same orientation, and any ’hole’ paths must have reverse orientation. Closed paths must have at least 3 vertices. Open paths may have as few as one vertex. Open paths can only be offset with positive deltas. See also:

• 5.4.7 AddPaths(paths as ClipperPathsMBS, joinType as ClipperMBS.JoinType, endType as Clip- perMBS.EndType) 139 140 CHAPTER 5. CLIPPER 5.4.9 Clear

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: This method clears all paths from the ClipperOffset object, allowing new paths to be assigned.

5.4.10 Constructor(miterLimit as double = 2.0, roundPrecision as double = 0.25)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Initializes the clipper offset. Notes: The ClipperOffset constructor takes 2 optional parameters: MiterLimit and ArcTolerance. Thes two parameters corresponds to properties of the same name. MiterLimit is only relevant when JoinType is jtMiter, and ArcTolerance is only relevant when JoinType is jtRound or when EndType is etOpenRound.

5.4.11 Execute(byref Paths as ClipperPathsMBS, delta as double)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper offset engine. Notes: This method takes two parameters. The first is the structure that receives the result of the offset operation (either a PolyTree or a Paths structure). The second parameter is the amount to which the supplied paths will be offset. Negative delta values shrink polygons and positive delta expand them.

This method can be called multiple times, offsetting the same paths by different amounts (ie using different deltas). See also:

• 5.4.12 Execute(byref PolyTree as ClipperPolyTreeMBS, delta as double) 140

5.4.12 Execute(byref PolyTree as ClipperPolyTreeMBS, delta as double)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes the clipper offset engine. Notes: This method takes two parameters. The first is the structure that receives the result of the offset operation (either a PolyTree or a Paths structure). The second parameter is the amount to which the supplied paths will be offset. Negative delta values shrink polygons and positive delta expand them. 5.4. CLASS CLIPPEROFFSETMBS 141 This method can be called multiple times, offsetting the same paths by different amounts (ie using different deltas). See also:

• 5.4.11 Execute(byref Paths as ClipperPathsMBS, delta as double) 140

5.4.13 Properties

5.4.14 ArcTolerance as Double

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The arc tolerance. Notes: Firstly, this field/property is only relevant when JoinType = jtRound and/or EndType = etRound.

Since flattened paths can never perfectly represent arcs, this field/property specifies a maximum acceptable imprecision (’tolerance’) when arcs are approximated in an offsetting operation. Smaller values will increase ’smoothness’ up to a point though at a cost of performance and in creating more vertices to construct the arc.

The default ArcTolerance is 0.25 units. This means that the maximum distance the flattened path will deviate from the ’true’ arc will be no more than 0.25 units (before rounding).

Reducing tolerances below 0.25 will not improve smoothness since vertex coordinates will still be rounded to integer values. The only way to achieve sub-integer precision is through coordinate scaling before and after offsetting (see example below).

It’s important to make ArcTolerance a sensible fraction of the offset delta (arc radius). Large tolerances rel- ative to the offset delta will produce poor arc approximations but, just as importantly, very small tolerances will substantially slow offsetting performance while providing unnecessary degrees of precision. This ismost likely to be an issue when offsetting polygons whose coordinates have been scaled to preserve floating point precision.

Example: Imagine a set of polygons (defined in floating point coordinates) that is to be offset by 10 units usinground joins, and the solution is to retain floating point precision up to at least 6 decimal places. To preserve this degree of floating point precision, and given that Clipper and ClipperOffset both operate on integer coordinates, the polygon coordinates will be scaled up by 108 (and rounded to integers) prior to offsetting. Both offset delta and ArcTolerance will also need to be scaled by this same factor. If ArcTolerance was left unscaled at the default 0.25 units, every arc in the solution would contain a fraction of 44 THOU- SAND vertices while the final arc imprecision would be 0.25 × 10-8 units (ie once scaling was reversed). However, if 0.1 units was an acceptable imprecision in the final unscaled solution, then ArcTolerance should be set to 0.1 × scaling_factor (0.1 × 108 ). Now if scaling is applied equally to both ArcTolerance and 142 CHAPTER 5. CLIPPER to Delta Offset, then in this example the number of vertices (steps) defining each arc would be a fraction of23.

The formula for the number of steps in a full circular arc is ... Pi / acos(1 - arc_tolerance / abs(delta)) (Read and Write property)

5.4.15 Handle as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

5.4.16 MiterLimit as Double

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The miter limit. Notes: This property sets the maximum distance in multiples of delta that vertices can be offset from their original positions before squaring is applied. (Squaring truncates a miter by ’cutting it off’ at 1 × delta distance from the original vertex.)

The default value for MiterLimit is 2 (ie twice delta). This is also the smallest MiterLimit that’s allowed. If mitering was unrestricted (ie without any squaring), then offsets at very acute angles would generate unacceptably long ’spikes’. (Read and Write property)

5.4.17 Owner as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: To avoid Xojo freeing the parent too quick, we keep a reference here. (Read only property)

5.4.18 Tag as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. 5.4. CLASS CLIPPEROFFSETMBS 143 Function: The tag value. Notes: You can store here whatever value you like. (Read and Write property) 144 CHAPTER 5. CLIPPER 5.5 class ClipperPathMBS

5.5.1 class ClipperPathMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: This class contains a sequence of IntPoint vertices defining a single contour (see also terminology). Notes: Paths may be open and represent a series of line segments bounded by 2 or more vertices, or they may be closed and represent polygons. Whether or not a path is open depends on context. Closed paths may be ’outer’ contours or ’hole’ contours. Which they are depends on orientation.

Multiple paths can be grouped into a Paths class: ClipperPathsMBS.

5.5.2 Methods

5.5.3 Append(item as ClipperPointMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Appends a new point to the path. See also:

• 5.5.4 Append(X as Int64, Y as Int64) 144

5.5.4 Append(X as Int64, Y as Int64)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Appends a new path. Notes: Without creating intermediate Xojo ClipperPointMBS object. See also:

• 5.5.3 Append(item as ClipperPointMBS) 144

5.5.5 Area as double

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: This function returns the area of the supplied polygon. Example: dim points() as ClipperPointMBS 5.5. CLASS CLIPPERPATHMBS 145 points.Append new ClipperPointMBS(1,2) points.Append new ClipperPointMBS(4,2) points.Append new ClipperPointMBS(4,6) points.Append new ClipperPointMBS(1,6) dim path as new ClipperPathMBS(points) dim area as Double = path.Area

Notes: It’s assumed that the path is closed and does not self-intersect. Depending on orientation, this value may be positive or negative. If Orientation is true, then the area will be positive and conversely, if Orientation is false, then the area will be negative.

5.5.6 Clear

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Clears the path.

5.5.7 Constructor

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new empty path. See also:

• 5.5.8 Constructor(otherPath as ClipperPathMBS) 145 • 5.5.9 Constructor(points() as ClipperPointMBS) 145

5.5.8 Constructor(otherPath as ClipperPathMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new path with the copy of old path. See also:

• 5.5.7 Constructor 145 • 5.5.9 Constructor(points() as ClipperPointMBS) 145

5.5.9 Constructor(points() as ClipperPointMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. 146 CHAPTER 5. CLIPPER Function: Creates a new path with given points. See also:

• 5.5.7 Constructor 145

• 5.5.8 Constructor(otherPath as ClipperPathMBS) 145

5.5.10 Equal(otherPath as ClipperPathMBS) as boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks if two paths are equal. Notes: Returns true if both are equal.

5.5.11 Insert(Index as Integer, item as ClipperPointMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Inserts a point into the path at given index. Notes: Index = 0 adds as first path.

5.5.12 Orientation as boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries orientation of path. Example: dim points() as ClipperPointMBS points.Append new ClipperPointMBS(1,2) points.Append new ClipperPointMBS(4,2) points.Append new ClipperPointMBS(4,6) points.Append new ClipperPointMBS(1,6) dim path as new ClipperPathMBS(points) dim Orientation as boolean = path.Orientation

Notes: Orientation is only important to closed paths. Given that vertices are declared in a specific order, orienta- tion refers to the direction (clockwise or counter-clockwise) that these vertices progress around a closed path. 5.5. CLASS CLIPPERPATHMBS 147 Orientation is also dependent on axis direction:

• On Y-axis positive upward displays, Orientation will return true if the polygon’s orientation is counter- clockwise.

• On Y-axis positive downward displays, Orientation will return true if the polygon’s orientation is clockwise.

Notes:

• Self-intersecting polygons have indeterminate orientations in which case this function won’t return a meaningful value.

• The majority of 2D graphic display libraries (eg GDI, GDI+, XLib, Cairo, AGG, Graphics32) and even the SVG file format have their coordinate origins at the top-left corner of their respective viewports with their Y axes increasing downward. However, some display libraries (eg Quartz, OpenGL) have their coordinate origins undefined or in the classic bottom-left position with their Y axes increasing upward.

• For Non-Zero filled polygons, the orientation of holes must be opposite that of outer polygons.

• For closed paths (polygons) in the solution returned by Clipper’s Execute method, their orientations will always be true for outer polygons and false for hole polygons (unless the ReverseSolution property has been enabled).

5.5.13 PointInPolygon(pt as ClipperPointMBS) as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns 0 when false, -1 when pt is on poly and +1 when pt is in poly. Example: dim points() as ClipperPointMBS points.Append new ClipperPointMBS(1,2) points.Append new ClipperPointMBS(4,2) points.Append new ClipperPointMBS(4,6) points.Append new ClipperPointMBS(1,6) dim path as new ClipperPathMBS(points) dim b1 as Integer = path.PointInPolygon(new ClipperPointMBS(2,2)) // -1 on line dim b2 as Integer = path.PointInPolygon(new ClipperPointMBS(2,22)) // 0 outside dim b3 as Integer = path.PointInPolygon(new ClipperPointMBS(2,3)) // 1 = inside 148 CHAPTER 5. CLIPPER Notes: It’s assumed that ’poly’ is closed and does not self-intersect.

5.5.14 Remove(index as integer)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes a point.

5.5.15 ReversePath

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Reverses the vertex order (and hence orientation) in the specified path.

5.5.16 TranslatePath(delta as ClipperPointMBS) as ClipperPathMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Offsets each point in path by x andy. Notes: Returns a new path. See also:

• 5.5.17 TranslatePath(x as Int64, y as Int64) as ClipperPathMBS 148

5.5.17 TranslatePath(x as Int64, y as Int64) as ClipperPathMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Offsets each point in path by x andy. Notes: Returns a new path. See also:

• 5.5.16 TranslatePath(delta as ClipperPointMBS) as ClipperPathMBS 148

5.5.18 Values as ClipperPointMBS()

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates copy of path as Xojo array or ClipperPointMBS. 5.5. CLASS CLIPPERPATHMBS 149 5.5.19 ValuesToArray(dest() as ClipperPointMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Adds ClipperPointMBS objects for the points in the path to the Xojo array. Notes: Mainly for older Xojo versions where the plugin can’t create an array for you.

5.5.20 Properties

5.5.21 Count as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns number of points in path. Notes: (Read only property)

5.5.22 Empty as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns true if path is empty. Notes: (Read only property)

5.5.23 Handle as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

5.5.24 Owner as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: To avoid Xojo freeing the parent too quick, we keep a reference here. (Read only property) 150 CHAPTER 5. CLIPPER 5.5.25 Tag as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The tag value. Notes: You can store here whatever value you like. (Read and Write property)

5.5.26 Value(Index as Integer) as ClipperPointMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries or sets a value in the path. Notes: Raises exception if out of bounds. (Read and Write computed property) 5.6. CLASS CLIPPERPATHSMBS 151 5.6 class ClipperPathsMBS

5.6.1 class ClipperPathsMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a list of paths. Notes: This class is fundamental to the Clipper Library. It’s a list or array of one or more Path structures. (The Path structure contains an ordered list of vertices that make a single contour.)

Paths may open (a series of line segments), or they may closed (polygons). Whether or not a path is open depends on context. Closed paths may be ’outer’ contours or ’hole’ contours. Which they are depends on orientation.

5.6.2 Methods

5.6.3 Append(item as ClipperPathMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Appends a new path to the paths.

5.6.4 Clear

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Clears the path.

5.6.5 Constructor

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new empty path. See also:

• 5.6.6 Constructor(otherPaths as ClipperPathsMBS) 152 152 CHAPTER 5. CLIPPER 5.6.6 Constructor(otherPaths as ClipperPathsMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new paths list with the copy of old paths list. See also:

• 5.6.5 Constructor 151

5.6.7 Equal(otherPaths as ClipperPathsMBS) as boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks if two path lists are equal. Notes: Returns true if both are equal.

5.6.8 Insert(Index as Integer, item as ClipperPathMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Inserts a path into the path list at given index. Notes: Index = 0 adds as first point.

5.6.9 Remove(index as integer)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes a path.

5.6.10 Reverse

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Reverses the vertex order (and hence orientation) in the specified paths.

5.6.11 Values as ClipperPathMBS()

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates copy of path list as Xojo array or ClipperPathMBS. 5.6. CLASS CLIPPERPATHSMBS 153 5.6.12 ValuesToArray(dest() as ClipperPathMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Adds ClipperPathMBS objects for the paths in the path list to the Xojo array. Notes: Mainly for older Xojo versions where the plugin can’t create an array for you.

5.6.13 Properties

5.6.14 Count as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns number of paths in paths. Notes: (Read only property)

5.6.15 Empty as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns true if path list is empty. Notes: (Read only property)

5.6.16 Handle as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

5.6.17 Owner as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: To avoid Xojo freeing the parent too quick, we keep a reference here. (Read only property) 154 CHAPTER 5. CLIPPER 5.6.18 Tag as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The tag value. Notes: You can store here whatever value you like. (Read and Write property)

5.6.19 Value(Index as Integer) as ClipperPathMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries or sets a value in the path. Notes: Raises exception if out of bounds. (Read and Write computed property) 5.7. CLASS CLIPPERPOINTMBS 155 5.7 class ClipperPointMBS

5.7.1 class ClipperPointMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a point. Notes: All functions accept nil as a point with values 0/0.

5.7.2 Methods

5.7.3 Constructor(x as Int64 = 0, y as Int64 = 0)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new point with given values.

5.7.4 Equal(other as ClipperPointMBS) as boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Compares two points. Notes: Returns true if both have same value. All functions accept nil as a point with values 0/0.

5.7.5 Point(x as Int64 = 0, y as Int64 = 0) as ClipperPointMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new point with given values.

5.7.6 Properties

5.7.7 X as Int64

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The x coordinate. Notes: (Read and Write property) 156 CHAPTER 5. CLIPPER

5.7.8 Y as Int64

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The y coordinate. Notes: (Read and Write property) 5.8. CLASS CLIPPERPOLYNODEMBS 157 5.8 class ClipperPolyNodeMBS

5.8.1 class ClipperPolyNodeMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a poly node. Notes: PolyNodes are encapsulated within a PolyTree container, and together provide a data structure representing the parent-child relationships of polygon contours returned by Clipper’s Execute method.

A PolyNode object represents a single polygon. Its IsHole property indicates whether it’s an outer or a hole. PolyNodes may own any number of PolyNode children (Childs), where children of outer polygons are holes, and children of holes are (nested) outer polygons.

5.8.2 Methods

5.8.3 Constructor

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The constructor for a new object.

5.8.4 Properties

5.8.5 ChildCount as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the number of PolyNode Childs directly owned by the PolyNode object. Notes: (Read only property)

5.8.6 Childs as ClipperPolyNodesMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The children. Notes: A read-only list of PolyNode. Outer PolyNode childs contain hole PolyNodes, and hole PolyNode childs contain nested outer PolyNodes. 158 CHAPTER 5. CLIPPER (Read only property)

5.8.7 Contour as ClipperPathMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns a path list which contains any number of vertices. Notes: (Read and Write property)

5.8.8 Handle as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

5.8.9 IsHole as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns true when the PolyNode’s polygon (Contour) is a hole. Notes: Children of outer polygons are always holes, and children of holes are always (nested) outer polygons. The IsHole property of a PolyTree object is undefined but its children are always top-level outer polygons. (Read only property)

5.8.10 IsOpen as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns true when the PolyNode’s Contour results from a clipping operation on an open contour (path). Notes: Only top-level PolyNodes can contain open contours. (Read only property) 5.8. CLASS CLIPPERPOLYNODEMBS 159 5.8.11 NextNode as ClipperPolyNodeMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The returned Polynode will be the first child if any, otherwise the next sibling, otherwise the next sibling of the Parent etc. Notes: A PolyTree can be traversed very easily by calling First() followed by NextNode in a loop until the returned object is a nil reference ... (Read only property)

5.8.12 Owner as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: To avoid Xojo freeing the parent too quick, we keep a reference here. (Read only property)

5.8.13 ParentNode as ClipperPolyNodeMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the parent PolyNode. Notes: The PolyTree object (which is also a PolyNode) does not have a parent and will return a null pointer. (Read only property)

5.8.14 Tag as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The tag value. Notes: You can store here whatever value you like. (Read and Write property) 160 CHAPTER 5. CLIPPER 5.9 class ClipperPolyNodesMBS

5.9.1 class ClipperPolyNodesMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for the node list.

5.9.2 Methods

5.9.3 Append(item as ClipperPolyNodeMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Appends a new node to the node list.

5.9.4 Clear

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Clears the node list.

5.9.5 Constructor

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new empty node list. See also:

• 5.9.6 Constructor(otherPolyNodes as ClipperPolyNodesMBS) 160

5.9.6 Constructor(otherPolyNodes as ClipperPolyNodesMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new poly node list with the copy of old poly node list. See also:

• 5.9.5 Constructor 160 5.9. CLASS CLIPPERPOLYNODESMBS 161 5.9.7 Equal(otherPolyNodes as ClipperPolyNodesMBS) as boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks if two node lists are equal. Notes: Returns true if both are equal.

5.9.8 Insert(Index as Integer, item as ClipperPolyNodeMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Inserts a poly node into the node list at given index. Notes: Index = 0 adds as first node.

5.9.9 Remove(index as integer)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes a node.

5.9.10 Values as ClipperPolyNodeMBS()

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates copy of node list as Xojo array or ClipperPolyNodeMBS.

5.9.11 Properties

5.9.12 Count as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns number of nodes. Notes: (Read only property)

5.9.13 Empty as Boolean

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. 162 CHAPTER 5. CLIPPER Function: Returns true if list is empty. Notes: (Read only property)

5.9.14 Handle as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

5.9.15 Owner as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: To avoid Xojo freeing the parent too quick, we keep a reference here. (Read only property)

5.9.16 Tag as Variant

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The tag value. Notes: You can store here whatever value you like. (Read and Write property)

5.9.17 Value(Index as Integer) as ClipperPolyNodeMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries or sets a value in the node list. Notes: Raises exception if out of bounds. (Read and Write computed property) 5.10. CLASS CLIPPERPOLYTREEMBS 163 5.10 class ClipperPolyTreeMBS

5.10.1 class ClipperPolyTreeMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: PolyTree is intended as a read-only data structure that should only be used to receive solutions from clipping and offsetting operations. Notes: It’s an alternative to the Paths data structure which also receives these solutions. PolyTree’s two major advantages over the Paths structure are: it properly represents the parent-child relationships of the returned polygons; it differentiates between open and closed paths. However, since PolyTree is a more complex struc- ture than the Paths structure, and since it’s more computationally expensive to process (the Execute method being roughly 5-10% slower), it should used only be when parent-child polygon relationships are needed, or when open paths are being ’clipped’.

An empty PolyTree object can be passed as the solution parameter in ClipperEngineMBS.Execute and in ClipperOffsetMBS.Execute. Once the clipping or offseting operation is completed, the method returnswith the PolyTree structure filled with data representing the solution.

A PolyTree object is a container for any number of PolyNode children, with each contained PolyNode repre- senting a single polygon contour (either an outer or hole polygon). PolyTree itself is a specialized PolyNode whose immediate children represent the top-level outer polygons of the solution. (Its own Contour property is always empty.) The contained top-level PolyNodes may contain their own PolyNode children representing hole polygons that may also contain children representing nested outer polygons etc. Children of outers will always be holes, and children of holes will always be outers.

PolyTrees can also contain open paths. Open paths will always be represented by top level PolyNodes. Two functions are provided to quickly separate out open and closed paths from a polytree - OpenPathsFromPoly- Tree and ClosedPathsFromPolyTree. Subclass of the ClipperPolyNodeMBS class.

5.10.2 Methods

5.10.3 Clear

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: This method clears any PolyNode children contained by PolyTree the object. Notes: Clear does not need to be called explicitly. The Clipper.Execute method that accepts a PolyTree parameter will automatically clear the PolyTree object before propagating it with new PolyNodes. Likewise, PolyTree’s destructor will also automatically clear any contained PolyNodes. 164 CHAPTER 5. CLIPPER 5.10.4 Constructor

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new empty polytree. See also:

• 5.10.5 Constructor(otherPolyNodes as ClipperPolyTreeMBS) 164

5.10.5 Constructor(otherPolyNodes as ClipperPolyTreeMBS)

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a copy of an existing poly tree. See also:

• 5.10.4 Constructor 164

5.10.6 Properties

5.10.7 First as ClipperPolyNodeMBS

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The first node. Notes: This method returns the first outer polygon contour if any, otherwise a null pointer.

This function is almost equivalent to calling Childs [ 0 ] except that when a PolyTree object is empty (has no children), calling Childs [ 0 ] would raise an out of range exception. (Read only property)

5.10.8 Total as Integer

Plugin Version: 18.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the total number of PolyNodes (polygons) contained within the PolyTree. Notes: This value is not to be confused with ChildCount which returns the number of immediate children only (Childs) contained by PolyTree. (Read only property) Chapter 6

CUPS

6.1 class CUPSDestinationMBS

6.1.1 class CUPSDestinationMBS

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: The class for a CUPS destination. Example: dim lines(-1) as string for each as CUPSDestinationMBS in CUPSMBS.GetDestinations lines.append c.Name next

MsgBox Join(lines,EndOfLine)

6.1.2 Blog Entries

• About plug-in functions returning array

6.1.3 Blog Entries

• About plug-in functions returning array

165 166 CHAPTER 6. CUPS 6.1.4 Methods

6.1.5 Options as CUPSOptionMBS()

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop only. Function: Options values.

6.1.6 Properties

6.1.7 Instance as String

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Local instance name or ””. Notes: (Read and Write property)

6.1.8 isDefault as Boolean

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Is this printer the default? Example: for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations if c.isDefault then MsgBox c.Name end if next

Notes: (Read and Write property)

6.1.9 Name as String

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: The name of the printer. Example: dim lines(-1) as string for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations lines.append c.Name 6.1. CLASS CUPSDESTINATIONMBS 167 next

MsgBox Join(lines,EndOfLine)

Notes: (Read and Write property) 168 CHAPTER 6. CUPS 6.2 class CUPSErrorExceptionMBS

6.2.1 class CUPSErrorExceptionMBS

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: The error exception raised by some CUPS functions. Notes: Subclass of the RuntimeException class. 6.3. CLASS CUPSJOBMBS 169 6.3 class CUPSJobMBS

6.3.1 class CUPSJobMBS

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: The class for job details. Example: dim jobs() as CUPSJobMBS = CUPSMBS.GetJobs(””, true, CUPSMBS.kWhichJobsActive) if UBound(jobs)<0 then MsgBox ”no job” else dim j as CUPSJobMBS = jobs(0) dim lines(-1) as string lines.Append ”Title: ”+j.Title lines.Append ”User: ”+j.User lines.Append ”Format: ”+j.Format lines.Append ”Dest: ”+j.Dest lines.Append ”ID: ”+str(j.ID) lines.Append ”Priority: ”+str(j.Priority) lines.Append ”Size: ”+str(j.Size) lines.Append ”State: ”+str(j.State) if j.CompletedTime<>nil then lines.Append ”CompletedTime: ”+j.CompletedTime.AbbreviatedDate+””+j.CompletedTime.longtime else lines.Append ”CompletedTime: nil” end if if j.CreationTime<>nil then lines.Append ”CreationTime: ”+j.CreationTime.AbbreviatedDate+””+j.CreationTime.longtime else lines.Append ”CreationTime: nil” end if if j.ProcessingTime<>nil then lines.Append ”ProcessingTime: ”+j.ProcessingTime.AbbreviatedDate+””+j.ProcessingTime.longtime else lines.Append ”ProcessingTime: nil” end if

MsgBox join(lines,EndOfLine) end if 170 CHAPTER 6. CUPS

6.3.2 Properties

6.3.3 CompletedDateTime as DateTime

Plugin Version: 20.5, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Time the job was completed. Notes: Value is nil if the value is not set. (Read and Write property)

6.3.4 CompletedTime as Date

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Time the job was completed. Example: dim jobs() as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsComplete) if UBound(jobs)<0 then MsgBox ”no job” else dim j as CUPSJobMBS = jobs(0)

MsgBox j.Title+” completed at ”+j.CompletedTime.AbbreviatedDate+””+j.CompletedTime.longtime end if

Notes: Value is nil if the value is not set. (Read and Write property)

6.3.5 CreationDateTime as DateTime

Plugin Version: 20.5, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Time the job was created. Notes: 6.3. CLASS CUPSJOBMBS 171 Value is nil if the value is not set. (Read and Write property)

6.3.6 CreationTime as Date

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Time the job was created. Example: dim jobs() as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsComplete)

if UBound(jobs)<0 then MsgBox ”no job” else dim j as CUPSJobMBS = jobs(0)

MsgBox j.Title+” completed at ”+j.CreationTime.AbbreviatedDate+””+j.CreationTime.longtime end if

Notes: Value is nil if the value is not set. (Read and Write property)

6.3.7 Dest as String

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Printer or class name. Example: dim jobs() as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim lines(-1) as string for each j as CUPSJobMBS in jobs lines.Append j.Dest next

MsgBox Join(lines,EndOfLine)

Notes: (Read and Write property) 172 CHAPTER 6. CUPS 6.3.8 Format as String

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Document format. Example: dim jobs() as CUPSJobMBS = CUPSMBS.GetJobs(””, true, CUPSMBS.kWhichJobsAll) dim lines(-1) as string for each j as CUPSJobMBS in jobs lines.Append j.Format next

MsgBox Join(lines,EndOfLine)

Notes: (Read and Write property)

6.3.9 ID as Integer

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: The job ID. Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) MsgBox jobs(0).Title+” has ID ”+str(jobs(0).ID)

Notes: (Read and Write property)

6.3.10 Priority as Integer

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Priority (1-100). Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) MsgBox jobs(0).Title+” has priority ”+str(jobs(0).Priority)

Notes: (Read and Write property) 6.3. CLASS CUPSJOBMBS 173

6.3.11 ProcessingDateTime as DateTime

Plugin Version: 20.5, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Time the job was processed. Notes: Value is nil if the value is not set. (Read and Write property)

6.3.12 ProcessingTime as Date

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Time the job was processed. Example: dim jobs() as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsComplete) if UBound(jobs)<0 then MsgBox ”no job” else dim j as CUPSJobMBS = jobs(0)

MsgBox j.Title+” completed at ”+j.ProcessingTime.AbbreviatedDate+””+j.ProcessingTime.longtime end if

Notes: Value is nil if the value is not set. (Read and Write property)

6.3.13 Size as Integer

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Size in kilobytes. Example: dim sum as Integer dim jobs() as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) 174 CHAPTER 6. CUPS if UBound(jobs)<0 then MsgBox ”no job” else for each j as CUPSJobMBS in jobs sum=sum+j.Size next

MsgBox ”Total size of all print jobs: ”+str(sum)+” KB” end if

Notes: (Read and Write property)

6.3.14 State as Integer

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Job state. Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim state as Integer = jobs(0).State // check state of first job dim s as string = ”?”

Select case state case CUPSMBS.kJobAborted s = ”Aborted” case CUPSMBS.kJobCanceled s = ”Canceled” case CUPSMBS.kJobCompleted s = ”Completed” case CUPSMBS.kJobHeld s = ”Held” case CUPSMBS.kJobStopped s = ”Stopped” case CUPSMBS.kJobPending s = ”Pending” case CUPSMBS.kJobProcessing s = ”Processing” end Select

MsgBox str(State)+”: ”+s

Notes: (Read and Write property) 6.3. CLASS CUPSJOBMBS 175

6.3.15 Title as String

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Title/job name. Example: dim jobs() as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim lines(-1) as string for each j as CUPSJobMBS in jobs lines.Append j.Title next

MsgBox Join(lines,EndOfLine)

Notes: (Read and Write property)

6.3.16 User as String

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: User the submitted the job. Example: dim jobs() as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim lines(-1) as string for each j as CUPSJobMBS in jobs lines.Append j.User next

MsgBox Join(lines,EndOfLine)

Notes: (Read and Write property) 176 CHAPTER 6. CUPS 6.4 module CUPSMBS

6.4.1 module CUPSMBS

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: All. Function: The module to control the CUPS printing system.

6.4.2 Blog Entries

• MBS Xojo / Real Studio Plugins, version 17.1pr1

• MBS Xojo / Real Studio Plugins, version 16.5pr2

• MBS Real Studio Plugins, version 12.5pr8

• About plug-in functions returning array

6.4.3 Blog Entries

• MBS Xojo / Real Studio Plugins, version 17.1pr1

• MBS Xojo / Real Studio Plugins, version 16.5pr2

• MBS Real Studio Plugins, version 12.5pr8

• About plug-in functions returning array

6.4.4 Methods

6.4.5 CancelJob(name as string, job as Int32)

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Cancel a print job on the default server. Notes: name: Name of printer or class job: Job ID, kJobIDCurrent for the current job, or kJobIDAll for all jobs

Pass kJobIDAll to cancel all jobs or kJobIDCurrent to cancel the current job on the named destination.

Raises exception on error. 6.4. MODULE CUPSMBS 177 6.4.6 GetDefault as string

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Get the default printer or class for the default server. Example: MsgBox CUPSMBS.GetDefault

6.4.7 GetDestinations as CUPSDestinationMBS()

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Get the list of destinations from the default server. Example: dim lines(-1) as string for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations lines.append c.Name next

MsgBox Join(lines,EndOfLine)

Notes: Starting with CUPS 1.2, the returned list of destinations include the printer-info, printer-is- accepting-jobs, printer-is-shared, printer-make-and-model, printer-state, printer-state-change-time, printer- state-reasons, and printer-type attributes as options. CUPS 1.4 adds the marker-change-time, marker- colors, marker-high-levels, marker-levels, marker-low-levels, marker-message, marker-names, marker-types, and printer-commands attributes as well.

6.4.8 GetJobs(name as string, OnlyMyJobs as boolean, whichjobs as Integer) as CUPSJobMBS()

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Get the jobs from the default server. Notes: name: ”” = all destinations, otherwise show jobs for named destination OnlyMyJobs: false = all users, true = mine whichjobs: kWhichJobsAll, kWhichJobsActive, or kWhichJobsComplete

A ”whichjobs” value of kWhichJobsAll returns all jobs regardless of state, while kWhichJobsActive returns jobs that are pending, processing, or held and kWhichJobsComplete returns jobs that are stopped, canceled, 178 CHAPTER 6. CUPS aborted, or completed.

6.4.9 GetPassword(prompt as string) as string

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Get a password from the user. Notes: Returns ”” if the user does not provide a password.

6.4.10 GetPPD(name as string) as string

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Get the PPD file for a printer on the default server. Example: for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations if c.isDefault then MsgBox cupsmbs.GetPPD(c.Name) end if next

Notes: Returns Filename for PPD file.

For classes, cupsGetPPD returns the PPD file for the first printer in the class.

The returned filename is stored in a static buffer and is overwritten with each call to cupsGetPPD orcups- GetPPD2. The caller ”owns” the file that is created and must unlink the returned filename.

6.4.11 LastError as Integer

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Return the last IPP status code. 6.4. MODULE CUPSMBS 179 6.4.12 LastErrorString as string

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Return the last IPP status-message. Example: MsgBox CUPSMBS.LastErrorString

Notes: Returns status-message text from last request.

6.4.13 PrintData(name as string, Data as String, Title as string) as Integer

Plugin Version: 16.5, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Print a file to a printer or class on the default server. Notes: Name: Destination name Data: Data to print Title: Title of job

Returns Job ID or 0 on error

6.4.14 PrintFile(name as string, file as folderitem, title as string) as Integer

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Print a file to a printer or class on the default server. Example: // Print file on default printer... dim f as FolderItem = SpecialFolder.Desktop.Child(”test.ps”) for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations if c.isDefault then call CUPSMBS.PrintFile(c.Name, f, f.Name) end if next 180 CHAPTER 6. CUPS Notes: name: Destination name filename: File to print title: Title of job

Returns Job ID or 0 on error See also:

• 6.4.15 PrintFile(name as string, file as folderitem, title as string, options() as CUPSOptionMBS) as Integer 180

6.4.15 PrintFile(name as string, file as folderitem, title as string, options() as CUPSOptionMBS) as Integer

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Print a file to a printer or class on the default server. Notes: name: Destination name filename: File to print title: Title of job options: Options

Returns Job ID or 0 on error See also:

• 6.4.14 PrintFile(name as string, file as folderitem, title as string) as Integer 179

6.4.16 PrintFiles(name as string, files() as folderitem, title as string) as Integer

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Print files to a printer or class on the default server. Notes: name: Destination name filename: Files to print title: Title of job

Returns Job ID or 0 on error See also:

• 6.4.17 PrintFiles(name as string, files() as folderitem, title as string, options() as CUPSOptionMBS) as Integer 181 6.4. MODULE CUPSMBS 181 6.4.17 PrintFiles(name as string, files() as folderitem, title as string, options() as CUPSOptionMBS) as Integer

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Print files to a printer or class on the default server. Notes: name: Destination name files: Files to print title: Title of job options: Options

Returns Job ID or 0 on error See also:

• 6.4.16 PrintFiles(name as string, files() as folderitem, title as string) as Integer 180

6.4.18 Server as string

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Return the hostname/address of the default server. Example: MsgBox CUPSMBS.Server

Notes: The returned value can be a fully-qualified hostname, a numeric IPv4 or IPv6 address, or adomain socket pathname.

6.4.19 SetDefaultPrinter(printer as string)

Plugin Version: 12.5, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Sets the default printer. Notes: Name must be one of CUPSDestinationMBS’s name.

6.4.20 SetServer(server as string)

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Set the default server name. Notes: 182 CHAPTER 6. CUPS server: Server name

The ”server” string can be a fully-qualified hostname, a numeric IPv4 or IPv6 address, or a domain socket pathname. Pass ”” to restore the default server name.

6.4.21 SetUser(user as string)

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Set the default user name. Notes: user: User name

Pass ”” to restore the default user name.

6.4.22 User as string

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Return the current user’s name. Example: MsgBox CUPSMBS.User

6.4.23 Constants

6.4.24 kJobAborted = 8

Plugin Version: 9.7. Function: One of the constants for the job state. Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim state as Integer = jobs(0).State // check state of first job dim s as string = ”?”

Select case state case CUPSMBS.kJobAborted 6.4. MODULE CUPSMBS 183 s = ”Aborted” case CUPSMBS.kJobCanceled s = ”Canceled” case CUPSMBS.kJobCompleted s = ”Completed” case CUPSMBS.kJobHeld s = ”Held” case CUPSMBS.kJobStopped s = ”Stopped” case CUPSMBS.kJobPending s = ”Pending” case CUPSMBS.kJobProcessing s = ”Processing” end Select

MsgBox str(State)+”: ”+s

Notes: Job was aborted.

6.4.25 kJobCanceled = 7

Plugin Version: 9.7. Function: One of the constants for the job state. Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim state as Integer = jobs(0).State // check state of first job dim s as string = ”?”

Select case state case CUPSMBS.kJobAborted s = ”Aborted” case CUPSMBS.kJobCanceled s = ”Canceled” case CUPSMBS.kJobCompleted s = ”Completed” case CUPSMBS.kJobHeld s = ”Held” case CUPSMBS.kJobStopped s = ”Stopped” case CUPSMBS.kJobPending s = ”Pending” case CUPSMBS.kJobProcessing s = ”Processing” 184 CHAPTER 6. CUPS end Select

MsgBox str(State)+”: ”+s

Notes: Job was canceled.

6.4.26 kJobCompleted = 9

Plugin Version: 9.7. Function: One of the constants for the job state. Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim state as Integer = jobs(0).State // check state of first job dim s as string = ”?”

Select case state case CUPSMBS.kJobAborted s = ”Aborted” case CUPSMBS.kJobCanceled s = ”Canceled” case CUPSMBS.kJobCompleted s = ”Completed” case CUPSMBS.kJobHeld s = ”Held” case CUPSMBS.kJobStopped s = ”Stopped” case CUPSMBS.kJobPending s = ”Pending” case CUPSMBS.kJobProcessing s = ”Processing” end Select

MsgBox str(State)+”: ”+s

Notes: Job was completed.

6.4.27 kJobHeld = 4

Plugin Version: 9.7. 6.4. MODULE CUPSMBS 185 Function: One of the constants for the job state. Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim state as Integer = jobs(0).State // check state of first job dim s as string = ”?”

Select case state case CUPSMBS.kJobAborted s = ”Aborted” case CUPSMBS.kJobCanceled s = ”Canceled” case CUPSMBS.kJobCompleted s = ”Completed” case CUPSMBS.kJobHeld s = ”Held” case CUPSMBS.kJobStopped s = ”Stopped” case CUPSMBS.kJobPending s = ”Pending” case CUPSMBS.kJobProcessing s = ”Processing” end Select

MsgBox str(State)+”: ”+s

Notes: Job is held.

6.4.28 kJobIDAll = -1

Plugin Version: 9.7. Function: A job constant for all jobs.

6.4.29 kJobIDCurrent = 0

Plugin Version: 9.7. Function: A job constant for the current job. 186 CHAPTER 6. CUPS 6.4.30 kJobPending = 3

Plugin Version: 9.7. Function: One of the constants for the job state. Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim state as Integer = jobs(0).State // check state of first job dim s as string = ”?”

Select case state case CUPSMBS.kJobAborted s = ”Aborted” case CUPSMBS.kJobCanceled s = ”Canceled” case CUPSMBS.kJobCompleted s = ”Completed” case CUPSMBS.kJobHeld s = ”Held” case CUPSMBS.kJobStopped s = ”Stopped” case CUPSMBS.kJobPending s = ”Pending” case CUPSMBS.kJobProcessing s = ”Processing” end Select

MsgBox str(State)+”: ”+s

Notes: Job is pending

6.4.31 kJobProcessing = 5

Plugin Version: 9.7. Function: One of the constants for the job state. Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim state as Integer = jobs(0).State // check state of first job dim s as string = ”?”

Select case state case CUPSMBS.kJobAborted s = ”Aborted” 6.4. MODULE CUPSMBS 187 case CUPSMBS.kJobCanceled s = ”Canceled” case CUPSMBS.kJobCompleted s = ”Completed” case CUPSMBS.kJobHeld s = ”Held” case CUPSMBS.kJobStopped s = ”Stopped” case CUPSMBS.kJobPending s = ”Pending” case CUPSMBS.kJobProcessing s = ”Processing” end Select

MsgBox str(State)+”: ”+s

Notes: Job is processing.

6.4.32 kJobStopped = 6

Plugin Version: 9.7. Function: One of the constants for the job state. Example: dim jobs(-1) as CUPSJobMBS = CUPSMBS.GetJobs(””, false, CUPSMBS.kWhichJobsAll) dim state as Integer = jobs(0).State // check state of first job dim s as string = ”?”

Select case state case CUPSMBS.kJobAborted s = ”Aborted” case CUPSMBS.kJobCanceled s = ”Canceled” case CUPSMBS.kJobCompleted s = ”Completed” case CUPSMBS.kJobHeld s = ”Held” case CUPSMBS.kJobStopped s = ”Stopped” case CUPSMBS.kJobPending s = ”Pending” case CUPSMBS.kJobProcessing s = ”Processing” end Select 188 CHAPTER 6. CUPS

MsgBox str(State)+”: ”+s

Notes: Job is stopped.

6.4.33 kPrinterAUTHENTICATED = & h400000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Printer requires authentication

6.4.34 kPrinterBIND = & h0400

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can bind output

6.4.35 kPrinterBW = & h0004

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Example: dim lines(-1) as string

for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations for each o as CUPSOptionMBS in c.Options if o.Name=”printer-type” then dim x as Integer = val(o.Value)

if BitwiseAnd(x, CUPSMBS.kPrinterBW)=CUPSMBS.kPrinterBW then lines.Append c.Name+”: yes” else lines.Append c.Name+”: no” end if end if next next 6.4. MODULE CUPSMBS 189 MsgBox Join(lines,EndOfLine)

Notes: Can do B& W printing

6.4.36 kPrinterCLASS = & h0001

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Printer class

6.4.37 kPrinterCOLLATE = & h0080

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can collage copies

6.4.38 kPrinterCOLOR = & h0008

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Example: dim lines(-1) as string

for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations for each o as CUPSOptionMBS in c.Options if o.Name=”printer-type” then dim x as Integer = val(o.Value)

if BitwiseAnd(x, CUPSMBS.kPrinterCOLOR)=CUPSMBS.kPrinterCOLOR then lines.Append c.Name+”: yes” else lines.Append c.Name+”: no” end if end if next next

MsgBox Join(lines,EndOfLine) 190 CHAPTER 6. CUPS

Notes: Can do color printing

6.4.39 kPrinterCOMMANDS = & h800000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Printer supports maintenance commands

6.4.40 kPrinterCOPIES = & h0040

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can do copies

6.4.41 kPrinterCOVER = & h0200

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can cover output

6.4.42 kPrinterDEFAULT = & h20000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Default printer on network

6.4.43 kPrinterDELETE = & h100000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Delete printer 6.4. MODULE CUPSMBS 191 6.4.44 kPrinterDISCOVERED = & h1000000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Printer was automatically discovered and added.

6.4.45 kPrinterDUPLEX = & h0010

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Example: dim lines(-1) as string for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations for each o as CUPSOptionMBS in c.Options if o.Name=”printer-type” then dim x as Integer = val(o.Value) if BitwiseAnd(x, CUPSMBS.kPrinterDUPLEX)=CUPSMBS.kPrinterDUPLEX then lines.Append c.Name+”: yes” else lines.Append c.Name+”: no” end if end if next next

MsgBox Join(lines,EndOfLine)

Notes: Can do duplexing

6.4.46 kPrinterFAX = & h40000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Example: dim lines(-1) as string for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations 192 CHAPTER 6. CUPS for each o as CUPSOptionMBS in c.Options if o.Name=”printer-type” then dim x as Integer = val(o.Value) if BitwiseAnd(x, CUPSMBS.kPrinterFAX)=CUPSMBS.kPrinterFAX then lines.Append c.Name+”: yes” else lines.Append c.Name+”: no” end if end if next next

MsgBox Join(lines,EndOfLine)

Notes: Fax queue

6.4.47 kPrinterIMPLICIT = & h10000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Implicit class

6.4.48 kPrinterLARGE = & h4000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can do D/E/A1/A0

6.4.49 kPrinterLOCAL = & h0000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Local printer or class 6.4. MODULE CUPSMBS 193 6.4.50 kPrinterMEDIUM = & h2000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can do Tabloid/B/C/A3/A2

6.4.51 kPrinterMFP = & h4000000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Example: dim lines(-1) as string for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations for each o as CUPSOptionMBS in c.Options if o.Name=”printer-type” then dim x as Integer = val(o.Value) if BitwiseAnd(x, CUPSMBS.kPrinterMFP)=CUPSMBS.kPrinterMFP then lines.Append c.Name+”: yes” else lines.Append c.Name+”: no” end if end if next next

MsgBox Join(lines,EndOfLine)

Notes: Printer with scanning capabilities

6.4.52 kPrinterNotShared = & h200000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Printer is not shared. 194 CHAPTER 6. CUPS 6.4.53 kPrinterOPTIONS = & h6fffc

Plugin Version: 9.7. Function: One of the printer type/capability bit constants.

6.4.54 kPrinterPUNCH = & h0100

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can punch output.

6.4.55 kPrinterREJECTING = & h80000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Printer is rejecting jobs.

6.4.56 kPrinterREMOTE = & h0002

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Remote printer or class.

6.4.57 kPrinterSCANNER = & h2000000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Example: dim lines(-1) as string

for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations for each o as CUPSOptionMBS in c.Options if o.Name=”printer-type” then dim x as Integer = val(o.Value) if BitwiseAnd(x, CUPSMBS.kPrinterSCANNER)=CUPSMBS.kPrinterSCANNER then 6.4. MODULE CUPSMBS 195 lines.Append c.Name+”: yes” else lines.Append c.Name+”: no” end if end if next next

MsgBox Join(lines,EndOfLine)

Notes: Scanner-only device

6.4.58 kPrinterSMALL = & h1000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Example: dim lines(-1) as string

for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations for each o as CUPSOptionMBS in c.Options if o.Name=”printer-type” then dim x as Integer = val(o.Value)

if BitwiseAnd(x, CUPSMBS.kPrinterSMALL)=CUPSMBS.kPrinterSMALL then lines.Append c.Name+”: yes” else lines.Append c.Name+”: no” end if end if next next

MsgBox Join(lines,EndOfLine)

Notes: Can do Letter/Legal/A4. 196 CHAPTER 6. CUPS 6.4.59 kPrinterSORT = & h0800

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can sort output.

6.4.60 kPrinterSTAPLE = & h0020

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can staple output.

6.4.61 kPrinterVARIABLE = & h8000

Plugin Version: 9.7. Function: One of the printer type/capability bit constants. Notes: Can do variable sizes.

6.4.62 kStatusAttributes = & h040B

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error attributes or values not supported

6.4.63 kStatusAttributesNotSettable = & h0413

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error attributes not settable

6.4.64 kStatusBadRequest = & h0400

Plugin Version: 9.7. 6.4. MODULE CUPSMBS 197 Function: One of the CUPS error constants. Notes: client error bad request

6.4.65 kStatusCharset = & h040D

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error charset not supported

6.4.66 kStatusCompressionError = & h0410

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error compression error

6.4.67 kStatusCompressionNotSupported = & h040F

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error compression not supported

6.4.68 kStatusConflict = & h040E

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error conflicting attributes

6.4.69 kStatusDeviceError = & h0504

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error device error 198 CHAPTER 6. CUPS 6.4.70 kStatusDocumentAccessError = & h0412

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error document access error

6.4.71 kStatusDocumentFormat = & h040A

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error document format not supported

6.4.72 kStatusDocumentFormatError = & h0411

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error document format error

6.4.73 kStatusErrorJobCanceled = & h0508

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error job canceled

6.4.74 kStatusForbidden = & h0401

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error forbidden

6.4.75 kStatusGone = & h0407

Plugin Version: 9.7. 6.4. MODULE CUPSMBS 199 Function: One of the CUPS error constants. Notes: client error gone

6.4.76 kStatusIgnoredAllNotifications = & h0416

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error ignored all notifications

6.4.77 kStatusIgnoredAllSubscriptions = & h0414

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error ignored all subscriptions

6.4.78 kStatusInternalError = & h0500

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error internal error

6.4.79 kStatusMultipleJobsNotSupported = & h0509

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error multiple document jobs not supported

6.4.80 kStatusNotAccepting = & h0506

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error not accepting jobs 200 CHAPTER 6. CUPS 6.4.81 kStatusNotAuthenticated = & h0402

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error not authenticated

6.4.82 kStatusNotAuthorized = & h0403

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error not authorized

6.4.83 kStatusNotFound = & h0406

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error not found

6.4.84 kStatusNotPossible = & h0404

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error not possible

6.4.85 kStatusOK = 0

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: successful ok

6.4.86 kStatusOKButCancelSubscription = 6

Plugin Version: 9.7. 6.4. MODULE CUPSMBS 201 Function: One of the CUPS error constants. Notes: successful ok but cancel subscription

6.4.87 kStatusOKConflict = 2

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: successful ok conflicting attributes

6.4.88 kStatusOKEventsComplete = 7

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: successful ok events complete

6.4.89 kStatusOKIgnoredNotifications = 4

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: successful ok ignored notifications

6.4.90 kStatusOKIgnoredSubscriptions = 3

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: successful ok ignored subscriptions

6.4.91 kStatusOKSubst = 1

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: successful ok ignored or substituted attributes 202 CHAPTER 6. CUPS 6.4.92 kStatusOKTooManyEvents = 5

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: successful ok too many events

6.4.93 kStatusOperationNotSupported = & h0501

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error operation not supported

6.4.94 kStatusPrinterBusy = & h0507

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error busy

6.4.95 kStatusPrinterIsDeactivated = & h050A

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error printer is deactivated

6.4.96 kStatusPrintSupportFileNotFound = & h0417

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error print support file not found

6.4.97 kStatusRedirectionOtherSite = & h200

Plugin Version: 9.7. 6.4. MODULE CUPSMBS 203 Function: One of the CUPS error constants. Notes: redirection other site

6.4.98 kStatusRequestEntity = & h0408

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error request entity too large

6.4.99 kStatusRequestValue = & h0409

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error request value too long

6.4.100 kStatusSeeOther = & h280

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: cups see other

6.4.101 kStatusServiceUnavailable = & h0502

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error service unavailable

6.4.102 kStatusTemporaryError = & h0505

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error temporary error 204 CHAPTER 6. CUPS 6.4.103 kStatusTimeout = & h0405

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error timeout

6.4.104 kStatusTooManySubscriptions = & h0415

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error too many subscriptions

6.4.105 kStatusURIScheme = & h040C

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: client error uri scheme not supported 6.4. MODULE CUPSMBS 205 6.4.106 kStatusVersionNotSupported = & h0503

Plugin Version: 9.7. Function: One of the CUPS error constants. Notes: server error version not supported

6.4.107 kWhichJobsActive = 0

Plugin Version: 9.7. Function: One constant for using in GetJobs.

6.4.108 kWhichJobsAll = -1

Plugin Version: 9.7. Function: One constant for using in GetJobs.

6.4.109 kWhichJobsComplete = 1

Plugin Version: 9.7. Function: One constant for using in GetJobs. 206 CHAPTER 6. CUPS 6.5 class CUPSMissingFunctionExceptionMBS

6.5.1 class CUPSMissingFunctionExceptionMBS

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: The exception raised if a CUPS function is not found. Notes: On Windows this method is raised for each function you call. Subclass of the RuntimeException class. 6.6. CLASS CUPSOPTIONMBS 207 6.6 class CUPSOptionMBS

6.6.1 class CUPSOptionMBS

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: The class for the options in CUPS. Example: dim options() as CUPSOptionMBS

dim o1 as new CUPSOptionMBS o1.Name = ”media” o1.Value = ”A4” options.Append o1

dim o2 as new CUPSOptionMBS o2.Name = ”scaling” o2.Value = ”75” options.Append o2 dim o3 as new CUPSOptionMBS o3.Name = ”Collate” o3.Value = ”True” options.Append o3 dim o4 as new CUPSOptionMBS o4.Name = ”sides” o4.Value = ”two-sided-long-edge” options.Append o4

6.6.2 Properties

6.6.3 Name as String

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. Function: Name of option. Notes: (Read and Write property)

6.6.4 Value as String

Plugin Version: 9.7, Platforms: macOS, Linux, Targets: Desktop, Console & Web. 208 CHAPTER 6. CUPS Function: Value of option. Notes: (Read and Write property) Chapter 7

JavaScript

7.1 class JavaScriptDateComponentsMBS

7.1.1 class JavaScriptDateComponentsMBS

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for date components in JavaScript. Example: Dim j As New JavaScriptEngineMBS

// get now Dim t1 As Double = j.Now

// as compoents Dim d1 As JavaScriptDateComponentsMBS = j.TimeToDateComponents(t1) Dim s1 As String = d1.SQLDateTime // looks right?

// now convert back Dim t2 As Double = j.DateComponentsToTime(d1) Dim d2 As JavaScriptDateComponentsMBS = j.TimeToDateComponents(t2) Dim s2 As String = d2.SQLDateTime // still looks right?

Dim t3 As Double = j.DateComponentsToTime(d2) // should be same time as above, but without fractions

Break

209 210 CHAPTER 7. JAVASCRIPT 7.1.2 Blog Entries

• News from the MBS Xojo Plugins Version 20.1

• MonkeyBread Software Releases the MBS Xojo Plugins in version 20.1

• MBS Xojo Plugins, version 20.1pr1

7.1.3 Blog Entries

• News from the MBS Xojo Plugins Version 20.1

• MonkeyBread Software Releases the MBS Xojo Plugins in version 20.1

• MBS Xojo Plugins, version 20.1pr1

7.1.4 Properties

7.1.5 DateTimeValue as DateTime

Plugin Version: 20.5, Platforms: macOS, Linux, Windows, Targets: All. Function: The components as Xojo dateTime. Notes: Convenience function to create date with UTC and values from this object. (Read only property)

7.1.6 DateValue as Date

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: The components as Xojo date. Notes: Convenience function to create date with UTC and values from this object. (Read only property)

7.1.7 Day as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The day value. Notes: 7.1. CLASS JAVASCRIPTDATECOMPONENTSMBS 211 Ranges from 1 to 31. (Read and Write property)

7.1.8 Hour as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The hour. Notes: (Read and Write property)

7.1.9 Millisecond as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The milliseconds. Notes: (Read and Write property)

7.1.10 Minute as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The minutes. Notes: (Read and Write property)

7.1.11 Month as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The month value. Notes: Range is 1 to 12. (Read and Write property)

7.1.12 Second as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The seconds. Notes: (Read and Write property) 212 CHAPTER 7. JAVASCRIPT

7.1.13 SQLDateTime as String

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The SQL date and time. Notes: Convenience property to see value in debugger. (Read only property)

7.1.14 WeekDay as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The week day value. Notes: Range is 0 to 6. Sunday is 0, Monday is 1, Tuesday is 2, Wednesday is 3, Thursday is 4, Friday is 5 and Saturday is 6. (Read and Write property)

7.1.15 Year as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The year value. Notes: (Read and Write property) 7.2. CLASS JAVASCRIPTENGINEEXCEPTIONMBS 213 7.2 class JavaScriptEngineExceptionMBS

7.2.1 class JavaScriptEngineExceptionMBS

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a fatal exception in our JavaScript engine. Notes: See message property for reason of the exception. Subclass of the RuntimeException class.

7.2.2 Blog Entries

• Our JavaScript engine for Xojo

7.2.3 Blog Entries

• Our JavaScript engine for Xojo 214 CHAPTER 7. JAVASCRIPT 7.3 class JavaScriptEngineMBS

7.3.1 class JavaScriptEngineMBS

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for our embedded JavaScript engine. Notes: We use DukTape, an embeddable Javascript engine, with a focus on portability and compact footprint. https://duktape.org

Your own JavaScript engine is useful for:

• Running some snippet of JavaScript code without HTMLViewer.

• Using various JavaScript libraries

• Providing a scripting language to your own application.

• An lightweight alternative to XojoScript.

• Working with JSON data

• Enjoy using regular expressions, text functions, number parsing and formatting with no plat- form dependencies

MBS Plugin added Input(), Yield() and Print() functions for your convenience. Yield will pass CPU control to other threads, so background tasks continue to run.

MBS Plugin can convert JavaScript values to variant. Boolean ->Boolean Number ->Double String ->String Buffer ->MemoryBlock Pointer ->Ptr Array ->Variant array Object ->JSON string null ->nil

We convert variant to JavaScript: nil ->null Int32, Int64, Single, Double, Currency ->Number Boolean ->Boolean String, Text, Date ->String Ptr ->Pointer 7.3. CLASS JAVASCRIPTENGINEMBS 215 all other ->undefined

This class is like XojoScript, but using JavaScript as language.

Warning: error handling is broken in version 21.1 of the MBS Plugin. Please update to 22.2 for a fix.

7.3.2 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 21.2

• MBS Xojo Plugins, version 20.2pr1

• News from the MBS Xojo Plugins Version 20.1

• MBS Xojo Plugins, version 20.1pr6

• Our JavaScript engine, a game changer

• MBS Xojo Plugins, version 20.1pr2

• MBS Xojo Plugins, version 20.1pr1

• New in the MBS Xojo Plugins 20.0

• MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0

• Our JavaScript engine for Xojo

7.3.3 Videos

• XDC 2020 MBS Plugins Presentation

• MBS Xojo Videos - MBS Xojo Plugin, June 2021 News

7.3.4 Xojo Developer Magazine

• 19.5, page 92: JavaScript in Xojo, Running JavaScript in your Xojo apps by Stefanie Juchmes

• 19.4, page 9: News

• 18.3, page 10: News 216 CHAPTER 7. JAVASCRIPT 7.3.5 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 21.2

• MBS Xojo Plugins, version 20.2pr1

• News from the MBS Xojo Plugins Version 20.1

• MBS Xojo Plugins, version 20.1pr6

• Our JavaScript engine, a game changer

• MBS Xojo Plugins, version 20.1pr2

• MBS Xojo Plugins, version 20.1pr1

• New in the MBS Xojo Plugins 20.0

• MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0

• Our JavaScript engine for Xojo

7.3.6 Xojo Developer Magazine

• 19.5, page 92: JavaScript in Xojo, Running JavaScript in your Xojo apps by Stefanie Juchmes

• 19.4, page 9: News

• 18.3, page 10: News

7.3.7 Videos

• XDC 2020 MBS Plugins Presentation

• MBS Xojo Videos - MBS Xojo Plugin, June 2021 News

7.3.8 Methods

7.3.9 AddFunction(Name as String, JavaScript as String, FileName as String = ””)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Adds a global function defined as a text string. Example: Dim j As New JavaScriptEngineMBS j.AddFunction ”adder”, ”function (x,y) { return x+y; } ” 7.3. CLASS JAVASCRIPTENGINEMBS 217 Notes: Optional provide a file name to show in stack traces. Function source code may contain a function name, but we use only the name parameter to register the function as global one.

7.3.10 CallFunction(Name as String, ParamArray Params as Variant) as Vari- ant

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Calls a global function given the name. Example: Dim j As New JavaScriptEngineMBS

// just add a function j.AddFunction ”adder”, ”function (x,y) { return x+y; } ”

// call it Dim r As Variant = j.CallFunction(”adder”, 2, 3) Break // check result in debugger

Notes: Parameters are passed to the function. If the function needs more parameter, undefined values are used to fill up. If the function needs less parameters, additional ones are dropped.

Returns the result of the function converted to a variant. See also:

• 7.3.11 CallFunction(Name as String, Params() as Variant) as Variant 217

7.3.11 CallFunction(Name as String, Params() as Variant) as Variant

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Calls a global function given the name. Example: Dim j As New JavaScriptEngineMBS

// just add a function j.AddFunction ”adder”, ”function (x,y) { return x+y; } ” 218 CHAPTER 7. JAVASCRIPT

// call it Dim Params() As Variant params.Append 3 params.Append 4 params.Append 5 // one too much ->will be ignored Dim r As Variant = j.CallFunction(”adder”, params) Break // check result in debugger

Notes: Parameters are passed to the function. If the function needs more parameter, undefined values are used to fill up. If the function needs less parameters, additional ones are dropped.

Returns the result of the function converted to a variant. See also:

• 7.3.10 CallFunction(Name as String, ParamArray Params as Variant) as Variant 217

7.3.12 CallFunctionMT(Name as String, ParamArray Params as Variant) as Variant

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Calls a global function given the name. Notes: Threaded version of CallFunction. If events or delegates are called on main thread, the preemptive thread waits for answer.

Parameters are passed to the function. If the function needs more parameter, undefined values are used to fill up. If the function needs less parameters, additional ones are dropped.

Returns the result of the function converted to a variant.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 7.3.13 CallFunctionMT(Name as String, Params() as Variant) as Variant 219 7.3. CLASS JAVASCRIPTENGINEMBS 219 7.3.13 CallFunctionMT(Name as String, Params() as Variant) as Variant

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Calls a global function given the name. Notes: Threaded version of CallFunction. If events or delegates are called on main thread, the preemptive thread waits for answer.

Parameters are passed to the function. If the function needs more parameter, undefined values are used to fill up. If the function needs less parameters, additional ones are dropped.

Returns the result of the function converted to a variant.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 7.3.12 CallFunctionMT(Name as String, ParamArray Params as Variant) as Variant 218

7.3.14 DateComponentsToTime(date as JavaScriptDateComponentsMBS) as Dou- ble

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Converts date components to time. Example: Dim j As New JavaScriptEngineMBS

Dim d As New JavaScriptDateComponentsMBS d.Year = 1970 d.Month = 1 d.day = 1

// shows zero as that’s the start point in time for unix MsgBox ”Start Time: ”+Str(j.DateComponentsToTime(d))

Notes: Convert components (year, month, day, etc), interpreted in UTC, into a time value. The weekday argument is ignored in the conversion. If the component values are invalid, an error is thrown. 220 CHAPTER 7. JAVASCRIPT

There are some differences to the ECMAScript Date.UTC() built-in:

• There’s no special handling of two-digit years. For example, Date.UTC(99, 0, 1) gets interpreted as 1999-01-01. If time is 99, it’s interpreted as the year 99.

• The milliseconds component is allowed fractions (sub-millisecond resolution) so that the resulting time value may have fractions.

Like the ECMAScript primitives, the components can exceed their natural range and are normalized. For example, specifying minute as 120 is interpreted as adding 2 hours to the time value. The components are expressed as Integers to allow large and negative values to be used.

7.3.15 Destructor

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The destructor.

7.3.16 Evaluate(JavaScript as String) as Variant

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Evaluates a JavaScript expression. Example: Dim j As New JavaScriptEngineMBS

Dim v As Variant = j.Evaluate(”2+3”) MsgBox v.StringValue

Notes: This may include definition of functions and objects and using them. Result is converted to variant and returned.

7.3.17 EvaluateMT(JavaScript as String) as Variant

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. 7.3. CLASS JAVASCRIPTENGINEMBS 221 Function: Evaluates a JavaScript expression. Notes: Threaded version of Evaluate. If events or delegates are called on main thread, the preemptive thread waits for answer.

This may include definition of functions and objects and using them. Result is converted to variant and returned.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.

7.3.18 EvaluateToString(JavaScript as String) as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Evaluates a JavaScript expression. Example: Dim j As New JavaScriptEngineMBS

Dim s As String = j.EvaluateToString(”2+3”) MsgBox s

Notes: This may include definition of functions and objects and using them. Result is converted to string in JavaScript and returned as Xojo string.

7.3.19 InitModules

Plugin Version: 21.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Installs Duktape module loading. Notes: Only calls JS.InitModules once on a new instance of the JavaScript engine. Define your own Duktape.modSearch() to provide environment specific module lookups. After these steps, require() will be registered to the global object and the module system is ready to use. 222 CHAPTER 7. JAVASCRIPT 7.3.20 LoadFunction(Name as String, Data as Memoryblock) as Boolean

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Loads a global function from byte code. Example: Dim j As New JavaScriptEngineMBS

// just add a function j.AddFunction ”adder”, ”function (x,y) { return x+y; } ”

// get byte code Dim m As MemoryBlock = j.SaveFunction(”adder”)

// and load back with new name dim b as Boolean = j.LoadFunction(”adder2”, m)

// call it Dim r As Variant = j.CallFunction(”adder2”, 2, 3) break // check result in debugger

Notes: Load a buffer containing bytecode, recreating the original ECMAScript function (with some limitations). You must ensure that the bytecode has been dumped with a compatible Duktape version and that the byte- code has not been modified since. Loading bytecode from an untrusted source is memory unsafe andmay lead to exploitable vulnerabilities.

Returns true in case of success or false on failure.

7.3.21 Now as Double

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries current time as double value. Notes: This is seconds since 1st January 1970 multiplied by 1000 and may contain fraction with microseconds.

Get current time in POSIX milliseconds, as seen by the ECMAScript environment. The return value matches Date.now() with the reservation that sub-millisecond resolution may be available. 7.3. CLASS JAVASCRIPTENGINEMBS 223 7.3.22 RegisterFunction(Name as String, theDelegate as JavaScriptEngineDel- egateMBS, ArgCount as Integer = -1, tag as Variant = nil)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Registers a global function with given name to call delegate. Example: Dim j As New JavaScriptEngineMBS j.RegisterFunction ”MyFunction”, AddressOf testFunction, 1, Nil

// call in JavaScript Dim x As Variant = j.Evaluate(”MyFunction(123);”)

// call via plugin Dim r As Variant = j.CallFunction(”MyFunction”, ”Hello”)

Break

’Public Function testFunction(Name as String, Params() as Variant, tag as Variant) as Variant ’ MsgBox params(0).StringValue ’ Return ”ok” ’End Function

Notes: ArgCount can be in range from -1 to 15. If -1 is passed, we allow variable number of arguments. Tag is passed to delegate and allows you to pass a context object to the delegate.

7.3.23 SaveFunction(Name as String) as MemoryBlock

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries byte code for global JavaScript function. Example: Dim j As New JavaScriptEngineMBS

// just add a function j.AddFunction ”adder”, ”function (x,y) { return x+y; } ”

// get byte code Dim m As MemoryBlock = j.SaveFunction(”adder”) 224 CHAPTER 7. JAVASCRIPT // and load back with new name dim b as Boolean = j.LoadFunction(”adder2”, m)

// call it Dim r As Variant = j.CallFunction(”adder2”, 2, 3) break // check result in debugger

Notes: Dump an ECMAScript function at stack top into bytecode, replacing the function with a buffer containing the bytecode data. The bytecode can be loaded back using LoadFunction().

7.3.24 TimeToDateComponents(time as Double) as JavaScriptDateComponentsMBS

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Converts time to date components. Example: Dim j As New JavaScriptEngineMBS

// get now Dim t1 As Double = j.Now

// as compoents Dim d1 As JavaScriptDateComponentsMBS = j.TimeToDateComponents(t1) Dim s1 As String = d1.SQLDateTime // looks right?

Break

Notes: Convert a time value to components (year, month, day, etc) interpreted in UTC. If the time value is invalid, e.g. beyond the valid ECMAScript time range, an error is thrown.

There are some differences to the ECMAScript Date UTC accessors like Date.prototype.getUTCMinutes():

The time value is allowed to have fractions (sub-millisecond resolution) so that the millisecond component may also have fractions. 7.3. CLASS JAVASCRIPTENGINEMBS 225 7.3.25 Properties

7.3.26 Handle as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read and Write property)

7.3.27 MemoryBlocks as Dictionary

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries the dictionary with references memoryblocks. Notes: Just for debugging to inspect. Memoryblocks need to stay here to avoid them being destructed too early, which can cause crashes. (Read only property)

7.3.28 ObjectCount as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries global object counter. Notes: A fresh JavaScript engine already has about 400 objects for the built-in functionality. (Read only property)

7.3.29 StringCount as Integer

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries global string counter. Notes: A fresh JavaScript engine already has about 1000 strings. (Read only property) 226 CHAPTER 7. JAVASCRIPT 7.3.30 GlobalMemoryBlock(PropertyName as String) as MemoryBlock

Plugin Version: 20.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Query or assign a global property to reference memoryblock. Notes: A normal memoryblock passed as parameter to a function or property would be copied. This method allows you to define a buffer in JavaScript to reference the bytes in a memoryblock, soall changes are visible in Xojo directly.

You can assign nil as value to clear a memoryblock. (Read and Write computed property)

7.3.31 GlobalProperty(PropertyName as String) as Variant

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set a global property. Example: Dim j As New JavaScriptEngineMBS j.GlobalProperty(”Hello”) = ”World” MsgBox j.GlobalProperty(”Hello”)

Notes: Values are converted to/from variant. (Read and Write computed property)

7.3.32 GlobalPropertyJSON(PropertyName as String) as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set a global property as JSON. Example: Dim j As New JavaScriptEngineMBS j.GlobalProperty(”Hello”) = ”World” MsgBox j.GlobalPropertyJSON(”Hello”) j.GlobalPropertyJSON(”test”) = ” [ 1,2,3 ] ” 7.3. CLASS JAVASCRIPTENGINEMBS 227 MsgBox j.GlobalPropertyJSON(”test”)

Notes: Same as GlobalProperty, but needs JSON text. (Read and Write computed property)

7.3.33 Events

7.3.34 Input(values() as Variant) as Variant

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: . Function: The input event. Notes: Called in JavaScript with Input() function call. Takes variable number of arguments, which are provided as variants here. Return a value, which we pass through to JavaScript as function result.

7.3.35 Print(values() as Variant)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: . Function: The print event. Notes: Called in JavaScript with Print() function call. Takes variable number of arguments, which are provided as variants here.

7.3.36 Delegates

7.3.37 JavaScriptEngineDelegateMBS(Name as String, Params() as Variant, tag as Variant) as Variant

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The delegate definition for RegisterFunction function. Example: Public Function testFunction(Name as String, Params() as Variant, tag as Variant) as Variant MsgBox params(0).StringValue 228 CHAPTER 7. JAVASCRIPT Return ”ok” End Function

Notes: We pass name of function, parameters and tag value. Result is returned to JavaScript. Chapter 8

LMFit

8.1 class LMFitControlMBS

8.1.1 class LMFitControlMBS

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Collection of input parameters for fit control.

8.1.2 Blog Entries

• MBS Xojo Plugins, version 19.6pr1

8.1.3 Blog Entries

• MBS Xojo Plugins, version 19.6pr1

8.1.4 Methods

8.1.5 MsgFileStderr

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Set msgfile to stderr.

229 230 CHAPTER 8. LMFIT 8.1.6 MsgFileStdout

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Set msgfile to stdout.

8.1.7 Properties

8.1.8 epsilon as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Step used to calculate the Jacobian, should be slightly larger than the relative error in the user- supplied functions. Notes: (Read and Write property)

8.1.9 ftol as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Relative error desired in the sum of squares. Notes: Termination occurs when both the actual and predicted relative reductions in the sum of squares are at most ftol. (Read and Write property)

8.1.10 gtol as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Orthogonality desired between fvec and its derivs. Notes: Termination occurs when the cosine of the angle between fvec and any column of the Jacobian is at most gtol in absolute value. (Read and Write property)

8.1.11 msgfile as FolderItem

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. 8.1. CLASS LMFITCONTROLMBS 231 Function: Progress messages will be written to this file. Notes: (Read and Write property)

8.1.12 m_maxpri as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: -1, or max number of residuals to print. Notes: (Read and Write property)

8.1.13 n_maxpri as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: -1, or max number of parameters to print. Notes: (Read and Write property)

8.1.14 patience as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Used to set the maximum number of function evaluations to patience*(number_of_parame- ters+1). Notes: (Read and Write property)

8.1.15 scale_diag as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: If 1, the variables will be rescaled internally. Notes: Recommended value is 1. (Read and Write property)

8.1.16 stepbound as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. 232 CHAPTER 8. LMFIT Function: Used in determining the initial step bound. Notes: This bound is set to the product of stepbound and the Euclidean norm of diag*x if nonzero, or else to stepbound itself. In most cases stepbound should lie in the interval (0.1,100.0). Generally, the value 100.0 is recommended. (Read and Write property)

8.1.17 verbosity as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The verbosity flags. Notes: OR’ed: 1: print some messages; 2: print Jacobian. (Read and Write property)

8.1.18 xtol as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Relative error between last two approximations. Notes: Termination occurs when the relative error between two consecutive iterates is at most xtol. (Read and Write property) 8.2. CLASS LMFITMBS 233 8.2 class LMFitMBS

8.2.1 class LMFitMBS

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: A class to run Levenberg-Marquardt least squares fitting algorithm. Notes: Based on lmfit library from Joachim Wuttke, Forschungszentrum Juelich GmbH (2004-2013).

8.2.2 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0

• MBS Xojo Plugins, version 19.6pr1

8.2.3 Videos

• XDC 2020 MBS Plugins Presentation

8.2.4 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0

• MBS Xojo Plugins, version 19.6pr1

8.2.5 Videos

• XDC 2020 MBS Plugins Presentation

8.2.6 Methods

8.2.7 LMCurve(NPar as Integer, Par as Ptr, mDat as Integer, t as Ptr, y as Ptr, control as LMFitControlMBS, status as LMFitStatusMBS, tag as variant = nil)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Runs curve algorithm. Notes: NPar is the number of variables (INPUT, positive integer). Par is the solution vector (INPUT/OUTPUT, array of length n). On input it must be set to an estimated solution. On output it yields the final estimate of the solution. 234 CHAPTER 8. LMFIT mDat is the number of functions to be minimized (INPUT, positive integer). It must fulfill m>=n.

Calls evaluateCurve event to query values. control contains INPUT variables that control the fit algorithm, as declared and explained in lmstruct.h status contains OUTPUT variables that inform about the fit result, as declared and explained in lmstruct.h See also:

• 8.2.8 LMCurve(NPar as Integer, Par() as double, mDat as Integer, t() as double, y() as double, control as LMFitControlMBS, status as LMFitStatusMBS, tag as variant = nil) 234

8.2.8 LMCurve(NPar as Integer, Par() as double, mDat as Integer, t() as dou- ble, y() as double, control as LMFitControlMBS, status as LMFitSta- tusMBS, tag as variant = nil)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Runs curve algorithm. Notes: NPar is the number of variables (INPUT, positive integer). Par is the solution vector (INPUT/OUTPUT, array of length n). On input it must be set to an estimated solution. On output it yields the final estimate of the solution. mDat is the number of functions to be minimized (INPUT, positive integer). It must fulfill m>=n.

Calls evaluateCurve event to query values. control contains INPUT variables that control the fit algorithm, as declared and explained in lmstruct.h status contains OUTPUT variables that inform about the fit result, as declared and explained in lmstruct.h See also:

• 8.2.7 LMCurve(NPar as Integer, Par as Ptr, mDat as Integer, t as Ptr, y as Ptr, control as LMFitCon- trolMBS, status as LMFitStatusMBS, tag as variant = nil) 233

8.2.9 LMMin(NPar as Integer, Par as Ptr, mDat as Integer, control as LMFit- ControlMBS, status as LMFitStatusMBS, tag as variant = nil)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Runs Levenberg-Marquardt minimization. Notes: This routine contains the core algorithm of our library. 8.2. CLASS LMFITMBS 235 It minimizes the sum of the squares of m nonlinear functions in n variables by a modified Levenberg- Marquardt algorithm. The function evaluation is done by the user-provided routine ’evaluate’. The Jacobian is then calculated by a forward-difference approximation.

Parameters:

NPar is the number of variables (INPUT, positive integer). Par is the solution vector (INPUT/OUTPUT, array of length n). On input it must be set to an estimated solution. On output it yields the final estimate of the solution. This should be memoryblock with double values. mDat is the number of functions to be minimized (INPUT, positive integer). It must fulfill m>=n.

Calls evaluateMin event to query values. control contains INPUT variables that control the fit algorithm, as declared and explained in lmstruct.h status contains OUTPUT variables that inform about the fit result, as declared and explained in lmstruct.h See also:

• 8.2.10 LMMin(NPar as Integer, Par() as double, mDat as Integer, control as LMFitControlMBS, status as LMFitStatusMBS, tag as variant = nil) 235

8.2.10 LMMin(NPar as Integer, Par() as double, mDat as Integer, control as LMFitControlMBS, status as LMFitStatusMBS, tag as variant = nil)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Runs Levenberg-Marquardt minimization. Notes: This routine contains the core algorithm of our library.

It minimizes the sum of the squares of m nonlinear functions in n variables by a modified Levenberg- Marquardt algorithm. The function evaluation is done by the user-provided routine ’evaluate’. The Jacobian is then calculated by a forward-difference approximation.

Parameters:

NPar is the number of variables (INPUT, positive integer). Par is the solution vector (INPUT/OUTPUT, array of length n). On input it must be set to an estimated solution. On output it yields the final estimate of the solution. mDat is the number of functions to be minimized (INPUT, positive integer). It must fulfill m>=n.

Calls evaluateMin event to query values. 236 CHAPTER 8. LMFIT control contains INPUT variables that control the fit algorithm, as declared and explained in lmstruct.h status contains OUTPUT variables that inform about the fit result, as declared and explained in lmstruct.h See also:

• 8.2.9 LMMin(NPar as Integer, Par as Ptr, mDat as Integer, control as LMFitControlMBS, status as LMFitStatusMBS, tag as variant = nil) 234

8.2.11 Properties

8.2.12 provideArrays as Boolean

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether to fill parameter array for evaluateMin event. Notes: If provideArrays property is true, we provide values via parameters array, which may be slower than using par pointer. (Read and Write property)

8.2.13 Events

8.2.14 evaluateCurve(t as double, par as Ptr, nPar as Integer, parameters() as double, tag as variant) as double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: . Function: Evaluate is a event that calculates the m functions. Notes: The parameter par, nPar, parameters and mDat are passed through from the call to LMCurve. fvec is an array of length m; on OUTPUT, it must contain the m function values for the parameter vector x.

If you return a nonzero value, lmmin will terminate. Return zero to continue.

If provideArrays property is true, we provide values via parameters array, which may be slower than using par pointer. 8.2. CLASS LMFITMBS 237 8.2.15 evaluateMin(par as Ptr, nPar as Integer, parameters() as double, mDat as Integer, fvec as Ptr, tag as variant) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: . Function: Evaluate is a event that calculates the m functions. Notes: The parameter par, nPar, parameters and mDat are passed through from the call to LMMin. fvec is an array of length m; on OUTPUT, it must contain the m function values for the parameter vector x.

If you return a nonzero value, lmmin will terminate. Return zero to continue.

If provideArrays property is true, we provide values via parameters array, which may be slower than using par pointer. 238 CHAPTER 8. LMFIT 8.3 class LMFitStatusMBS

8.3.1 class LMFitStatusMBS

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Collection of output parameters for status info.

8.3.2 Blog Entries

• MBS Xojo Plugins, version 19.6pr1

8.3.3 Blog Entries

• MBS Xojo Plugins, version 19.6pr1

8.3.4 Properties

8.3.5 fnorm as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Norm of the residue vector fvec. Notes: (Read and Write property)

8.3.6 nfev as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Actual number of iterations. Notes: (Read and Write property)

8.3.7 outcome as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Status indicator. Notes: 8.3. CLASS LMFITSTATUSMBS 239 Nonnegative values are used as index for the message text. (Read and Write property)

8.3.8 outcomeInfoMessage as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The info message text. Notes: The plugin looks up text based on outcome value. (Read only property)

8.3.9 outcomeShortMessage as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The short message text. Notes: The plugin looks up text based on outcome value. (Read only property)

8.3.10 userbreak as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Set when function evaluation requests termination. Notes: (Read and Write property) 240 CHAPTER 8. LMFIT Chapter 9

MarkDown

9.1 class MarkdownDocumentMBS

9.1.1 class MarkdownDocumentMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The class ot process markdown text.

9.1.2 Blog Entries

• MBS Xojo Plugins, version 20.6pr1

9.1.3 Blog Entries

• MBS Xojo Plugins, version 20.6pr1

9.1.4 Methods

9.1.5 Compile(flags as Integer = 35799040) as boolean

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Compiles the markdown code.

241 242 CHAPTER 9. MARKDOWN 9.1.6 Constructor(data as string, flags as Integer = 35799040)

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new document with the content of the file. Notes: Text should have EndOfLine.Unix as newline character. Text must be in UTF-8 encoding to work best. See also:

• 9.1.7 Constructor(file as folderitem, flags as Integer = 35799040) 242

9.1.7 Constructor(file as folderitem, flags as Integer = 35799040)

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new document with the content of the file. Notes: Text should have EndOfLine.Unix as newline character. Text must be in UTF-8 encoding to work best. See also:

• 9.1.6 Constructor(data as string, flags as Integer = 35799040) 242

9.1.8 CSS as string

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates CSS for the html code.

9.1.9 Document as string

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Generates HTML document. Notes: Creates HTML if needed.

9.1.10 Footnotes as MarkdownFootnoteMBS()

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries list of foot notes. 9.1. CLASS MARKDOWNDOCUMENTMBS 243 9.1.11 GenerateCSS(File as folderitem) as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Generates a css file. Notes: Returns number of bytes written. Or -1 on any error.

9.1.12 GenerateHTML(File as folderitem) as boolean

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Generates a html file. Notes: Returns true on success and false on failure.

9.1.13 Properties

9.1.14 Author as MarkdownLineMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The author line. Notes: Can be nil if not used. (Read only property)

9.1.15 Code as MarkdownParagraphMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Intermediate code generated by compile. Notes: (Read only property)

9.1.16 Compiled as Boolean

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether document is compiled already. Notes: (Read only property) 244 CHAPTER 9. MARKDOWN 9.1.17 Date as MarkdownLineMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The date line. Notes: Can be nil if not used. (Read only property)

9.1.18 ExtraFootnotePrefix as String

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The extra footnote prefix. Notes: (Read and Write property)

9.1.19 Handle as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Internal object reference. Notes: (Read only property)

9.1.20 HasHTML as Boolean

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether html is available. Notes: Set to true when html is generated. (Read only property)

9.1.21 Title as MarkdownLineMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The title line. Notes: Can be nil if not used. (Read only property) 9.1. CLASS MARKDOWNDOCUMENTMBS 245

9.1.22 URLBase as String

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The URL base. Notes: (Read and Write property)

9.1.23 Constants

9.1.24 kAutoLink = & h4000

Plugin Version: 15.1. Function: One of the flag values. Notes: make http://foo.com link even without <>s

9.1.25 kCDATA = & h80

Plugin Version: 15.1. Function: One of the flag values. Notes: generate code for xml ! [ CDATA [ ... ]]

9.1.26 kExtraFootnote = & h200000

Plugin Version: 15.1. Function: One of the flag values. Notes: Enable markdown extra-style footnotes.

9.1.27 kInputMask = & h00030000

Plugin Version: 15.1. Function: One of the flag values. 246 CHAPTER 9. MARKDOWN 9.1.28 kIsLabel = & h08000000

Plugin Version: 15.1. Function: One of the flag values.

9.1.29 kNoAlphaList = & h80000

Plugin Version: 15.1. Function: One of the flag values. Notes: Forbid alphabetic lists.

9.1.30 kNoDivQuote = & h40000

Plugin Version: 15.1. Function: One of the flag values. Notes: Forbid >% class% blocks.

9.1.31 kNoDList = & h100000

Plugin Version: 15.1. Function: One of the flag values. Notes: Forbid definition lists.

9.1.32 kNoExt = & h40

Plugin Version: 15.1. Function: One of the flag values. Notes: Don’t allow pseudo-protocols.

9.1.33 kNoHeader = & h10000

Plugin Version: 15.1. Function: One of the flag values. Notes: Don’t process header blocks. 9.1. CLASS MARKDOWNDOCUMENTMBS 247

9.1.34 kNoHTML = 8

Plugin Version: 15.1. Function: One of the flag values. Notes: Don’t allow raw html through AT ALL

9.1.35 kNoImage = 2

Plugin Version: 15.1. Function: One of the flag values. Notes: Don’t do image processing, block .

9.1.36 kNoLinks = 1

Plugin Version: 15.1. Function: One of the flag values. Notes: Don’t do link processing, block tags.

9.1.37 kNoPants = 4

Plugin Version: 15.1. Function: One of the flag values. Notes: don’t run smartypants.

9.1.38 kNoRelaxed = & h200

Plugin Version: 15.1. Function: One of the flag values. Notes: emphasis happens /everywhere/ 248 CHAPTER 9. MARKDOWN 9.1.39 kNoStrikethrough = & h800

Plugin Version: 15.1. Function: One of the flag values. Notes: Forbid strikethrough.

9.1.40 kNoSuperscript = & h100

Plugin Version: 15.1. Function: One of the flag values. Notes: no A^B

9.1.41 kNoTables = & h400

Plugin Version: 15.1. Function: One of the flag values. Notes: Disallow tables.

9.1.42 kSafeLink = & h8000

Plugin Version: 15.1. Function: One of the flag values. Notes: Paranoid check for link protocol.

9.1.43 kStrict = & h10

Plugin Version: 15.1. Function: One of the flag values. Notes: Disable SUPERSCRIPT, RELAXED_EMPHASIS.

9.1.44 kTabStop = & h20000

Plugin Version: 15.1. 9.1. CLASS MARKDOWNDOCUMENTMBS 249 Function: One of the flag values. Notes: Expand tabs to 4 spaces.

9.1.45 kTagText = & h20

Plugin Version: 15.1. Function: One of the flag values. Notes: process text inside an html tag; no * , no , no html or [] expansion

9.1.46 kTOC = & h1000

Plugin Version: 15.1. Function: One of the flag values. Notes: Do table-of-contents processing.

9.1.47 kUserFlags = & h0FFFFFFF

Plugin Version: 15.1. Function: One of the flag values. 250 CHAPTER 9. MARKDOWN 9.2 class MarkdownFootnoteMBS

9.2.1 class MarkdownFootnoteMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a foot note. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

9.2.2 Methods

9.2.3 Constructor

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

9.2.4 Properties

9.2.5 Document as MarkdownDocumentMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The back reference to the markdown document. Notes: (Read only property)

9.2.6 Flags as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The flags. Notes: Can be zero or a combination of kFlagExtraBookmark and kFlagReferenced. (Read only property)

9.2.7 Height as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. 9.2. CLASS MARKDOWNFOOTNOTEMBS 251 Function: The dimensions for image link. Notes: (Read only property)

9.2.8 Link as String

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: What this footnote points to. Notes: (Read only property)

9.2.9 RefNumber as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The reference number. Notes: (Read only property)

9.2.10 Tag as String

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tag for the reference link. Notes: (Read only property)

9.2.11 Title as String

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The title of the footnode. Notes: (Read only property)

9.2.12 Width as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The dimensions for image link. Notes: (Read only property) 252 CHAPTER 9. MARKDOWN 9.2.13 Constants

9.2.14 kFlagExtraBookmark = 1

Plugin Version: 15.1. Function: One of the footnode flags.

9.2.15 kFlagReferenced = 2

Plugin Version: 15.1. Function: One of the footnode flags. Notes: Set if this footnote is referenced. 9.3. CLASS MARKDOWNLINEMBS 253 9.3 class MarkdownLineMBS

9.3.1 class MarkdownLineMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a line in the markdown text. Notes: Each input line is read into a Line, which contains the line, the offset of the first non-space character [ this assumes that all tabs will be expanded to spaces! ] , and a pointer to the next line. This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

9.3.2 Methods

9.3.3 Constructor

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

9.3.4 Properties

9.3.5 Count as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The kind of this line. Notes: See kKind* constants. (Read only property)

9.3.6 DLE as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The leading indent on the line. Notes: (Read only property) 254 CHAPTER 9. MARKDOWN 9.3.7 Document as MarkdownDocumentMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The back reference to the markdown document. Notes: (Read only property)

9.3.8 Flags as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Special attributes for this line. Notes: Can be combination of kFlag* constants. (Read only property)

9.3.9 Kind as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The line type. Notes: See kKind* constants. (Read only property)

9.3.10 NextLine as MarkdownLineMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The next line. Notes: (Read only property)

9.3.11 Text as String

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The text of the line. Notes: (Read only property) 9.3. CLASS MARKDOWNLINEMBS 255 9.3.12 Constants

9.3.13 kFlagChecked = 2

Plugin Version: 15.1. Function: One of the flag constants. Notes: The line was already processed.

9.3.14 kFlagPipeChar = 1

Plugin Version: 15.1. Function: One of the flag constants. Notes: line contains a |

9.3.15 kKindCode = 1

Plugin Version: 15.1. Function: One of the kind values. Notes: Code

9.3.16 kKindDash = 3

Plugin Version: 15.1. Function: One of the kind values. Notes: Dash line

9.3.17 kKindEqual = 5

Plugin Version: 15.1. Function: One of the kind values. Notes: Equal line 256 CHAPTER 9. MARKDOWN 9.3.18 kKindHR = 2

Plugin Version: 15.1. Function: One of the kind values. Notes: HR line

9.3.19 kKindText = 0

Plugin Version: 15.1. Function: One of the kind values. Notes: Text line

9.3.20 kKindTilde = 4

Plugin Version: 15.1. Function: One of the kind values. Notes: Tilde line 9.4. CLASS MARKDOWNPARAGRAPHMBS 257 9.4 class MarkdownParagraphMBS

9.4.1 class MarkdownParagraphMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The class ofr a paragraph. Notes: A paragraph is a collection of Lines, with links to the next paragraph and (if it’s a QUOTE, UL, or OL) to the reparsed contents of this paragraph. This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

9.4.2 Methods

9.4.3 Constructor

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

9.4.4 Properties

9.4.5 Align as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The paragraph alignment. Notes: Can be kAlignPara, kAlignImplicit or kAlignCenter. (Read only property)

9.4.6 Document as MarkdownDocumentMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The back reference to the markdown document. Notes: (Read only property) 258 CHAPTER 9. MARKDOWN 9.4.7 Down as MarkdownParagraphMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Recompiled contents of this paragraph. Notes: (Read only property)

9.4.8 hNumber as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The header level for HDR. Notes: (Read only property)

9.4.9 Ident as String

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: ID tag for quote. Notes: (Read only property)

9.4.10 Lang as String

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: lang attribute for CODE Notes: (Read only property)

9.4.11 NextParagraph as MarkdownParagraphMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The next paragraph. Notes: (Read only property)

9.4.12 Text as MarkdownLineMBS

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. 9.4. CLASS MARKDOWNPARAGRAPHMBS 259 Function: All the text in this paragraph. Notes: (Read only property)

9.4.13 Typ as Integer

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The type of paragraph. Notes: See kType* constants. (Read only property)

9.4.14 Constants

9.4.15 kAlignCenter = 2

Plugin Version: 15.1. Function: One of the alignment constants. Notes: Center

9.4.16 kAlignImplicit = 0

Plugin Version: 15.1. Function: One of the alignment constants. Notes: Implicit alignment

9.4.17 kAlignPara = 1

Plugin Version: 15.1. Function: One of the alignment constants. Notes: Paragraph

9.4.18 kTypeAL = 9

Plugin Version: 15.1. 260 CHAPTER 9. MARKDOWN Function: One of the type codes. Notes: AL

9.4.19 kTypeCode = 1

Plugin Version: 15.1. Function: One of the type codes. Notes: Code

9.4.20 kTypeDL = 6

Plugin Version: 15.1. Function: One of the type codes. Notes: DL

9.4.21 kTypeHDR = 11

Plugin Version: 15.1. Function: One of the type codes. Notes: HDR

9.4.22 kTypeHR = 12

Plugin Version: 15.1. Function: One of the type codes. Notes: HR

9.4.23 kTypeHTML = 4

Plugin Version: 15.1. Function: One of the type codes. Notes: HTML 9.4. CLASS MARKDOWNPARAGRAPHMBS 261 9.4.24 kTypeListItem = 10

Plugin Version: 15.1. Function: One of the type codes. Notes: ListItem

9.4.25 kTypeMarkup = 3

Plugin Version: 15.1. Function: One of the type codes. Notes: Markup

9.4.26 kTypeOL = 8

Plugin Version: 15.1. Function: One of the type codes. Notes: OL

9.4.27 kTypeQuote = 2

Plugin Version: 15.1. Function: One of the type codes. Notes: Quote

9.4.28 kTypeSource = 14

Plugin Version: 15.1. Function: One of the type codes. Notes: Source

9.4.29 kTypeStyle = 5

Plugin Version: 15.1. 262 CHAPTER 9. MARKDOWN Function: One of the type codes. Notes: Style

9.4.30 kTypeTable = 13

Plugin Version: 15.1. Function: One of the type codes. Notes: Table

9.4.31 kTypeUL = 7

Plugin Version: 15.1. Function: One of the type codes. Notes: UL

9.4.32 kTypeWhitespace = 0

Plugin Version: 15.1. Function: One of the type codes. Notes: Whitespace Chapter 10

PHP

10.1 class PHPMBS

10.1.1 class PHPMBS

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: A class for the PHP library. Notes: For Linux and Mac OS X the PHP library is included in the plugin. Plugin version 15.3 is built for PHP 5.6.12.

10.1.2 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 18.1 • MBS Xojo Plugins, version 18.1pr2 • The Status of our PHP support • MonkeyBread Software Releases the MBS Xojo plug-ins in version 17.0 • MBS Xojo / Real Studio Plugins, version 17.0pr1 • [ ANN ] MonkeyBread Software Releases the MBS Xojo / Real Studio plug-ins in version 15.3 • MBS Real Studio Plugins, version 12.5pr8 • MBS REALbasic Plugins Version 10.4 release notes • MBS REALbasic Plugins, version 10.4pr3 • MonkeyBread Software Releases the MBS REALbasic plug-ins 9.2

263 264 CHAPTER 10. PHP 10.1.3 Videos

• PHP

10.1.4 Xojo Developer Magazine

• 13.6, page 10: News

10.1.5 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 18.1

• MBS Xojo Plugins, version 18.1pr2

• The Status of our PHP support

• MonkeyBread Software Releases the MBS Xojo plug-ins in version 17.0

• MBS Xojo / Real Studio Plugins, version 17.0pr1

• [ ANN ] MonkeyBread Software Releases the MBS Xojo / Real Studio plug-ins in version 15.3

• MBS Real Studio Plugins, version 12.5pr8

• MBS REALbasic Plugins Version 10.4 release notes

• MBS REALbasic Plugins, version 10.4pr3

• MonkeyBread Software Releases the MBS REALbasic plug-ins 9.2

10.1.6 Xojo Developer Magazine

• 13.6, page 10: News

10.1.7 Videos

• PHP

10.1.8 Methods

10.1.9 CallbackArgumentCount as Integer

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the number of arguments to the callback event. Notes: Returns 0 on any error. 10.1. CLASS PHPMBS 265 10.1.10 CallbackArgumentDouble(index as Integer) as Double

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Converts the parameter with the given index to double and returns it. Notes: Returns 0 on any error.

10.1.11 CallbackArgumentInteger(index as Integer) as Integer

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Converts the parameter with the given index to integer and returns it. Notes: Returns 0 on any error.

10.1.12 CallbackArgumentString(index as Integer) as string

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Converts the parameter with the given index to string and returns it. Notes: Returns an empty string on any error.

10.1.13 Constructor

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Initializes the PHP engine. Example: const path=”php.dll” call PHPMBS.LoadLibrary(path) // load the dll dim p as new PHPMBS // initialize if p.inited then // worked? msgbox ”ok” end if

Notes: In older plugins this work was done by the method Init. 266 CHAPTER 10. PHP 10.1.14 Execute(code as string) as string

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Runs php code. Example: dim p as PHPMBS p=new PHPMBS MsgBox p.Execute(”echo ””Hello””;”)

Notes: Same as run, but does not call the write event, but return the whole output as one big string.

10.1.15 existsVariable(name as string) as boolean

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks whether variable exists or not. Notes: getVariable returns ”” for variables which don’t exist, but your variable may just be an empty string so this function lets you know whether the variable actually exists.

10.1.16 getVariable(name as string) as string

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns value of the variable with the given name. Notes: Returns an empty string if the variable name is wrong.

10.1.17 LoadExtension(Path as string) as boolean

Plugin Version: 15.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Loads an extension. Notes: Returns true on success. Will write errors to stderr which you see in console apps. 10.1. CLASS PHPMBS 267 10.1.18 LoadLibrary(file as folderitem) as boolean

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Loads the PHP shared library. Notes: Loads a Windows DLL, a Linux shared library, a Mac OS X shared library from the given path. Returns true on success and false on any error. It may be possible that your PHP library is not compatible with this way of loading which results in crashes. See also:

• 10.1.19 LoadLibrary(path as string) as boolean 267

10.1.19 LoadLibrary(path as string) as boolean

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Loads the PHP shared library. Notes: Loads a Windows DLL, a Linux shared library, a Mac OS X shared library from the given path. Returns true on success and false on any error. It may be possible that your PHP library is not compatible with this way of loading which results in crashes. See also:

• 10.1.18 LoadLibrary(file as folderitem) as boolean 267

10.1.20 Run(code as string) as boolean

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Runs PHP code. Example: dim php as PHPMBS // your php object if php.run(”echo 1+2;”) then // ok else // failed end if

Notes: Returns true on success. Returns false on any compilation error or the library is not loaded/available. 268 CHAPTER 10. PHP

You need to wrap your code into exception handlers as the plugin will ignore all exceptions and if you want to find errors, you need to catch them yourself.

10.1.21 setVariable(name as string, value as string)

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets the variable with the given name to the given value.

10.1.22 Properties

10.1.23 Inited as Boolean

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether the PHP library has been initialized. Notes: Returns true on success. (Read only property)

10.1.24 LastErrorFile as String

Plugin Version: 18.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The last error file name. Notes: (Read and Write property)

10.1.25 LastErrorLine as Integer

Plugin Version: 18.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The last error line. Notes: (Read and Write property)

10.1.26 LastErrorMessage as String

Plugin Version: 18.1, Platforms: macOS, Linux, Windows, Targets: All. 10.1. CLASS PHPMBS 269 Function: The last error message. Notes: (Read and Write property)

10.1.27 LastExitStatus as Integer

Plugin Version: 15.3, Platforms: macOS, Linux, Windows, Targets: All. Function: The last exit status. Notes: (Read and Write property)

10.1.28 Loaded as Boolean

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether the PHP library has been loaded. Notes: Returns true on success. (Read only property)

10.1.29 UseUTF8 as Boolean

Plugin Version: 17.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether to use UTF-8 text encoding. Notes: By default we use ISO Latin1 encoding. But you can ask for passing UTF-8 to/from PHP.

If enabled and a text is passed back from PHP which is not valid UTF-8, we still returned it marked as Latin1. (Read and Write property)

10.1.30 INI as String

Plugin Version: 16.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The PHP Ini to use. Notes: 270 CHAPTER 10. PHP Must be called before initialization.

Default is: html_errors=0 register_argc_argv=1 implicit_flush=1 output_buffering=0 max_execution_time=0 max_input_time=-1 (Read and Write computed property)

10.1.31 Events

10.1.32 Callback(ArgumentCount as Integer) as Variant

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: . Function: The event called when you call the php function callXojo() Notes: Return a variant with double, float, string or integer value. Parameters are available using CallbackArgument* functions.

10.1.33 LogMessage(message as string)

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: . Function: A message for the log file. Notes: Normally written by apache to the log files.

10.1.34 Write(data as string)

Plugin Version: 12.4, Platforms: macOS, Linux, Windows, Targets: . Function: PHP wants to write some data. Notes: This text is normally the result, e.g. the content of the website the php code produces.

If php.ini file is used, you need to disable the output_buffering option to have this callback working. Chapter 11

Regular Expressions

11.1 class RegExMBS

11.1.1 class RegExMBS

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: A class for fast Regular Expression Search in a compatible way. Example: dim r as new RegExMBS dim searchString as string = ”.o” if r.Compile(searchString) then dim s as string=”Hello World” dim start as Integer = 0 while r.Execute(s,start)>0 dim p as Integer = r.OffsetCharacters(0) dim l as Integer = r.OffsetCharacters(1)-r.OffsetCharacters(0)

MsgBox ”Found ”+searchString+” on position ”+str(p)+” with length ”+str(l)+” in ”””+s+”””” start = r.Offset(1) wend else MsgBox ”failed to compile” end if

271 272 CHAPTER 11. REGULAR EXPRESSIONS

Notes: uses the PCRE library. You may check the PCRE documentation.

The RegExMBS class has different defaults as the built in RegEx class in Xojo.

You may want to set options like this:

RB: CaseSensitive = false MBS: CompileOptionCaseLess = true

RB: DotMatchAll = false MBS: CompileOptionDotAll = false

RB: Greedy = true MBS: CompileOptionUngreedy = false

RB: LineEndType = 0 MBS: CompileOptionNewLineAnyCRLF = true and ExecuteOptionNewLineAnyCRLF = true

RB: MatchEmpty = true MBS: ExecuteOptionNotEmpty = false and you want to set CompileOptionMultiline to true for multi line match.

11.1.2 Blog Entries

• RegEx Speedup • MBS Xojo Plugins, version 19.6pr1 • MBS Xojo / Real Studio Plugins, version 15.1pr1 • MBS Xojo / Real Studio Plugins, version 14.4pr7 • MBS Real Studio Plugins, version 13.1pr7 • MBS Real Studio Plugins, version 13.1pr6 • MBS Real Studio Plugins, version 11.4pr2 • MBS Real Studio Plugins, version 11.4pr1 • MBS Real Studio Plugins, version 11.3pr11 • MBS Real Studio Plugins, version 11.2pr8 11.1. CLASS REGEXMBS 273 11.1.3 Xojo Developer Magazine

• 12.4, page 73: Eureka!, Tips and Tricks for the Xojo Developer by Markus Winter • 12.3, page 91: Group-Ease (and Subgroup-Ease), Everything You Need To Know About Subgroups by Kem Tekinay • 11.6, page 8: News

11.1.4 Blog Entries

• RegEx Speedup • MBS Xojo Plugins, version 19.6pr1 • MBS Xojo / Real Studio Plugins, version 15.1pr1 • MBS Xojo / Real Studio Plugins, version 14.4pr7 • MBS Real Studio Plugins, version 13.1pr7 • MBS Real Studio Plugins, version 13.1pr6 • MBS Real Studio Plugins, version 11.4pr2 • MBS Real Studio Plugins, version 11.4pr1 • MBS Real Studio Plugins, version 11.3pr11 • MBS Real Studio Plugins, version 11.2pr8

11.1.5 Xojo Developer Magazine

• 12.4, page 73: Eureka!, Tips and Tricks for the Xojo Developer by Markus Winter • 12.3, page 91: Group-Ease (and Subgroup-Ease), Everything You Need To Know About Subgroups by Kem Tekinay • 11.6, page 8: News

11.1.6 Methods

11.1.7 Compile(pattern as string) as boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Compiles a pattern. Example: dim r as new RegExMBS dim searchString as string = ”.o” 274 CHAPTER 11. REGULAR EXPRESSIONS if r.Compile(searchString) then msgbox ”OK” else MsgBox ”failed to compile” end if

Notes: Some predefined patterns like \b do not support Unicode well, so you may work around that by usingyour own pattern.

Returns true on success and false on failure. ErrorMessage, Lasterror, ErrorOffset and Handle are set.

The following table lists the error codes than may be returned by Compile(), along with the error messages that may be returned by both compiling functions.

11.1.8 CompileMemory(pattern as memoryblock, ByteOffset as Integer) as boolean

Plugin Version: 6.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Compiles a pattern. Notes: Same as Compile, but the text is stored in a memoryblock and must be a 0 terminated C string. Be careful to use valid UTF8 input and provide offset in byte units and not in characters.

11.1.9 ConfigBSR as boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns an integer whose value indicates what character sequences the \R escape sequence matches by default. Notes: A value of 0 means that \R matches any Unicode line ending sequence; a value of 1 means that \R matches only CR, LF, or CRLF. The default can be overridden when a pattern is compiled or matched.

11.1.10 ConfigLinkSize as Integer

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. 11.1. CLASS REGEXMBS 275 Function: Returns an integer that contains the number of bytes used for internal linkage in compiled regular expressions. Notes: The value is 2, 3, or 4. Larger values allow larger regular expressions to be compiled, at the expense of slower matching. The default value of 2 is sufficient for all but the most massive patterns, since it allows the compiled pattern to be up to 64K in size.

11.1.11 ConfigMallocThreshold as Integer

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The output is an integer that contains the threshold above which the POSIX interface uses malloc() for output vectors.

11.1.12 ConfigMatchLimit as Integer

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns an integer that gives the default limit for the number of internal matching function calls in a Execute execution.

11.1.13 ConfigMatchLimitRecursion as Integer

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns an integer that gives the default limit for the depth of recursion when calling the internal matching function in a Execute() execution.

11.1.14 ConfigNewLine as Integer

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: What newline character is used as default. Notes: The output is an integer whose value specifies the default character sequence that is recognized as meaning ”newline”. The four values that are supported are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF, and -1 for ANY. Though they are derived from ASCII, the same values are returned in EBCDIC environments. The default should normally correspond to the standard sequence for your operating system. 276 CHAPTER 11. REGULAR EXPRESSIONS 11.1.15 ConfigStackRecurse as boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns an integer that is set to one if internal recursion when running Execute() is implemented by recursive function calls that use the stack to remember their state. Notes: This is the usual way that PCRE is compiled. The output is zero if PCRE was compiled to use blocks of data on the heap instead of recursive function calls. In this case, malloc and free are called to manage memory blocks on the heap, thus avoiding the use of the stack.

11.1.16 ConfigUnicodeProperties as boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns true if unicode properties are available. Notes: Should be true for the plugin.

11.1.17 ConfigUTF8 as boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether UTF8 is supported. Notes: If this ever is false, please complain. This plugin is designed to work only on UTF8 strings for best performance.

11.1.18 Constructor(VecSize as Integer = 0)

Plugin Version: 13.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The constructor. Notes: You pass here the internal vector size which limits how many substrings you can find. For 20 substrings, you need to pass (20+1)*3 for vector size.

11.1.19 Escape(text as string) as string

Plugin Version: 7.8, Platforms: macOS, Linux, Windows, Targets: All. Function: Escapes the string. Example: 11.1. CLASS REGEXMBS 277 dim r as new RegExMBS dim s as string = ”Hello [] ” dim e as string = r.Escape(s) MsgBox e // shows Hello \[ \] dim d as string = r.Unescape(e) MsgBox d // shows original string

Notes: The string is converted to UTF8 and all the RegEx special characters are escaped. Returns ”” on low memory.

11.1.20 Execute(start as Integer = 0) as Integer

Plugin Version: 13.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Performs a search with the compiled pattern again. Notes: You can use this variant of execute to continue a search in the same string/memoryblock at a new starting offset. See also:

• 11.1.21 Execute(text as string, start as Integer = 0) as Integer 277

11.1.21 Execute(text as string, start as Integer = 0) as Integer

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Performs a search with the compiled pattern. Example: dim r as RegExMbs dim s as string dim c as Integer s=”123 ABC 456” r=new RegExMBS if r.Compile(” \D+ ”) then c=r.Execute(s,0) MsgBox str(c)+””+str(r.Offset(0))+””+str(r.Offset(1)) // shows: 1 3 8 // 1 for number of results // 3 for 3 bytes before the matched pattern 278 CHAPTER 11. REGULAR EXPRESSIONS // 8 for the 8 bytes before the end of the matched pattern end if

Notes: Returns the number of found offsets. text must be in UTF-8 text encoding. Start must be 0 for the first character and the byte offset for other chacters. Do not pass valuesfrom OffsetCharacters here!

Return values from Execute: If Execute() fails, it returns a negative number. The following are defined in the header file:

See also:

• 11.1.20 Execute(start as Integer = 0) as Integer 277

11.1.22 ExecuteMemory(text as memoryblock, ByteOffset as Integer = 0, Byte- Length as Integer = 0) as Integer

Plugin Version: 6.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Performs a search with the compiled pattern. Notes: Same as Execute, but the text is stored in a memoryblock. Be careful to use valid UTF8 input and provide offset and length in byte units and not in characters. If ByteLength is zero, we take the length of the memoryblock.

11.1.23 ExecuteMemoryMT(text as memoryblock, ByteOffset as Integer = 0, ByteLength as Integer = 0) as Integer

Plugin Version: 13.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Performs a search with the compiled pattern. Notes: Same as ExecuteMemory, but more thread friendly.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. 11.1. CLASS REGEXMBS 279 11.1.24 ExecuteMT(start as Integer = 0) as Integer

Plugin Version: 13.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Performs a search with the compiled pattern. Notes: Same as Execute, but more thread friendly.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 11.1.25 ExecuteMT(text as string, start as Integer = 0) as Integer 279

11.1.25 ExecuteMT(text as string, start as Integer = 0) as Integer

Plugin Version: 13.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Performs a search with the compiled pattern. Notes: Same as Execute, but more thread friendly.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 11.1.24 ExecuteMT(start as Integer = 0) as Integer 279

11.1.26 InfoNameEntry(Index as Integer) as string

Plugin Version: 13.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries a name entry in the list of captures. Notes: Only valid after pattern was compiled.

11.1.27 IsASCIIText(text as string) as boolean

Plugin Version: 21.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks whether text in string is only ASCII. Example: 280 CHAPTER 11. REGULAR EXPRESSIONS Dim s As String = ”Hello World”

If RegExMBS.IsASCIIText(s) Then MessageBox ”Only 7 bit ASCII” Else MessageBox ”Not ASCII. Some 8 bit encoding like ANSI or UTF-8.” End If

Notes: Does checks bytes of text, so doesn’t look on encoding property.

11.1.28 Match(text as string) as boolean

Plugin Version: 16.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks if current search pattern matches against given text. Example: dim r as new RegExMBS if r.Compile(”e.l”) then if r.Match(”Hello”) then MsgBox ”match” end if if r.Match(”Helro”) then MsgBox ”wrong match” end if end if

Notes: Returns true if text matches.

Does not set properties like Execute, so subString() won’t work. See also:

• 11.1.29 Match(text() as string, inverse as boolean = false) as string() 281

• 11.1.30 Match(text() as Variant, inverse as boolean = false) as string() 281 11.1. CLASS REGEXMBS 281 11.1.29 Match(text() as string, inverse as boolean = false) as string()

Plugin Version: 16.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks if current search pattern matches against given text array. Example: dim r as new RegExMBS

r.CompileOptionCaseLess = true

if r.Compile(”e.l”) then

dim t() as string = array(”Hello”, ”World”, ”Xojo”, ”test”)

dim match1() as string = r.Match(t) dim match2() as string = r.Match(t, true)

MsgBox ”Matching: ”+Join(match1, ”, ”)+EndOfLine+”Other: ”+Join(match2, ”, ”) end if

Notes: Returns the list of matching values. If inverse is set to true, it returns the list of non matching values. See also:

• 11.1.28 Match(text as string) as boolean 280

• 11.1.30 Match(text() as Variant, inverse as boolean = false) as string() 281

11.1.30 Match(text() as Variant, inverse as boolean = false) as string()

Plugin Version: 16.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks if current search pattern matches against given variant array. Example: dim r as new RegExMBS

r.CompileOptionCaseLess = true

if r.Compile(”e.l”) then

dim dic as new Dictionary dic.Value(”Hello”) = 1 dic.Value(”World”) = 2 282 CHAPTER 11. REGULAR EXPRESSIONS dic.Value(”Xojo”) = 3 dic.Value(”Test”) = 4

dim match1() as string = r.Match(dic.keys) dim match2() as string = r.Match(dic.keys, true)

MsgBox ”Matching: ”+Join(match1, ”, ”)+EndOfLine+”Other: ”+Join(match2, ”, ”) end if

Notes: The variant array should have entries which convert well to string. Returns the list of matching values. If inverse is set to true, it returns the list of non matching values. See also:

• 11.1.28 Match(text as string) as boolean 280 • 11.1.29 Match(text() as string, inverse as boolean = false) as string() 281

11.1.31 Offset(index as Integer) as Integer

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get the offset in the offset list with given index inbytes. Example: dim r as RegExMbs dim s as string dim c as Integer

s=”123 äöü ABC 456”

r=new RegExMBS if r.Compile(”.ö.”) then c=r.Execute(s,0) MsgBox str(c)+””+str(r.Offset(0))+””+str(r.Offset(1)) // shows: 1 4 10 // 1 for ubound of the offset array // 4 for 4 bytes before the matched pattern // 10 for the 10 bytes before the end of the matched pattern end if

r=new RegExMBS if r.Compile(”.\xF6.”) then // finds ö using Unicode codepoint c=r.Execute(s,0) MsgBox str(c)+””+str(r.Offset(0))+””+str(r.Offset(1)) 11.1. CLASS REGEXMBS 283 // shows: 1 4 10 // 1 for ubound of the offset array // 4 for 4 bytes before the matched pattern // 10 for the 10 bytes before the end of the matched pattern end if

Notes: If you found a pattern in a string you get here:

Invalid indexes return 0. Count is the number of entries here.

11.1.32 OffsetCharacters(index as Integer) as Integer

Plugin Version: 6.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Get the offset in the offset list with given index in characters. Example: dim r as new RegExMBS dim searchString as string = ”.o”

if r.Compile(searchString) then

dim s as string=”äöü Hello World”

if r.Execute(s,0)>0 then dim lines(-1) as string

lines.Append str(R.Count)+” offset found.” lines.Append ”In Bytes:” lines.Append ” Start of matched patern: ”+str(R.Offset(0)) lines.Append ” End of matched patern: ”+str(R.Offset(1)) lines.Append ” Length of matched patern: ”+str(R.Offset(1)-r.Offset(0))

lines.Append ”In Characters:” lines.Append ” Start of matched patern: ”+str(R.OffsetCharacters(0)) lines.Append ” End of matched patern: ”+str(R.OffsetCharacters(1)) lines.Append ” Length of matched patern: ”+str(R.OffsetCharacters(1)-r.OffsetCharacters(0))

MsgBox Join(lines,EndOfLine) end if

else 284 CHAPTER 11. REGULAR EXPRESSIONS MsgBox ”failed to compile” end if

Notes: This function is identical to Offset(), but returns characters instead of bytes. Works only with valid UTF-8 strings as input. Value is calculated on each function call based on Offset(index) and current text.

If you found a pattern in a string you get here:

Invalid indexes return 0. Count is the number of entries here.

Please note that if you just need offsets for calling Mid() function, you can get better performance byusing just Offset and MidB function. Than neither Mid and OffsetCharacters need to calculate the character offset.

11.1.33 Replace(NewText as string) as string

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Replaces the text on the current found position and returns the complete new text. Notes: You need to call Execute before. Lasterror is set. NewText must have UTF-8 text encoding.

\0 references the whole found pattern, \1 to \15 the subexpressions. \t is replaced with chr(9), \r and \n with chr(13) and \\with \.

11.1.34 ReplaceAll(Target as string, NewText as string = ””) as string

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Searches the target string for current pattern and replaces all occurrences with the new text. Notes: You need to call Compile before to initialize the pattern and you should call Study before to optimize the pattern. Lasterror is set. Target and NewText must have UTF-8 text encoding. 11.1. CLASS REGEXMBS 285

\0 references the whole found pattern, \1 to \15 the subexpressions. \t is replaced with chr(9), \r and \n with chr(13) and \\with \.

11.1.35 ReplaceSelection(NewText as string) as string

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Replaces the text on the current found position and returns new text for that selection. Notes: This method is for text editors where you will store result in editfield.seltext to replace the current selection. Lasterror is set. You need to call Execute before. NewText must have UTF-8 text encoding.

\0 references the whole found pattern, \1 to \15 the subexpressions. \t is replaced with chr(9), \r and \n with chr(13) and \\with \.

11.1.36 StringNumber(name as string) as Integer

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This convenience function finds the number of a named substring capturing parenthesis ina compiled pattern. Notes: name: Name whose number is required The yield of the function is the number of the parenthesis if the name is found, or PCRE_ERROR_NO- SUBSTRING otherwise.

11.1.37 Study as boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: After you compiled a pattern study can optimize it. Notes: Only useful if you use Execute several times. In that case you call one time Compile, one time Study and several times Execute. Errormessage is set. 286 CHAPTER 11. REGULAR EXPRESSIONS 11.1.38 Substring(index as Integer) as string

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the subexpression found with the given index. Notes: Returns ”” on any error. Lasterror is set. See also:

• 11.1.39 Substring(name as string) as string 286

11.1.39 Substring(name as string) as string

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the subexpression found with the given name. Notes: Returns ”” on any error. Lasterror is set. See also:

• 11.1.38 Substring(index as Integer) as string 286

11.1.40 Unescape(text as string) as string

Plugin Version: 15.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Unescapes the string. Example: dim r as new RegExMBS dim s as string = ”Hello [] ” dim e as string = r.Escape(s) MsgBox e // shows Hello \[ \] dim d as string = r.Unescape(e) MsgBox d // shows original string

Notes: The string is converted to UTF8 and all the RegEx special characters are escaped. Returns ”” on low memory. 11.1. CLASS REGEXMBS 287 11.1.41 Version as string

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The version of the PCRE library as an ASCII string.

11.1.42 Properties

11.1.43 CompileOptionAnchored as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: Force pattern anchoring Notes: (Read and Write property)

11.1.44 CompileOptionAutoCallOut as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: Compile automatic callouts Notes: (Read and Write property)

11.1.45 CompileOptionBSRAnyCRLF as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option and CompileOptionBSRUnicode (which are mutually exclusive) control what the \R escape sequence matches. Notes: The choice is either to match only CR, LF, or CRLF, or to match any Unicode newline sequence. The default is specified when PCRE is built. It can be overridden from within the pattern, or by setting anoptionwhen a compiled pattern is matched. (Read and Write property)

11.1.46 CompileOptionBSRUnicode as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option and CompileOptionBSRAnyCRLF (which are mutually exclusive) control what the \R escape sequence matches. Example: 288 CHAPTER 11. REGULAR EXPRESSIONS dim rg As new RegExMBS rg.CompileOptionUngreedy = false rg.CompileOptionBSRUnicode = true

dim ts as string = ”one” + EndOfLine.UNIX + ”test” + chr(& h2028) + ”more”

// replace all end lines with # if rg.Compile(”\R+”) then

ts = rg.ReplaceAll(ts,”# ”)

end if

MsgBox ts

Notes: The choice is either to match only CR, LF, or CRLF, or to match any Unicode newline sequence. The default is specified when PCRE is built. It can be overridden from within the pattern, or by setting anoptionwhen a compiled pattern is matched. (Read and Write property)

11.1.47 CompileOptionCaseLess as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: Do caseless matching Example: dim r as new RegExMBS dim searchString as string = ”hello” r.CompileOptionCaseLess=True if r.Compile(searchString) then dim s as string=”äöü Hello World” if r.Execute(s,0)>0 then MsgBox ”Found: ”+mid(s, r.OffsetCharacters(0)+1, r.OffsetCharacters(1)-r.OffsetCharacters(0)) else MsgBox ”nothing found” end if

else 11.1. CLASS REGEXMBS 289 MsgBox ”failed to compile” end if

Notes: (Read and Write property)

11.1.48 CompileOptionDollarEndOnly as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: $ not to match newline at end Notes: (Read and Write property)

11.1.49 CompileOptionDotAll as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: . matches anything including endofline Example: dim r as new RegExMBS dim searchString as string = ”<.+>” r.CompileOptionDotAll = false // finds only if true if r.Compile(searchString) then dim s as string=”” if r.Execute(s,0)>0 then MsgBox ”Found: ”+mid(s, r.OffsetCharacters(0)+1, r.OffsetCharacters(1)-r.OffsetCharacters(0)) else MsgBox ”nothing found” end if else MsgBox ”failed to compile” end if

Notes: (Read and Write property) 290 CHAPTER 11. REGULAR EXPRESSIONS 11.1.50 CompileOptionDuplicateNames as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: If this bit is set, names used to identify capturing subpatterns need not be unique. Notes: This can be helpful for certain types of pattern when it is known that only one instance of the named sub- pattern can ever be matched. There are more details of named subpatterns below; see also the pcrepattern documentation. (Read and Write property)

11.1.51 CompileOptionExtended as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: Ignore whitespace and # comments Notes: (Read and Write property)

11.1.52 CompileOptionFirstLine as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: Force matching to be before newline Notes: (Read and Write property)

11.1.53 CompileOptionJavaScriptCompat as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: If this option is set, PCRE’s behaviour is changed in some ways so that it is compatible with JavaScript rather than Perl. Notes: The changes are as follows:

(1) A lone closing square bracket in a pattern causes a compile-time error, because this is illegal in JavaScript (by default it is treated as a data character). Thus, the pattern AB ] CD becomes illegal when this option is set.

(2) At run time, a back reference to an unset subpattern group matches an empty string (by default this causes the current matching alternative to fail). A pattern such as (\1)(a) succeeds when this option is set (assuming it can find an ”a” in the subject), whereas it fails by default, for Perl compatibility. 11.1. CLASS REGEXMBS 291 (Read and Write property)

11.1.54 CompileOptionMultiline as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: ^and $ match newlines within data Example: dim r as RegExMBS dim n,i,c as Integer dim s as string s=ReplaceLineEndings(EditField1.text,EndOfLine.UNIX) r=new RegExMBS

’r.CompileOptionFirstLine=True r.CompileOptionMultiline=True if r.Compile(”^....$ ”) then n=0 do c=r.Execute(s,n) if c>0 then MsgBox r.Substring(0) n=r.Offset(1) end if loop until c=0 end if

Notes: (Read and Write property)

11.1.55 CompileOptionNewLineAny as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. Notes: Setting CompileOptionNewLineCR or CompileOptionNewLineLF specifies that a newline is indicated bya single character (CR or LF, respectively). Setting CompileOptionNewLineCRLF specifies that a newline 292 CHAPTER 11. REGULAR EXPRESSIONS is indicated by the two-character CRLF sequence. Setting CompileOptionNewLineAnyCRLF specifies that any of the three preceding sequences should be recognized. Setting CompileOptionNewLineAny specifies that any Unicode newline sequence should be recognized. The Unicode newline sequences are the three just mentioned, plus the single characters VT (vertical tab, U+000B), FF (formfeed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS (paragraph separator, U+2029). The last two are recognized only in UTF-8 mode. The newline setting in the options word uses three bits that are treated as a number, giving eight possibili- ties. Currently only six are used (default plus the five values above). This means that if you set more than one newline option, the combination may or may not be sensible. For example, CompileOptionNewLineCR with CompileOptionNewLineLF is equivalent to CompileOptionNewLineCRLF, but other combinations may yield unused numbers and cause an error.

The only time that a line break in a pattern is specially recognized when compiling is when PCRE_EX- TENDED is set. CR and LF are whitespace characters, and so are ignored in this mode. Also, an unescaped # outside a character class indicates a comment that lasts until after the next line break sequence. In other circumstances, line break sequences in patterns are treated as literal data. (Read and Write property)

11.1.56 CompileOptionNewLineAnyCRLF as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. Notes: See CompileOptionNewLineAny for more details. (Read and Write property)

11.1.57 CompileOptionNewLineCR as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. Notes: See CompileOptionNewLineAny for more details. (Read and Write property)

11.1.58 CompileOptionNewLineCRLF as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. 11.1. CLASS REGEXMBS 293 Notes: See CompileOptionNewLineAny for more details. (Read and Write property)

11.1.59 CompileOptionNewLineLF as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. Notes: See CompileOptionNewLineAny for more details. (Read and Write property)

11.1.60 CompileOptionNoAutoCapture as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: Disable numbered capturing parentheses (named ones available) Notes: (Read and Write property)

11.1.61 CompileOptionNoStartOptimize as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This is an option that acts at matching time; that is, it is really an option for Execute. Notes: If it is set at compile time, it is remembered with the compiled pattern and assumed at matching time. (Read and Write property)

11.1.62 CompileOptionNoUTF8Check as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: Do not check the pattern for UTF-8 validity. Notes: (Read and Write property) 294 CHAPTER 11. REGULAR EXPRESSIONS 11.1.63 CompileOptions as Integer

Plugin Version: 6.3, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal value of all the compile options. Notes: You can get and set the bits using the CompileOption* Boolean properties. (Read and Write property)

11.1.64 CompileOptionUngreedy as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: Invert greediness of quantifiers. Notes: Basicly this is about whether to find the next matching item or the last matching item in the whole string. Matching the next item is always much faster. (Read and Write property)

11.1.65 CompileOptionUnicodeCodePoints as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether to support unicode code points for character classes. Notes: This option changes the way PCRE processes \B, \b, \D, \d, \S, \s, \W, \w, and some of the POSIX character classes. By default, only ASCII characters are recognized, but if PCRE_UCP is set, Unicode properties are used instead to classify characters. More details are given in the section on generic character types in the pcrepattern page. If you set PCRE_UCP, matching one of the items it affects takes much longer. The option is available only if PCRE has been compiled with Unicode property support. (Read and Write property)

11.1.66 CompileOptionUTF8 as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Compile: Run in UTF-8 mode. Notes: (Read and Write property) 11.1. CLASS REGEXMBS 295 11.1.67 Count as Integer

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Number of offsets found. Example: dim r as new RegExMBS dim searchString as string = ”.o”

if r.Compile(searchString) then

dim s as string=”äöü Hello World”

if r.Execute(s,0)>0 then dim lines(-1) as string

lines.Append str(R.Count)+” offset found.” lines.Append ”In Bytes:” lines.Append ” Start of matched patern: ”+str(R.Offset(0)) lines.Append ” End of matched patern: ”+str(R.Offset(1)) lines.Append ” Length of matched patern: ”+str(R.Offset(1)-r.Offset(0))

lines.Append ”In Characters:” lines.Append ” Start of matched patern: ”+str(R.OffsetCharacters(0)) lines.Append ” End of matched patern: ”+str(R.OffsetCharacters(1)) lines.Append ” Length of matched patern: ”+str(R.OffsetCharacters(1)-r.OffsetCharacters(0))

MsgBox Join(lines,EndOfLine) end if

else MsgBox ”failed to compile” end if

Notes: (Read only property)

11.1.68 ErrorMessage as String

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The last message reported. Notes: Set by Study and Compile. (Read only property) 296 CHAPTER 11. REGULAR EXPRESSIONS

11.1.69 ErrorOffset as Integer

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The last error offset from the compile function. Notes: (Read only property)

11.1.70 ExecuteOptionAnchored as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Execute: Match only at the first position Notes: (Read and Write property)

11.1.71 ExecuteOptionBSRAnyCRLF as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option and ExecuteOptionBSRUnicode (which are mutually exclusive) control what the \R escape sequence matches. Notes: The choice is either to match only CR, LF, or CRLF, or to match any Unicode newline sequence. The default is specified when PCRE is built. It can be overridden from within the pattern, or by setting anoptionwhen a compiled pattern is matched. (Read and Write property)

11.1.72 ExecuteOptionBSRUnicode as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option and ExecuteOptionBSRAnyCRLF (which are mutually exclusive) control what the \R escape sequence matches. Example: dim rg As new RegExMBS rg.CompileOptionUngreedy = false rg.ExecuteOptionBSRUnicode = true dim ts as string = ”one” + EndOfLine.UNIX + ”test” + chr(& h2028) + ”more” 11.1. CLASS REGEXMBS 297 // replace all end lines with # if rg.Compile(”\R+”) then ts = rg.ReplaceAll(ts,”# ”) end if

MsgBox ts

Notes: The choice is either to match only CR, LF, or CRLF, or to match any Unicode newline sequence. The default is specified when PCRE is built. It can be overridden from within the pattern, or by setting anoptionwhen a compiled pattern is matched. (Read and Write property)

11.1.73 ExecuteOptionNewLineAny as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. Notes: Setting ExecuteOptionNewLineCR or ExecuteOptionNewLineLF specifies that a newline is indicated bya single character (CR or LF, respectively). Setting ExecuteOptionNewLineCRLF specifies that a newline is indicated by the two-character CRLF sequence. Setting ExecuteOptionNewLineAnyCRLF specifies that any of the three preceding sequences should be recognized. Setting ExecuteOptionNewLineAny specifies that any Unicode newline sequence should be recognized. The Unicode newline sequences are the three just mentioned, plus the single characters VT (vertical tab, U+000B), FF (formfeed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS (paragraph separator, U+2029). The last two are recognized only in UTF-8 mode. The newline setting in the options word uses three bits that are treated as a number, giving eight possibili- ties. Currently only six are used (default plus the five values above). This means that if you set more than one newline option, the combination may or may not be sensible. For example, ExecuteOptionNewLineCR with ExecuteOptionNewLineLF is equivalent to ExecuteOptionNewLineCRLF, but other combinations may yield unused numbers and cause an error.

The only time that a line break in a pattern is specially recognized when compiling is when PCRE_EX- TENDED is set. CR and LF are whitespace characters, and so are ignored in this mode. Also, an unescaped # outside a character class indicates a comment that lasts until after the next line break sequence. In other circumstances, line break sequences in patterns are treated as literal data. (Read and Write property) 298 CHAPTER 11. REGULAR EXPRESSIONS 11.1.74 ExecuteOptionNewLineAnyCRLF as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. Notes: See ExecuteOptionNewLineAny for more details. (Read and Write property)

11.1.75 ExecuteOptionNewLineCR as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. Notes: See ExecuteOptionNewLineAny for more details. (Read and Write property)

11.1.76 ExecuteOptionNewLineCRLF as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. Notes: See ExecuteOptionNewLineAny for more details. (Read and Write property)

11.1.77 ExecuteOptionNewLineLF as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option override the default newline definition that was chosen when PCRE was built. Notes: See ExecuteOptionNewLineAny for more details. (Read and Write property)

11.1.78 ExecuteOptionNoStartOptimize as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. 11.1. CLASS REGEXMBS 299 Function: There are a number of optimizations that Execute uses at the start of a match, in order to speed up the process. Notes: For example, if it is known that an unanchored match must start with a specific character, it searches the subject for that character, and fails immediately if it cannot find it, without actually running the main matching function. This means that a special item such as (*COMMIT) at the start of a pattern is not considered until after a suitable starting point for the match has been found. When callouts or (*MARK) items are in use, these ”start-up” optimizations can cause them to be skipped if the pattern is never actually used. The start-up optimizations are in effect a pre-scan of the subject that takes place before the pattern is run. The ExecuteOptionNoStartOptimize option disables the start-up optimizations, possibly causing perfor- mance to suffer, but ensuring that in cases where the result is ”no match”, the callouts do occur, andthat items such as (*COMMIT) and (*MARK) are considered at every possible starting position in the subject string. If ExecuteOptionNoStartOptimize is set at compile time, it cannot be unset at matching time.

Setting ExecuteOptionNoStartOptimize can change the outcome of a matching operation. Consider the pattern

(*COMMIT)ABC When this is compiled, PCRE records the fact that a match must start with the character ”A”. Suppose the subject string is ”DEFABC”. The start-up optimization scans along the subject, finds ”A” and runs the first match attempt from there. The (*COMMIT) item means that the pattern must match the current starting position, which in this case, it does. However, if the same match is run with ExecuteOptionNoStartOptimize set, the initial scan along the subject string does not happen. The first match attempt is run starting from ”D” and when this fails, (*COMMIT) prevents any further matches being tried, so the overall result is ”no match”. If the pattern is studied, more start-up optimizations may be used. For example, a minimum length for the subject may be recorded. Consider the pattern (*MARK:A)(X | Y) The minimum length for a match is one character. If the subject is ”ABC”, there will be attempts to match ”ABC”, ”BC”, ”C”, and then finally an empty string. If the pattern is studied, the final attempt doesnot take place, because PCRE knows that the subject is too short, and so the (*MARK) is never encountered. In this case, studying the pattern does not affect the overall match result, which is still ”no match”, butit does affect the auxiliary information that is returned. (Read and Write property)

11.1.79 ExecuteOptionNotBOL as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Execute: Subject is not the beginning of a line Notes: (Read and Write property) 300 CHAPTER 11. REGULAR EXPRESSIONS 11.1.80 ExecuteOptionNotEmpty as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Execute: An empty string is not a valid match Notes: (Read and Write property)

11.1.81 ExecuteOptionNotEmptyAtStart as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: One of the options. Notes: This is like ExecuteOptionNotEmpty, except that an empty string match that is not at the start of the subject is permitted. If the pattern is anchored, such a match can occur only if the pattern contains \K. Perl has no direct equivalent of ExecuteOptionNotEmpty or ExecuteOptionNotEmptyAtStart, but it does make a special case of a pattern match of the empty string within its split() function, and when using the /g modifier. It is possible to emulate Perl’s behaviour after matching a null string by first tryingthematch again at the same offset with ExecuteOptionNotEmptyAtStart and ExecuteOptionAnchored, and then if that fails, by advancing the starting offset (see below) and trying an ordinary match again. There issome code that demonstrates how to do this in the pcredemo sample program. In the most general case, you have to check to see if the newline convention recognizes CRLF as a newline, and if so, and the current character is CR followed by LF, advance the starting offset by two characters instead of one. (Read and Write property)

11.1.82 ExecuteOptionNotEOL as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Execute: Subject is not the end of a line Notes: (Read and Write property)

11.1.83 ExecuteOptionNoUTF8Check as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Execute: Do not check the subject for UTF-8 validity Notes: (Read and Write property) 11.1. CLASS REGEXMBS 301 11.1.84 ExecuteOptionPartial as Boolean

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Option for Execute: Return PCRE_ERROR_PARTIAL for a partial match Notes: (Read and Write property)

11.1.85 ExecuteOptionPartialHard as Boolean

Plugin Version: 11.2, Platforms: macOS, Linux, Windows, Targets: All. Function: This option (and ExecuteOptionPartial) turn on the partial matching feature. Notes: A partial match occurs if the end of the subject string is reached successfully, but there are not enough subject characters to complete the match. If this happens when ExecuteOptionPartial (but not ExecuteOp- tionPartialHard) is set, matching continues by testing any remaining alternatives. Only if no complete match can be found is ErrorPartial returned instead of PCRE_ERROR_NOMATCH. In other words, ExecuteOp- tionPartial says that the caller is prepared to handle a partial match, but only if no complete match can be found. If ExecuteOptionPartialHard is set, it overrides ExecuteOptionPartial. In this case, if a partial match is found, Execute() immediately returns ErrorPartial, without considering any other alternatives. In other words, when ExecuteOptionPartialHard is set, a partial match is considered to be more important that an alternative complete match.

In both cases, the portion of the string that was inspected when the partial match was found is set as the first matching string. There is a more detailed discussion of partial and multi-segment matching, with examples, in the pcrepartial documentation. (Read and Write property)

11.1.86 ExecuteOptions as Integer

Plugin Version: 6.3, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal value of all the execute options. Notes: You can get and set the bits using the CompileOption* Boolean properties. (Read and Write property)

11.1.87 Handle as Integer

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. 302 CHAPTER 11. REGULAR EXPRESSIONS Function: The handle to the pattern data structure. Notes: (Read only property)

11.1.88 InfoCaptureCount as Integer

Plugin Version: 13.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries number of captures defined in the pattern. Notes: Only valid after pattern was compiled. (Read only property)

11.1.89 InfoNameCount as Integer

Plugin Version: 13.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries number of names defined in the pattern. Notes: Only valid after pattern was compiled. (Read only property)

11.1.90 InfoSize as Integer

Plugin Version: 13.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries the size of the compiled pattern. Notes: Only valid after pattern was compiled. (Read only property)

11.1.91 InfoStudySize as Integer

Plugin Version: 13.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries the study details size. Notes: Only valid after calling Study. (Read only property) 11.1. CLASS REGEXMBS 303 11.1.92 Lasterror as Integer

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The last error code reported. Notes: 0 is no error and -1 is some parameter error. See Error* constants for other values. (Read only property)

11.1.93 MatchLimit as Integer

Plugin Version: 13.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The match limit. Notes: You can set it to a limit value. If set to zero, the plugin will use the default.

The default value for the limit can be set when PCRE is built; the default default is 10 million, which handles all but the most extreme cases. You can override the default by setting this property. (Read and Write property)

11.1.94 MatchLimitRecursion as Integer

Plugin Version: 13.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The limit for recursion. Notes: The MatchLimitRecursion field is similar to MatchLimit, but instead of limiting the total number oftimes that match() is called, it limits the depth of recursion. The recursion depth is a smaller number than the total number of calls, because not all calls to match() are recursive. This limit is of use only if it is set smaller than MatchLimit.

Limiting the recursion depth limits the amount of stack that can be used.

The default value for MatchLimitRecursion can be set when PCRE is built; the default default is the same value as the default for MatchLimit. You can override the default by setting this property. If value is zero, the plugin uses the default. (Read and Write property) 304 CHAPTER 11. REGULAR EXPRESSIONS 11.1.95 Text as String

Plugin Version: 6.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The text used for the last successfull compile call. Notes: (Read only property)

11.1.96 TextMemory as Memoryblock

Plugin Version: 6.3, Platforms: macOS, Linux, Windows, Targets: All. Function: The text used for the last successfull compiletext call. Notes: (Read only property)

11.1.97 VectorSize as Integer

Plugin Version: 13.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal vector size. Notes: (Read only property)

11.1.98 Constants

11.1.99 ErrorBadCount = -15

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: This error is given if the value of the ovecsize argument is negative.

11.1.100 ErrorBadMagic = -4

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: PCRE stores a 4-byte ”magic number” at the start of the compiled code, to catch the case when it is passed a junk pointer and to detect when a pattern that was compiled in an environment of one endianness is run in an environment with the other endianness. This is the error that PCRE gives when the magic number is not present. 11.1. CLASS REGEXMBS 305 11.1.101 ErrorBadNewLine = -23

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: An invalid combination of Newline options was given.

11.1.102 ErrorBadOffset = -24

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: The value of startoffset was negative or greater than the length of the subject, that is, thevaluein length.

11.1.103 ErrorBadOption = -3

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: An unrecognized bit was set in the options argument.

11.1.104 ErrorBadPartial = -13

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: This code is no longer in use. It was formerly returned when the PCRE_PARTIAL option was used with a compiled pattern containing items that were not supported for partial matching. From release 8.00 onwards, there are no restrictions on partial matching.

11.1.105 ErrorBadUTF8 = -10

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: A string that contains an invalid UTF-8 byte sequence was passed as a subject. However, if PCRE_PARTIAL_HARD is set and the problem is a truncated UTF-8 character at the end of the subject, ErrorShortUTF8 is used instead. 306 CHAPTER 11. REGULAR EXPRESSIONS 11.1.106 ErrorBadUTF8Offset = -11

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: The UTF-8 byte sequence that was passed as a subject was valid, but the value of startoffset did not point to the beginning of a UTF-8 character or the end of the subject.

11.1.107 ErrorCallOut = -9

Plugin Version: 11.2. Function: One of the RegEx error constants.

11.1.108 ErrorDFARecurse = -20

Plugin Version: 11.2. Function: One of the RegEx error constants. 11.1. CLASS REGEXMBS 307 0 no error 1 \at end of pattern 2 \c at end of pattern 3 unrecognized character follows \ 4 numbers out of order in {} quantifier 5 number too big in {} quantifier 6 missing terminating ] for character class 7 invalid escape sequence in character class 8 range out of order in character class 9 nothing to repeat 10 operand of unlimited repeat could match the empty string 11 internal error: unexpected repeat 12 unrecognized character after (? 13 POSIX named classes are supported only within a class 14 missing ) 15 reference to non-existent subpattern 16 erroffset passed as NULL 17 unknown option bit(s) set 18 missing ) after comment 19 parentheses nested too deeply 20 regular expression too large 21 failed to get memory 22 unmatched parentheses 23 internal error: code overflow 24 unrecognized character after (?< 25 lookbehind assertion is not fixed length 26 malformed number after (?( 27 conditional group contains more than two branches 28 assertion expected after (?( 29 (?R or (?digits must be followed by ) 30 unknown POSIX class name 31 POSIX collating elements are not supported 32 this version of PCRE is not compiled with PCRE_UTF8 support 33 spare error 34 character value in \x { ... } sequence is too large 35 invalid condition (?(0) 36 \C not allowed in lookbehind assertion 37 PCRE does not support \L, \l, \N, \U, or \u 38 number after (?C is >255 39 closing ) for (?C expected 40 recursive call could loop indefinitely 41 unrecognized character after (?P 42 syntax error after (?P 43 two named groups have the same name 44 invalid UTF-8 string 45 support for \P, \p, and \X has not been compiled 46 malformed \P or \p sequence 47 unknown property name after \P or \p 308 CHAPTER 11. REGULAR EXPRESSIONS

PCRE_ERROR_NOMATCH -1 The subject string did not match the pattern. PCRE_ERROR_NULL -2 Either code or subject was passed as ””. PCRE_ERROR_BADOPTION -3 An unrecognized bit was set in the options argument. PCRE_ERROR_BADMAGIC -4 PCRE stores a 4-byte ”magic number” at the start of the compiled code, to catch the case when it is passed a junk pointer and to detect when a pattern that was compiled in an environment of one endianness is run in an environment with the other endianness. This is the error that PCRE gives when the magic number is not present. PCRE_ERROR_UNKNOWN_NODE -5 While running the pattern match, an unknown item was encountered in the compiled pattern. This error could be caused by a bug in PCRE or by over- writing of the compiled pattern. PCRE_ERROR_NOMEMORY -6 If a pattern contains back references, but the ovector that is passed to Execute() is not big enough to remember the referenced substrings, PCRE gets a block of memory at the start of matching to use for this purpose. If the call via pcre_malloc() fails, this error is given. The memory is automatically freed at the end of matching. PCRE_ERROR_MATCHLIMIT -8 The backtracking limit, as specified by the match_limit field in a pcre_extra structure (or defaulted) was reached. PCRE_ERROR_RECURSIONLIMIT -21 The internal recursion limit, as specified by the match_limit_recursion field in a pcre_extra structure (or defaulted) was reached. PCRE_ERROR_CALLOUT -9 This error is never generated by Execute() itself. It is provided for use by callout functions that want to yield a distinctive error code. See the pcrecallout documentation for details. PCRE_ERROR_BADUTF8 -10 A string that contains an invalid UTF-8 byte sequence was passed as a subject. PCRE_ERROR_BADUTF8_OFFSET -11 The UTF-8 byte sequence that was passed as a subject was valid, but the value of startoffset did not point to the beginning of a UTF-8 character. PCRE_ERROR_PARTIAL -12 The subject string did not match, but it did match partially. See the pcrepartial documentation for details of partial matching. PCRE_ERROR_BADPARTIAL -13 The PCRE_PARTIAL option was used with a compiled pattern containing items that are not supported for partial matching. See the pcrepartial docu- mentation for details of partial matching. PCRE_ERROR_INTERNAL -14 An unexpected internal error has occurred. This error could be caused by a bug in PCRE or by overwriting of the compiled pattern. PCRE_ERROR_BADCOUNT -15 This error is given if the value of the ovecsize argument is negative.

index offset 0 start of matched pattern 1 end of matched pattern 2 start of subexpression 1 3 end of subexpression 1 2*n start of subexpression n 2*n+1 end of subexpression n 11.1. CLASS REGEXMBS 309

index offset 0 start of matched pattern 1 end of matched pattern 2 start of subexpression 1 3 end of subexpression 1 2*n start of subexpression n 2*n+1 end of subexpression n 310 CHAPTER 11. REGULAR EXPRESSIONS 11.1.109 ErrorDFAUCond = -17

Plugin Version: 11.2. Function: One of the RegEx error constants.

11.1.110 ErrorDFAUItem = -16

Plugin Version: 11.2. Function: One of the RegEx error constants.

11.1.111 ErrorDFAUMLimit = -18

Plugin Version: 11.2. Function: One of the RegEx error constants.

11.1.112 ErrorDFAWSSize = -19

Plugin Version: 11.2. Function: One of the RegEx error constants.

11.1.113 ErrorInternal = -14

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: An unexpected internal error has occurred. This error could be caused by a bug in PCRE or by overwriting of the compiled pattern.

11.1.114 ErrorMatchLimit = -8

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: The backtracking limit, as specified by the match_limit field in a pcre_extra structure (or defaulted) was reached. 11.1. CLASS REGEXMBS 311 11.1.115 ErrorNoMatch = -1

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: The subject string did not match the pattern.

11.1.116 ErrorNoSubstring = -7

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: This error is used by the substring functions.

11.1.117 ErrorNull = -2

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: Either code or subject was passed as ””, or ovector was ”” and ovecsize was not zero.

11.1.118 ErrorNullWSLimit = -22

Plugin Version: 11.2. Function: One of the RegEx error constants.

11.1.119 ErrorPartial = -12

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: The subject string did not match, but it did match partially.

11.1.120 ErrorPlugin = -99

Plugin Version: 13.1. Function: One of the RegEx error constants. Notes: 312 CHAPTER 11. REGULAR EXPRESSIONS Generic error for something wrong with the plugin state. Like no current regex object internally or wrong function parameters.

11.1.121 ErrorRecursionLimit = -21

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: The internal recursion limit, as specified by the match_limit_recursion field in a pcre_extra struc- ture (or defaulted) was reached. See the description above.

11.1.122 ErrorShortUTF8 = -25

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: The subject string ended with an incomplete (truncated) UTF-8 character, and the PCRE_PAR- TIAL_HARD option was set. Without this option, ErrorBadUTF8 is returned in this situation.

11.1.123 ErrorUnknownNode = -6

Plugin Version: 11.2. Function: One of the RegEx error constants.

11.1.124 ErrorUnknownOpcode = -5

Plugin Version: 11.2. Function: One of the RegEx error constants. Notes: While running the pattern match, an unknown item was encountered in the compiled pattern. This error could be caused by a bug in PCRE or by overwriting of the compiled pattern. Chapter 12

RFC

12.1 class RFCClassDescriptionMBS

12.1.1 class RFCClassDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a class description. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

12.1.2 Methods

12.1.3 Constructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

12.1.4 Destructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The destructor.

313 314 CHAPTER 12. RFC 12.1.5 Properties

12.1.6 AttributesCount as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries attribute count for class. Notes: (Read only property)

12.1.7 Connection as RFCConnectionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The connection owning this object. Notes: (Read only property)

12.1.8 Handle as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read only property)

12.1.9 ImplementedInterfacesCount as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries number of implemented interfaces. Notes: (Read only property)

12.1.10 Name as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The name of the class. Notes: (Read only property) 12.1. CLASS RFCCLASSDESCRIPTIONMBS 315 12.1.11 Parent as Variant

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: (Read only property)

12.1.12 ParentClassesCount as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries number of parent classes. Notes: (Read only property) 316 CHAPTER 12. RFC 12.2 class RFCConnectionAttributesMBS

12.2.1 class RFCConnectionAttributesMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for information about the partner system on the other side of this RFC connection. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

12.2.2 Methods

12.2.3 Constructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

12.2.4 Properties

12.2.5 client as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Client (”Mandant”) Notes: (Read only property)

12.2.6 codepage as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Own code page. Notes: (Read only property)

12.2.7 Connection as RFCConnectionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The connection used to get this information. Notes: (Read only property) 12.2. CLASS RFCCONNECTIONATTRIBUTESMBS 317

12.2.8 cpicConvId as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: CPI-C Conversation ID. Notes: (Read only property)

12.2.9 dest as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: RFC destination. Notes: (Read only property)

12.2.10 host as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Own host name. Notes: (Read only property)

12.2.11 isoLanguage as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: 2-byte ISO-Language Notes: (Read only property)

12.2.12 kernelRel as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Partner kernel release. Notes: (Read only property) 318 CHAPTER 12. RFC 12.2.13 language as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Language. Notes: (Read only property)

12.2.14 Parent as Variant

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object for this object. Notes: (Read only property)

12.2.15 partnerBytesPerChar as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Number of bytes per character in the backend’s current codepage. Notes: Note this is different from the semantics of the PCS parameter. (Read only property)

12.2.16 partnerCodepage as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Partner code page. Notes: (Read only property)

12.2.17 partnerHost as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Partner host name. Notes: (Read only property) 12.2. CLASS RFCCONNECTIONATTRIBUTESMBS 319 12.2.18 partnerIP as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Partner IP. Notes: (Read only property)

12.2.19 partnerIPv6 as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Partner IPv6. Notes: (Read only property)

12.2.20 partnerRel as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Partner system release. Notes: (Read only property)

12.2.21 partnerSystemCodepage as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Partner system code page. Notes: (Read only property)

12.2.22 partnerType as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Partner type. Notes: 2/3/E/R: R/2,R/3,Ext,Reg.Ext (Read only property) 320 CHAPTER 12. RFC 12.2.23 progName as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Name of the calling APAB program (report, module pool) Notes: (Read only property)

12.2.24 rel as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: My system release. Notes: (Read only property)

12.2.25 rfcRole as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The RFC role. Notes: C/S: RFC Client / RFC Server. (Read only property)

12.2.26 sysId as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: R/3 system ID. Notes: (Read only property)

12.2.27 sysNumber as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: R/3 system number. Notes: (Read only property) 12.2. CLASS RFCCONNECTIONATTRIBUTESMBS 321 12.2.28 trace as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Trace level (0-3) Notes: (Read only property)

12.2.29 type as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The type. Notes: 2/3/E/R: R/2,R/3,Ext,Reg.Ext (Read only property)

12.2.30 user as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: User name. Notes: (Read only property) 322 CHAPTER 12. RFC 12.3 class RFCConnectionMBS

12.3.1 class RFCConnectionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for RFC connection to a SAP system. Example: // connect code from a sample project: dim loginParams As New Dictionary if app.LogOnData.SAProuterString.IsEmpty then // LogOn with server (IP-Address) loginParams.Value(”ashost”) = app.LogOnData.Anwendungsserver else // LogOn with Servername and Router-String loginParams.Value(”ashost”) = app.LogOnData.SAProuterString+”/H/”+app.LogOnData.Anwendungsserver end if loginParams.Value(”sysnr”) = app.LogOnData.InstanzNr.ToText loginParams.Value(”client”) = app.LogOnData.Mandant loginParams.Value(”user”) = app.LogOnData.SAPBenutzer loginParams.Value(”passwd”) = app.LogOnData.SAPPasswort loginParams.Value(”lang”) = app.LogOnData.Sprache app.ConnectionToSAP = New RFCConnectionMBS(loginParams)

12.3.2 Blog Entries

• MBS Xojo Plugins, version 20.2pr2

• Connect Xojo to SAP via RFC

12.3.3 Blog Entries

• MBS Xojo Plugins, version 20.2pr2

• Connect Xojo to SAP via RFC

12.3.4 Methods

12.3.5 CachedClassDescription(repositoryID as String, Name as String) as RFC- ClassDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. 12.3. CLASS RFCCONNECTIONMBS 323 Function: Looks for a cached class description. Notes: This API should be used with care and is only for special scenarios, for example: 1. You know for sure, that a class description has already been cached via ClassDescription(), and don’t want to open an extra rfcHandle that will never be used. In this case simply use the SAP System ID as the repositoryID. 2. You have created a hard-coded repository via RfcAddClassDesc(), which contains classes that do not exist in the backend’s DDIC.

If repositoryID is ””, the ”default repository” is used. repositoryID: System ID of R/3 System, for which this class description has been cached, or ”” in case you want to look for it in the default repository. Name: Name of the class.

12.3.6 CachedFunctionDescription(repositoryID as String, Name as String) as RFCFunctionDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Looks for a cached function description. Notes: This API should be used with care and is only for special scenarios, for example: 1. You know for sure, that a function description has already been cached via FunctionDescription(), and don’t want to open an extra rfcHandle that will never be used. In this case simply use the SAP System ID as the repositoryID. 2. You have created a hard-coded repository via AddFunctionDesc(), which contains function modules that do not exist in the backend’s DDIC.

If repositoryID is ””, the ”default repository” is used.

12.3.7 CachedTypeDescription(repositoryID as String, Name as String) as RFC- TypeDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Looks for a cached structure/table description. Notes: Similar to TypeDescription(), but it only looks into the cache. Again it should almost never be necessary to get a metadata description of a single structure. repositoryID: System ID of R/3 System, for which this type description has been cached, or ”” in case you 324 CHAPTER 12. RFC want to look for it in the default repository. Name: Name of the DDIC structure/table.

12.3.8 Cancel

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Cancels the RFC call which is currently being called over the given RFC connection and closes the connection. Notes: Can be used only on an RFC client connection and needs to be called from a different thread than the one currently executing the RFC call.

12.3.9 ClassDescription(Name as String) as RFCClassDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the class description that is valid for the system to which connection points to. Notes: If the class description is already in the repository cache for that system ID, it will be returned immediately (from the cache), otherwise it will be looked up in the system’s DDIC using the rfcHandle. The result from the DDIC lookup will then be placed into the cache for later use.

The RFC Runtime maintains a cache for every R/3 System ID, as the meta data could be different from R/3 release to R/3 release. This is the main API that should be used.

Name: Name of the class to look up.

12.3.10 ClearRepository(repositoryID as String)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Removes all metadata from the repository cache of the specified R/3 System. Notes: If repositoryID is ””, the ”default repository” is cleared.

12.3.11 Constructor(LoginParams as Dictionary)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Opens an RFC client connection for invoking ABAP function modules in an R/3 backend. Example: 12.3. CLASS RFCCONNECTIONMBS 325 Dim loginParams As New Dictionary loginParams.Value(”ashost”) = ”hostname” loginParams.Value(”sysnr”) = ”05” loginParams.Value(”client”) = ”800” loginParams.Value(”user”) = ”user” loginParams.Value(”passwd”) = ”****” loginParams.Value(”lang”) = ”EN”

Dim connection As New RFCConnectionMBS(loginParams)

Notes: Opens a client connection to an SAP System. The connectionParams may contain the following name-value pairs: client, user, passwd, lang, trace and additionally one of

1. Direct application server logon: ashost, sysnr. 2. Logon with load balancing: mshost, msserv, sysid, group. msserv is needed only, if the service of the message server is not defined as sapmsin /etc/services.

When logging on with SNC, user& passwd are to be replaced by snc_qop, snc_myname, snc_partnername and optionally snc_lib. (If snc_lib is not specified, the underlying SNC layer uses the ”global” GSS library defined via environment variable SNC_LIB or SNC_LIB_64.)

When logging on with SSO Ticket, you can use mysapsso2 instead of user& passwd. The old SSO format (mysapsso) is no longer supported.

Alternatively the connection parameters can be defined in the config file sapnwrfc.ini. In this case youjust pass the parameter dest=... and all parameters that are missing in the sapnwrfc.ini entry into RfcOpenCon- nection().

For a complete list of logon parameters to be used in connectionParams as well as in the sapnwrfc.ini file, see the sample sapnwrfc.ini file in the SDK’s demo folder.

If the logon was ok, constructor returns with a new object, otherwise an exception is raised. 326 CHAPTER 12. RFC 12.3.12 CreateFunction(Name as String) as RFCFunctionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a data container that can be used to execute function calls in the backend via Invoke. Notes: The importing parameters can be set using the Value() properties. After the RfcInvoke call returned successfully, the exporting parameters can be read from this data container via the Value() properties.

12.3.13 CreateTransaction(TransactionID as String, QueueName as String) as RFCTransactionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a container for executing a (multi-step) transactional call. Notes: TransactionID: trasanction ID used to identify the transaction; queueName: queue name associated with the transaction. If it is ”” or empty, the transaction is for tRfc

12.3.14 Destructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The destructor. Notes: Closes an RFC connection.

12.3.15 FunctionDescription(Name as String) as RFCFunctionDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the function description that is valid for the system to which connection points to. Example: Dim fd As RFCFunctionDescriptionMBS = connection.FunctionDescription(”BAPI_COMPANY_GETDE- TAIL”)

Notes: If the function description is already in the repository cache for that system ID, it will be returned immediately (from the cache), otherwise it will be looked up in the system’s DDIC using the connection. The result from the DDIC lookup will then be placed in the cache. The RFC Runtime maintains a cache for every SAP System ID, as the meta data may be different depending on the SAP release. This is the main API that should be used. 12.3. CLASS RFCCONNECTIONMBS 327 12.3.16 isConnected as Boolean

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks if we are connected. Notes: Same as Ping, but returns boolean and does not raise exception.

12.3.17 Ping

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Ping the remote communication partner through the passed connection handle. Notes: Sends a ping to the backend in order to check, whether the connection is still alive. Can be used on both, client connections as well as server connections.

12.3.18 ResetServerContext

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Resets the SAP server context (”user context / ABAP session context”) associated with the given client connection, but does not close the connection.

12.3.19 TransactionID as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Retrieves a unique 24-digit transaction ID from the backend.

12.3.20 TypeDescription(Name as String) as RFCTypeDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the structure description that is valid for the system to which connection points to. Notes: If the structure description is already in the repository cache for that system ID, it will be returned immedi- ately (from the cache), otherwise it will be looked up in the system’s DDIC using the rfcHandle. The result from the DDIC lookup will then be placed into the cache for later use.

The RFC Runtime maintains a cache for every R/3 System ID, as the meta data could be different from R/3 release to R/3 release. 328 CHAPTER 12. RFC

Note Normally it should not be necessary to lookup separate structure descriptions. They are already looked up as part of the function module, in which they are used.

Name: Name of a DDIC structure or table.

12.3.21 Properties

12.3.22 ConnectionAttributes as RFCConnectionAttributesMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns details about the current client or server connection. Notes: (Read only property)

12.3.23 Handle as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read only property) 12.4. CLASS RFCCONTAINERMBS 329 12.4 class RFCContainerMBS

12.4.1 class RFCContainerMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a container in a RFC connection. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

12.4.2 Methods

12.4.3 Constructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

12.4.4 DescribeType as RFCTypeDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the metadata description of the given structure or table.

12.4.5 Destructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The destructor.

12.4.6 StringLength(Index as Integer) as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries string length for field by index. See also:

• 12.4.7 StringLength(Name as String) as Integer 330 330 CHAPTER 12. RFC 12.4.7 StringLength(Name as String) as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries string length for field by name. See also:

• 12.4.6 StringLength(Index as Integer) as Integer 329

12.4.8 Value(Index as Integer) as Variant

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Convenience method to get value as variant. Notes: When reading, we lookup data type for the property referred by index and return a matching value via variant.

Char, String, Num, Date, Time, BCD, DecF16 and DecF34 are returned as text. Float is returned as double value. Long, Second, Minute and Int8 is returned as Int64. DTDay, DTWeek, DTMonth, TSecond, TMinute, CDeay, Int1, Int2 and Int values are retuned as Integer. Table is returned as RFCTableMBS object. Structure is returned as RFCStructureMBS object. Byte data is returned as MemoryBlock.

For Null, ABAPObject, XMLData, BOX types we return nil. See also:

• 12.4.9 Value(Name as String) as Variant 330

12.4.9 Value(Name as String) as Variant

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Convenience method to get value as variant. Notes: When reading, we lookup data type for the property referred by name and return a matching value via variant.

Char, String, Num, Date, Time, BCD, DecF16 and DecF34 are returned as text. Float is returned as double value. Long, Second, Minute and Int8 is returned as Int64. DTDay, DTWeek, DTMonth, TSecond, TMinute, CDeay, Int1, Int2 and Int values are retuned as Integer. Table is returned as RFCTableMBS object. Structure is returned as RFCStructureMBS object. 12.4. CLASS RFCCONTAINERMBS 331 Byte data is returned as MemoryBlock.

For Null, ABAPObject, XMLData, BOX types we return nil. See also:

• 12.4.8 Value(Index as Integer) as Variant 330

12.4.10 Properties

12.4.11 Connection as RFCConnectionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The connection this object belongs to. Notes: (Read only property)

12.4.12 Handle as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read only property)

12.4.13 Parent as Variant

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object for this container. Notes: (Read only property)

12.4.14 Values as Dictionary

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Convenience property to see all values in debugger. Notes: (Read only property)

12.4.15 BytesValue(Index as Integer) as Memoryblock

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. 332 CHAPTER 12. RFC Function: Get or set BYTE value with MemoryBlock by index. Notes: When you get or set, we copy the data. (Read and Write computed property) See also:

• 12.4.16 BytesValue(Name as String) as Memoryblock 332

12.4.16 BytesValue(Name as String) as Memoryblock

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set BYTE value with MemoryBlock by name. Notes: When you get or set, we copy the data. (Read and Write computed property) See also:

• 12.4.15 BytesValue(Index as Integer) as Memoryblock 331

12.4.17 CharsValue(Index as Integer, Size as Integer) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set chars value by name. Notes: This is for fixed size char values, so you pass in size. Please use StringValue() to benefit from plugin querying size for you of existing value. (Read and Write computed property) See also:

• 12.4.18 CharsValue(Name as String, Size as Integer) as String 332

12.4.18 CharsValue(Name as String, Size as Integer) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set chars value by index. Notes: This is for fixed size char values, so you pass in size. Please use StringValue() to benefit from plugin querying size for you of existing value. (Read and Write computed property) See also: 12.4. CLASS RFCCONTAINERMBS 333 • 12.4.17 CharsValue(Index as Integer, Size as Integer) as String 332

12.4.19 DateValue(Index as Integer) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set date value by index. Notes: Format is always 8 character string with format YYYYMMDD. (Read and Write computed property) See also:

• 12.4.20 DateValue(Name as String) as String 333

12.4.20 DateValue(Name as String) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set date value by name. Notes: Format is always 8 character string with format YYYYMMDD. (Read and Write computed property) See also:

• 12.4.19 DateValue(Index as Integer) as String 333

12.4.21 FloatValue(Index as Integer) as Double

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set float value by index. Notes: (Read and Write computed property) See also:

• 12.4.22 FloatValue(Name as String) as Double 333

12.4.22 FloatValue(Name as String) as Double

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set float value by name. Notes: (Read and Write computed property) See also: 334 CHAPTER 12. RFC • 12.4.21 FloatValue(Index as Integer) as Double 333

12.4.23 Int16Value(Index as Integer) as Int16

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set UInt16 value by index. Notes: (Read and Write computed property) See also:

• 12.4.24 Int16Value(Name as String) as Int16 334

12.4.24 Int16Value(Name as String) as Int16

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set UInt16 value by name. Notes: (Read and Write computed property) See also:

• 12.4.23 Int16Value(Index as Integer) as Int16 334

12.4.25 Int32Value(Index as Integer) as Int32

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set UInt32 value by index. Notes: (Read and Write computed property) See also:

• 12.4.26 Int32Value(Name as String) as Int32 334

12.4.26 Int32Value(Name as String) as Int32

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set UInt32 value by name. Notes: (Read and Write computed property) See also:

• 12.4.25 Int32Value(Index as Integer) as Int32 334 12.4. CLASS RFCCONTAINERMBS 335 12.4.27 Int64Value(Index as Integer) as Int64

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set Int64 value by index. Notes: (Read and Write computed property) See also:

• 12.4.28 Int64Value(Name as String) as Int64 335

12.4.28 Int64Value(Name as String) as Int64

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set Int64 value by name. Notes: (Read and Write computed property) See also:

• 12.4.27 Int64Value(Index as Integer) as Int64 335

12.4.29 NumberValue(Index as Integer, Size as Integer) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set numeric value by index. Notes: The value of the specified field as num-char array (digits only). Please pass length. If you don’t know, please try StringValue/StringLength. (Read and Write computed property) See also:

• 12.4.30 NumberValue(Name as String, Size as Integer) as String 335

12.4.30 NumberValue(Name as String, Size as Integer) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set numeric value by name. Notes: The value of the specified field as num-char array (digits only). Please pass length. If you don’t know, please try StringValue/StringLength. (Read and Write computed property) See also:

• 12.4.29 NumberValue(Index as Integer, Size as Integer) as String 335 336 CHAPTER 12. RFC 12.4.31 StringValue(Index as Integer) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set string value by index. Notes: (Read and Write computed property) See also:

• 12.4.32 StringValue(Name as String) as String 336

12.4.32 StringValue(Name as String) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set string value by name. Example: Dim fd As RFCFunctionDescriptionMBS = connection.FunctionDescription(”BAPI_COMPANY_GETDE- TAIL”) Dim f As RFCFunctionMBS = fd.CreateFunction f.StringValue(”COMPANYID”) = ”000007” f.Invoke

Dim s As RFCStructureMBS = f.StructureValue(”RETURN”) Dim t As String = s.StringValue(”MESSAGE”)

MsgBox t

Notes: (Read and Write computed property) See also:

• 12.4.31 StringValue(Index as Integer) as String 336

12.4.33 StructureValue(Index as Integer) as RFCStructureMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set structure value with RFCStructureMBS object by index. Notes: (Read and Write computed property) See also:

• 12.4.34 StructureValue(Name as String) as RFCStructureMBS 337 12.4. CLASS RFCCONTAINERMBS 337 12.4.34 StructureValue(Name as String) as RFCStructureMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set structure value with RFCStructureMBS object by name. Notes: (Read and Write computed property) See also:

• 12.4.33 StructureValue(Index as Integer) as RFCStructureMBS 336

12.4.35 TableValue(Index as Integer) as RFCTableMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set table value with RFCTableMBS object by index. Notes: (Read and Write computed property) See also:

• 12.4.36 TableValue(Name as String) as RFCTableMBS 337

12.4.36 TableValue(Name as String) as RFCTableMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set table value with RFCTableMBS object by name. Notes: (Read and Write computed property) See also:

• 12.4.35 TableValue(Index as Integer) as RFCTableMBS 337

12.4.37 TimeValue(Index as Integer) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set time value by index. Notes: Format is always 6 character string with format HHMMSS. (Read and Write computed property) See also:

• 12.4.38 TimeValue(Name as String) as String 337

12.4.38 TimeValue(Name as String) as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. 338 CHAPTER 12. RFC Function: Get or set time value by name. Notes: Format is always 6 character string with format HHMMSS. (Read and Write computed property) See also:

• 12.4.37 TimeValue(Index as Integer) as String 337

12.4.39 UInt8Value(Index as Integer) as UInt8

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set UInt8 value by index. Notes: (Read and Write computed property) See also:

• 12.4.40 UInt8Value(Name as String) as UInt8 338

12.4.40 UInt8Value(Name as String) as UInt8

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get or set UInt8 value by name. Notes: (Read and Write computed property) See also:

• 12.4.39 UInt8Value(Index as Integer) as UInt8 338 12.5. CLASS RFCERROREXCEPTIONMBS 339 12.5 class RFCErrorExceptionMBS

12.5.1 class RFCErrorExceptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The exception class to report any error. Notes: Subclass of the RuntimeException class. 340 CHAPTER 12. RFC 12.6 class RFCExceptionDescriptionMBS

12.6.1 class RFCExceptionDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for an exception description. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

12.6.2 Methods

12.6.3 Constructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

12.6.4 Properties

12.6.5 Key as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Exception key Notes: (Read only property)

12.6.6 Message as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Error message (exception text as defined in SE37) Notes: (Read only property) 12.7. CLASS RFCFIELDDESCRIPTIONMBS 341 12.7 class RFCFieldDescriptionMBS

12.7.1 class RFCFieldDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a field description. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

12.7.2 Methods

12.7.3 Constructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

12.7.4 Properties

12.7.5 Connection as RFCConnectionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The connection for this field. Notes: (Read only property)

12.7.6 decimals as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: If the field is of type ”packed number” (BCD), this member gives the number of decimals. Notes: (Read only property)

12.7.7 Name as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Field name. Notes: (Read only property) 342 CHAPTER 12. RFC

12.7.8 nucLength as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Field length in bytes in a 1-byte-per-SAP_CHAR system. Notes: (Read only property)

12.7.9 nucOffset as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Field offset in bytes in a 1-byte-per-SAP_CHAR system. Notes: (Read only property)

12.7.10 Parent as Variant

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: (Read only property)

12.7.11 Type as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Field data type. Notes: (Read only property)

12.7.12 TypeDescription as RFCTypeDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries the type description for this field. Notes: (Read only property) 12.7. CLASS RFCFIELDDESCRIPTIONMBS 343 12.7.13 TypeString as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The type as string. Notes: Convenience property so you can see type in debugger. (Read only property)

12.7.14 ucLength as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Field length in bytes in a 2-byte-per-SAP_CHAR system. Notes: (Read only property)

12.7.15 ucOffset as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Field offset in bytes in a 2-byte-per-SAP_CHAR system. Notes: (Read only property) 344 CHAPTER 12. RFC 12.8 class RFCFunctionDescriptionMBS

12.8.1 class RFCFunctionDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a function description. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

12.8.2 Methods

12.8.3 Constructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

12.8.4 CreateFunction as RFCFunctionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a data container that can be used to execute function calls in the backend via Invoke. Notes: The importing parameters can be set using the Value() properties. After the RfcInvoke call returned successfully, the exporting parameters can be read from this data container via the Value() properties.

12.8.5 Destructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The destructor.

12.8.6 ExceptionDescription(Index as Integer) as RFCExceptionDescription- MBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The exception description by index. See also:

• 12.8.7 ExceptionDescription(Name as String) as RFCExceptionDescriptionMBS 345 12.8. CLASS RFCFUNCTIONDESCRIPTIONMBS 345 12.8.7 ExceptionDescription(Name as String) as RFCExceptionDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The exception description by name. See also:

• 12.8.6 ExceptionDescription(Index as Integer) as RFCExceptionDescriptionMBS 344

12.8.8 ExceptionDescriptions as RFCExceptionDescriptionMBS()

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries all exception descriptions.

12.8.9 ParameterDescription(Index as Integer) as RFCParameterDescription- MBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries parameter description by index. See also:

• 12.8.10 ParameterDescription(Name as String) as RFCParameterDescriptionMBS 345

12.8.10 ParameterDescription(Name as String) as RFCParameterDescription- MBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries parameter description by name. See also:

• 12.8.9 ParameterDescription(Index as Integer) as RFCParameterDescriptionMBS 345

12.8.11 ParameterDescriptions as RFCParameterDescriptionMBS()

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries all parameter description as array. 346 CHAPTER 12. RFC 12.8.12 Properties

12.8.13 Connection as RFCConnectionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent connection. Notes: (Read only property)

12.8.14 ExceptionCount as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries number of exceptions. Notes: (Read only property)

12.8.15 Handle as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read only property)

12.8.16 Name as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The name of the function. Notes: (Read only property)

12.8.17 ParameterCount as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The number of parameters for this function. Notes: (Read only property) 12.8. CLASS RFCFUNCTIONDESCRIPTIONMBS 347 12.8.18 Parent as Variant

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: (Read only property) 348 CHAPTER 12. RFC 12.9 class RFCFunctionMBS

12.9.1 class RFCFunctionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a function in a RFC connection. Notes: Please use values to set parameters and then call invoke. Subclass of the RFCContainerMBS class.

12.9.2 Methods

12.9.3 Constructor(typeDescription as RFCFunctionDescriptionMBS)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a data container that can be used to execute function calls in the backend via Invoke. Notes: The importing parameters can be set using the Value() properties. After the RfcInvoke call returned successfully, the exporting parameters can be read from this data container via the Value() properties.

12.9.4 DescribeFunction as RFCFunctionDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns the function description that is valid for the system to which connection points to. Notes: If the function description is already in the repository cache for that system ID, it will be returned immediately (from the cache), otherwise it will be looked up in the system’s DDIC using the connection. The result from the DDIC lookup will then be placed in the cache. The RFC Runtime maintains a cache for every SAP System ID, as the meta data may be different depending on the SAP release. This is the main API that should be used.

12.9.5 Destructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The destructor. 12.9. CLASS RFCFUNCTIONMBS 349 12.9.6 Invoke

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes a function module in the backend system so far. Example: Dim fd As RFCFunctionDescriptionMBS = connection.FunctionDescription(”BAPI_COMPANY_GETDE- TAIL”) Dim f As RFCFunctionMBS = fd.CreateFunction f.StringValue(”COMPANYID”) = ”000007” f.Invoke

Dim s As RFCStructureMBS = f.StructureValue(”RETURN”) Dim t As String = s.StringValue(”MESSAGE”)

MsgBox t

12.9.7 Properties

12.9.8 ParameterActive(Name as String) as Boolean

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether a parameter is active. Notes: This is particularly useful for BAPIs which have many large tables, in which you are not interested. Deactivate those and leave only those tables active, in which you are interested. This reduces network traffic and memory consumption in your application considerably.

This functionality can be used for input and output parameters. If the parameter is an input, no data for that parameter will be sent to the backend. If it’s an output, the backend will be informed not to return data for that parameter. (Read and Write computed property) 350 CHAPTER 12. RFC 12.10 module RFCModuleMBS

12.10.1 module RFCModuleMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The module for globals in RFC API. Notes: You can use this module and related classes to connect Xojo to SAP applications and databases. We support MacOS, Windows and Linux.

You need to get a SAP login (maybe become SAP developer) and download SAP NetWeaver RFC SDK 7.50. You need SAP license for user and maybe a developer license yourself.

Please read SAP documentation for various RFC functions to get more details. MBS Plugin manages memory for you, does reference counting and makes API easier to use for Xojo devel- opers.

12.10.2 Blog Entries

• Connect Xojo to SAP via RFC

12.10.3 Blog Entries

• Connect Xojo to SAP via RFC

12.10.4 Methods

12.10.5 LoadLibrary(file as folderitem) as boolean

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Loads the sapnwrfc library. Example: # If TargetWin32 Const path = ”sapnwrfc.dll” # Else Dim path As FolderItem = GetFolderItem(”libsapnwrfc.dylib”) Dim LibPath As String = path.parent.NativePath

Call RFCModuleMBS.SetCurrentWorkingDirectory(libPath) # EndIf 12.10. MODULE RFCMODULEMBS 351

If RFCModuleMBS.LoadLibrary(path) Then MsgBox ”Library loaded.” Else MsgBox ”Failed to load library”+EndOfLine+EndOfLine+RFCModuleMBS.LibraryLoadErrorMessage quit End If

Notes: Pass path to sapnwrfc.dll on Windows or libsapnwrfc.dylib on MacOS or libsapnwrfc.so on Linux. If file is installed in system path, you may just pass file name.

Returns true on success or false on failure. The LibraryLoadErrorMessage function returns error message on failure. See also:

• 12.10.6 LoadLibrary(path as string) as boolean 351

12.10.6 LoadLibrary(path as string) as boolean

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Loads the sapnwrfc library. Notes: Pass path to sapnwrfc.dll on Windows or libsapnwrfc.dylib on MacOS or libsapnwrfc.so on Linux. If file is installed in system path, you may just pass file name.

Returns true on success or false on failure. The LibraryLoadErrorMessage function returns error message on failure. See also:

• 12.10.5 LoadLibrary(file as folderitem) as boolean 350

12.10.7 LocalTransactionID as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Retrieves a unique 24-digit transaction ID. Notes: The API will attempt to generate a TID locally using the operating system’s UUID. 352 CHAPTER 12. RFC 12.10.8 ReloadIniFile

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Loads the contents of the sapnwrfc.ini file into memory. Notes: Searches the directory given by IniPath (or the current working directory) for the file sapnwrfc.ini and loads its contents into memory.

12.10.9 SetCurrentWorkingDirectory(path as folderitem) as boolean

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets the current working directory. Example: Dim path As FolderItem = GetFolderItem(”libsapnwrfc.dylib”) Dim LibPath As String = path.parent.NativePath

Call RFCModuleMBS.SetCurrentWorkingDirectory(libPath)

Notes: This is often useful to make sure the DLLs in that folder are found. See also:

• 12.10.10 SetCurrentWorkingDirectory(path as String) as boolean 352

12.10.10 SetCurrentWorkingDirectory(path as String) as boolean

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets the current working directory. Notes: This is often useful to make sure the DLLs in that folder are found. See also:

• 12.10.9 SetCurrentWorkingDirectory(path as folderitem) as boolean 352

12.10.11 Properties

12.10.12 IniPath as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The directory in which to search for the sapnwrfc.ini file. Notes: 12.10. MODULE RFCMODULEMBS 353 By default the sapnwrfc library searches for the sapnwrfc.ini in the current working directory of the process. If you want to keep it in a different directory, use this function to tell the sapnwrfc library about the newpath.

Note After you have changed the directory, the NW RFC lib automatically loads the contents of the new sapn- wrfc.ini file from that directory.

Pass the full (absolute) path of the directory, in which the sapnwrfc library should look for the sapnwrfc.ini file. A path relative to the current working directory of the process alsoworks. (Read and Write property)

12.10.13 LibraryLoadError as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The load error code. Notes: (Read only property)

12.10.14 LibraryLoadErrorMessage as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The load error message. Notes: (Read only property)

12.10.15 Loaded as Boolean

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether the library is loaded. Notes: Returns true if the library contains the required functions. (Read only property)

12.10.16 MajorVersion as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get information about currently loaded sapnwrfc library. Notes: 354 CHAPTER 12. RFC Major version, e.g. 7500. (Read only property)

12.10.17 MinorVersion as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get information about currently loaded sapnwrfc library. Notes: Minor version. (Read only property)

12.10.18 PatchLevel as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get information about currently loaded sapnwrfc library. Notes: Patch level of the version. (Read only property)

12.10.19 TraceDir as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Changes the directory where the NW RFC lib should write trace files. Notes: This function has the same effect as the sapnwrfc.ini parameter RFC_TRACE_DIR. See the documentation of that parameter in the sample ini file contained in the /demo directory of the NW RFC SDK.

Note This API call affects only new trace files that will be opened after the call. The directory of already existing trace files is not changed in order to prevent confusion and garbage data...

Pass the new directory. Can be an absolute or relative path name. The directory needs to exist prior to calling this API. The NW RFC lib will not attempt to create non-existing directories. (Read and Write property) 12.10. MODULE RFCMODULEMBS 355 12.10.20 TraceEncoding as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Changes the character encoding to be used in trace files. Notes: This function has the same effect as the sapnwrfc.ini parameter RFC_TRACE_ENCODING. See the doc- umentation of that parameter in the sample ini file contained in the /demo directory of the NW RFC SDK.

Note This API call affects only new trace files that will be opened after the call. The character encoding ofalready existing trace files is not changed in order to prevent confusion and garbage data...

Pass the new encoding. Possible values are ”UTF-16”, ”UTF-8” and ”DEFAULT”. On Windows UTF-16 is recommended for faster performance. ”DEFAULT” corresponds to the operating system’s default character encoding, which is CP1252 or ISO-8859-1 on most Windows systems and UTF-8 on most Linux systems. (Read and Write property)

12.10.21 TraceType as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Changes the way the NW RFC lib writes trace files. Notes: This function has the same effect as the sapnwrfc.ini parameter RFC_TRACE_TYPE. See the documen- tation of that parameter in the sample ini file contained in the /demo directory of the NW RFC SDK.

Note This API call closes currently open trace files and then changes to ”one file per process” or one ”fileper thread”. If the NW RFC lib is already using the given trace type, it does nothing.

Must be either ”PROCESS” or ”THREAD”. (Read and Write property)

12.10.22 Version as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Get information about currently loaded sapnwrfc library. Notes: Version as text to show to user. 356 CHAPTER 12. RFC (Read only property)

12.10.23 Constants

12.10.24 kErrorAbapClassException = 27

Plugin Version: 20.2. Function: One of the error constants. Notes: The called function module raised a class based exception

12.10.25 kErrorAbapException = 5

Plugin Version: 20.2. Function: One of the error constants. Notes: The called function module raised an Exception (RAISE or MESSAGE ... RAISING)

12.10.26 kErrorAbapMessage = 4

Plugin Version: 20.2. Function: One of the error constants. Notes: The called function module raised an E-, A- or X-Message

12.10.27 kErrorAbapRuntimeFailure = 3

Plugin Version: 20.2. Function: One of the error constants. Notes: SAP system runtime error (SYSTEM_FAILURE): Shortdump on the backend side

12.10.28 kErrorAuthorizationFailure = 29

Plugin Version: 20.2. Function: One of the error constants. Notes: Authorization check error 12.10. MODULE RFCMODULEMBS 357 12.10.29 kErrorBufferTooSmall = 23

Plugin Version: 20.2. Function: One of the error constants. Notes: The given buffer was to small to hold the entire parameter. Data has been truncated.

12.10.30 kErrorCanceled = 7

Plugin Version: 20.2. Function: One of the error constants. Notes: No longer used

12.10.31 kErrorClosed = 6

Plugin Version: 20.2. Function: One of the error constants. Notes: Connection closed by the other side

12.10.32 kErrorCodepageConversionFailure = 21

Plugin Version: 20.2. Function: One of the error constants. Notes: Codepage conversion error

12.10.33 kErrorCommunicationFailure = 1

Plugin Version: 20.2. Function: One of the error constants. Notes: Error in Network & Communication layer

12.10.34 kErrorConversionFailure = 22

Plugin Version: 20.2. 358 CHAPTER 12. RFC Function: One of the error constants. Notes: Error while converting a parameter to the correct data type

12.10.35 kErrorExecuted = 16

Plugin Version: 20.2. Function: One of the error constants. Notes: Inbound tRFC Call already executed (needs to be returned from RFC_ON_CHECK_TRANSAC- TION in case the TID is already known and successfully processed before.)

12.10.36 kErrorExternalFailure = 15

Plugin Version: 20.2. Function: One of the error constants. Notes: Error in external custom code. (E.g. in the function handlers or tRFC handlers.) Results in SYS- TEM_FAILURE

12.10.37 kErrorIllegalState = 19

Plugin Version: 20.2. Function: One of the error constants. Notes: The operation is not supported on that handle at the current point of time (e.g. trying a callback on a server handle, while not in a call)

12.10.38 kErrorInvalidHandle = 13

Plugin Version: 20.2. Function: One of the error constants. Notes: An invalid handle was passed to an API call

12.10.39 kErrorInvalidParameter = 20

Plugin Version: 20.2. Function: One of the error constants. Notes: An invalid parameter was passed to an API call, (e.g. invalid name, type or length) 12.10. MODULE RFCMODULEMBS 359

12.10.40 kErrorInvalidProtocol = 11

Plugin Version: 20.2. Function: One of the error constants. Notes: The received data has an unsupported format

12.10.41 kErrorLogonFailure = 2

Plugin Version: 20.2. Function: One of the error constants. Notes: Unable to logon to SAP system. Invalid password, user locked, etc.

12.10.42 kErrorMemoryInsufficient =9

Plugin Version: 20.2. Function: One of the error constants. Notes: Memory insufficient

12.10.43 kErrorNotFound = 17

Plugin Version: 20.2. Function: One of the error constants. Notes: Function or structure definition not found (Metadata API)

12.10.44 kErrorNotSupported = 18

Plugin Version: 20.2. Function: One of the error constants. Notes: The operation is not supported on that handle 360 CHAPTER 12. RFC 12.10.45 kErrorOk = 0

Plugin Version: 20.2. Function: One of the error constants. Notes: Everything O.K. Used by every function. (no exception)

12.10.46 kErrorRetry = 14

Plugin Version: 20.2. Function: One of the error constants. Notes: ListenAndDispatch did not receive an RFC request during the timeout period

12.10.47 kErrorSerializationFailure = 12

Plugin Version: 20.2. Function: One of the error constants. Notes: A problem while serializing or deserializing RFM parameters

12.10.48 kErrorStartSapguiFailure = 26

Plugin Version: 20.2. Function: One of the error constants. Notes: Failed to start and attach SAPGUI to the RFC connection.

12.10.49 kErrorTableMoveBof = 24

Plugin Version: 20.2. Function: One of the error constants. Notes: Trying to move the current position before the first row of the table.

12.10.50 kErrorTableMoveEof = 25

Plugin Version: 20.2. 12.10. MODULE RFCMODULEMBS 361 Function: One of the error constants. Notes: Trying to move the current position after the last row of the table.

12.10.51 kErrorTimeout = 8

Plugin Version: 20.2. Function: One of the error constants. Notes: Time out

12.10.52 kErrorUnknownError = 28

Plugin Version: 20.2. Function: One of the error constants. Notes: ”Something” went wrong, but I don’t know what...

12.10.53 kErrorVersionMismatch = 10

Plugin Version: 20.2. Function: One of the error constants. Notes: Version mismatch 362 CHAPTER 12. RFC 12.11 class RFCParameterDescriptionMBS

12.11.1 class RFCParameterDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a parameter description. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

12.11.2 Methods

12.11.3 Constructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor

12.11.4 Properties

12.11.5 Connection as RFCConnectionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent connection. Notes: (Read only property)

12.11.6 decimals as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Gives the number of decimals in case of a packed number (BCD) Notes: (Read only property)

12.11.7 defaultValue as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Default value as defined in SE37. Notes: (Read only property) 12.11. CLASS RFCPARAMETERDESCRIPTIONMBS 363

12.11.8 Direction as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Specifies whether the parameter is an input, output or bi-directional parameter. Notes: (Read only property)

12.11.9 isOptional as Boolean

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Specifies whether this parameter is defined as optional inSE37. Notes: True is optional, false non-optional. (Read only property)

12.11.10 Name as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Parameter name. Notes: (Read only property)

12.11.11 nucLength as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Parameter length in bytes in a 1-byte-per-SAP_CHAR system. Notes: (Read only property)

12.11.12 parameterText as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Description text of the parameter as defined in SE37. Notes: (Read only property) 364 CHAPTER 12. RFC 12.11.13 Parent as Variant

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: (Read only property)

12.11.14 Type as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Parameter data type. Notes: (Read only property)

12.11.15 TypeDescription as RFCTypeDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The structure definition in case this parameter is a structure ortable. Notes: May be nil for other parameter types. (Read only property)

12.11.16 TypeString as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The type as string. Notes: Convenience property so you can see type in debugger. (Read only property)

12.11.17 ucLength as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Parameter length in bytes in a 2-byte-per-SAP_CHAR system. Notes: (Read only property) 12.11. CLASS RFCPARAMETERDESCRIPTIONMBS 365 12.11.18 Constants

12.11.19 kDirectionChanging = 3

Plugin Version: 20.2. Function: One of the direction mode constants. Notes: Import and export parameter. This corresponds to ABAP CHANGING parameter.

12.11.20 kDirectionExport = 2

Plugin Version: 20.2. Function: One of the direction mode constants. Notes: Export parameter. This corresponds to ABAP EXPORTING parameter.

12.11.21 kDirectionImport = 1

Plugin Version: 20.2. Function: One of the direction mode constants. Notes: Import parameter. This corresponds to ABAP IMPORTING parameter.

12.11.22 kDirectionTable = 7

Plugin Version: 20.2. Function: One of the direction mode constants. Notes: Table parameter. This corresponds to ABAP TABLES parameter. 366 CHAPTER 12. RFC 12.12 class RFCStructureMBS

12.12.1 class RFCStructureMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a structure in a RFC connection. Notes: Subclass of the RFCContainerMBS class.

12.12.2 Methods

12.12.3 Clone as RFCStructureMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a copy of the given structure and returns the handle to the new object.

12.12.4 Constructor(typeDescription as RFCTypeDescriptionMBS)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates an internal structure data object and returns the handle to the structure object.

12.12.5 Destructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The destructor. 12.13. CLASS RFCTABLEMBS 367 12.13 class RFCTableMBS

12.13.1 class RFCTableMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a table in a RFC connection. Notes: Subclass of the RFCContainerMBS class.

12.13.2 Methods

12.13.3 AppendNewRow as RFCStructureMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new row and appends it at the end of the table.

12.13.4 AppendNewRows(numRows as Integer)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Appends a set of new empty rows at the end of the table and moves the table cursor to the first new row.

12.13.5 AppendRow(row as RFCStructureMBS)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Appends the given structure at the end of the table.

12.13.6 Clone as RFCTableMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a copy of the given table and returns the handle to the new table.

12.13.7 Constructor(TypeDescription as RFCTypeDescriptionMBS)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. 368 CHAPTER 12. RFC Function: Creates a internal table object and returns the handle to the table.

12.13.8 CurrentRow as RFCStructureMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Gets the structure handle to the current row.

12.13.9 DeleteAllRows

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Deletes all rows from the table.

12.13.10 DeleteCurrentRow

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Deletes the current row from the table.

12.13.11 Destructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The destructor.

12.13.12 InsertNewRow as RFCStructureMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a new row and inserts it at the current position of the table cursor.

12.13.13 InsertRow(row as RFCStructureMBS)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Inserts the given structure at the current position of the table cursor. 12.13. CLASS RFCTABLEMBS 369 12.13.14 MoveTo(row as Integer)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Moves the cursor from the current position to the position specified by the index.

12.13.15 MoveToFirstRow

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Moves the current position to the first row of the table.

12.13.16 MoveToLastRow

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Moves the current position to the last row of the table.

12.13.17 MoveToNextRow

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Moves the cursor from the current position to the next row.

12.13.18 MoveToPreviousRow

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Moves the cursor from the current position to the previours row.

12.13.19 ReserveCapacity(numRows as Integer)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Reserves memory without changing the size of a table so that new rows can be appended without new memory allocation. 370 CHAPTER 12. RFC 12.13.20 Properties

12.13.21 RowCount as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Gets the number of the rows contained in the table. Notes: (Read only property)

12.13.22 RowType as RFCTypeDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Gets the type descriptor of the table rows. Notes: (Read only property) 12.14. CLASS RFCTRANSACTIONMBS 371 12.14 class RFCTransactionMBS

12.14.1 class RFCTransactionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a transaction.

12.14.2 Methods

12.14.3 ConfirmTransaction

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: After SubmitTransaction has finally succeeded, ConfirmTransaction cleans up the transaction handling table in the backend. Notes: Caution: After this call the backend is no longer protected against this TID. So another SubmitTransaction would result in a duplicate.

12.14.4 Constructor(connection as RFCConnectionMBS, TransactionID as String, QueueName as String)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a container for executing a (multi-step) transactional call. Notes: TransactionID: trasanction ID used to identify the transaction; queueName: queue name associated with the transaction. If it is ”” or empty, the transaction is for tRfc

12.14.5 Destructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The destructor. 372 CHAPTER 12. RFC 12.14.6 InvokeInTransaction(funcHandle as RFCFunctionMBS)

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Puts a tRfc or qRfc call into the given transaction. Notes: Can be used multiple times within one transaction handle. funcHandle: function handle that identifies the Rfc function;

12.14.7 SubmitTransaction

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Executes all function modules in the backend system, that have accumulated in the transaction so far. Notes: This step can be repeated until it finally succeeds (RFC_OK). The transaction handling inthe backend system protects against duplicates.

12.14.8 Properties

12.14.9 Handle as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read only property)

12.14.10 TransactionID as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Retrieves a unique 24-digit transaction ID from the SAP backend system. Notes: (Read only property) 12.15. CLASS RFCTYPEDESCRIPTIONMBS 373 12.15 class RFCTypeDescriptionMBS

12.15.1 class RFCTypeDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for a type definition. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

12.15.2 Methods

12.15.3 Constructor

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The private constructor.

12.15.4 CreateStructure as RFCStructureMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates an internal structure data object and returns the handle to the structure object.

12.15.5 CreateTable as RFCTableMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a internal table object and returns the handle to the table.

12.15.6 FieldDescription(Index as Integer) as RFCFieldDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads the field description of the structure’s indexth field. See also:

• 12.15.7 FieldDescription(Name as String) as RFCFieldDescriptionMBS 374 374 CHAPTER 12. RFC 12.15.7 FieldDescription(Name as String) as RFCFieldDescriptionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads the field description of a field given by name. See also:

• 12.15.6 FieldDescription(Index as Integer) as RFCFieldDescriptionMBS 373

12.15.8 FieldDescriptions as RFCFieldDescriptionMBS()

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads all the field descriptions.

12.15.9 Properties

12.15.10 Connection as RFCConnectionMBS

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The connection owning this object. Notes: (Read only property)

12.15.11 FieldCount as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The number of fields for this type. Notes: (Read only property)

12.15.12 Handle as Integer

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read only property) 12.15. CLASS RFCTYPEDESCRIPTIONMBS 375 12.15.13 Name as String

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The name of the type. Notes: (Read only property)

12.15.14 Parent as Variant

Plugin Version: 20.2, Platforms: macOS, Linux, Windows, Targets: All. Function: The parent object. Notes: (Read only property) 376 CHAPTER 12. RFC Chapter 13

SATSolver

13.1 class LGLAbortedExceptionMBS

13.1.1 class LGLAbortedExceptionMBS

Plugin Version: 21.3, Platforms: macOS, Linux, Windows, iOS, Targets: All. Function: The exception used to report fatal errors in SAT Solver. Notes: Subclass of the RuntimeException class.

13.1.2 Blog Entries

• MBS Xojo Plugins, version 21.3pr6

13.1.3 Blog Entries

• MBS Xojo Plugins, version 21.3pr6

377 378 CHAPTER 13. SATSOLVER 13.2 class LGLMBS

13.2.1 class LGLMBS

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for the SAT Solver from lingeling. Notes: Based on lingeling project here: https://github.com/arminbiere/lingeling and http://fmv.jku.at/lingeling/

13.2.2 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 21.3

• MBS Xojo Plugins, version 21.3pr6

• New in the MBS Xojo Plugins 20.0

• MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0

• MBS Xojo Plugins, version 19.6pr2

13.2.3 Videos

• XDC 2020 MBS Plugins Presentation

13.2.4 Xojo Developer Magazine

• 18.3, page 44: Happy Birthday MonkeyBread Software, What is new in the MBS Xojo Plugins by Stefanie Juchmes

13.2.5 Blog Entries

• MonkeyBread Software Releases the MBS Xojo Plugins in version 21.3

• MBS Xojo Plugins, version 21.3pr6

• New in the MBS Xojo Plugins 20.0

• MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0

• MBS Xojo Plugins, version 19.6pr2 13.2. CLASS LGLMBS 379 13.2.6 Xojo Developer Magazine

• 18.3, page 44: Happy Birthday MonkeyBread Software, What is new in the MBS Xojo Plugins by Stefanie Juchmes

13.2.7 Videos

• XDC 2020 MBS Plugins Presentation

13.2.8 Methods

13.2.9 Add(lit as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Adds a value.

13.2.10 Assume(lit as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Assume single units.

13.2.11 CAssume(lit as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Assume clause (at most one)

13.2.12 Clone as LGLMBS

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Clones the object. Notes: Both ’Cloning’ and ’Forking’ can be used to implement ’Push & Pop’, but the asymmetric forking is more similar to the classical way of implementing it, needs less resources since for instance eliminated variables do not occupy any memory in the children, but requires lifting back satisfying assignments explic- itly (through the whole parent chain). If these full satisfying assignments are really needed actually cloning could be more space efficient too. Assume you want to split the solver into two instances, one with aliteral set to false, the other one to true. Then cloning allows you to produce two independent branches, while for forking you need three, since the root / top solver still has to be kept for lifting back a potential assignment. 380 CHAPTER 13. SATSOLVER 13.2.13 Constructor

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The constructor. Notes: Creates new empty object.

13.2.14 DefaultOption(Name as String) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries default value for an option.

13.2.15 Deref(lit as Integer) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries value. Notes: neg=false, pos=true Returns -1 if lit is bigger then MaxVar.

13.2.16 Failed(lit as Integer) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks failed flag for given item. Notes: neg=false, pos=true for assumptions.

13.2.17 Fixate

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Add assumptions as units 13.2. CLASS LGLMBS 381 13.2.18 Fixed(lit as Integer) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks fixed flag. Notes: neg=false, pos=true Toplevel

13.2.19 FlushCache

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Flush all learned clauses.

13.2.20 FlushTimers

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Flush timers.

13.2.21 Fork as LGLMBS

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Forks the object. Notes: ’Forking’ copies only irredundant clauses and also uses internal variable indices of the parent as external variable indices. Thus ’parent’ and the forked off ’child’ do neither exactly work the same way, nor dothey use from the API point of view the same set of variables. They are satisfiability equivalent. If the child becomes unsatisfiable the parent can be assumed to be unsatisfiable too and thus ’join’ would justaddthe empty clause to the parent. If the child produces a satisfying assignment, this assignment is turned into an assignment of the parent by ’join’. Parents can be forked multiple times. A child has exactly one parent. Parents and children can be released independently. Between ’Fork’ and ’Join’ no other operations but further ’Fork’ are allowed. The effect ot multiple ’Join’ with the same parent is unclear at this point. The same memory manager is use for the child and the parent. Options, prefix, output file and the callbacks for ’getime’ and ’Abort’ are copied too (if set).

Both ’Cloning’ and ’Forking’ can be used to implement ’Push & Pop’, but the asymmetric forking is more similar to the classical way of implementing it, needs less resources since for instance eliminated variables do not occupy any memory in the children, but requires lifting back satisfying assignments explicitly (through 382 CHAPTER 13. SATSOLVER the whole parent chain). If these full satisfying assignments are really needed actually cloning could be more space efficient too. Assume you want to split the solver into two instances, one with a literal set tofalse, the other one to true. Then cloning allows you to produce two independent branches, while for forking you need three, since the root / top solver still has to be kept for lifting back a potential assignment.

13.2.22 Freeze(lit as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Freezes the given item.

13.2.23 Frozen(lit as Integer) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries frozen state.

13.2.24 GetOptionMinMax(Name as String, byref min as Integer, byref max as Integer) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries current value, minimum and maximum values.

13.2.25 HasOption(Name as String) as Boolean

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks if the given option is set.

13.2.26 IncVar as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Increases variables by one. 13.2. CLASS LGLMBS 383 13.2.27 Join(Child as LGLMBS) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Joins back forked child.

13.2.28 LibVersion as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries library version. Example: Print ”LGL ”+LGLMBS.LibVersion

13.2.29 Lookahead as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns a good look ahead literal or zero if all potential literals have been eliminated or have been used as blocking literals in blocked clause elimination. Notes: Zero is also returned if the formula is already inconsistent. The lookahead literal is made usable again, for instance if it was not frozen during a previous SAT call and thus implicitly became melted. There- fore it can be added in a unit clause.

13.2.30 Melt(lit as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Melts a literal.

13.2.31 MeltAll

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Melt all literals. 384 CHAPTER 13. SATSOLVER 13.2.32 ParseFile(File as FolderItem, force as boolean = false) as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file. Notes: Returns empty text on success or error message from parser. See also:

• 13.2.33 ParseFile(File as FolderItem, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 384

13.2.33 ParseFile(File as FolderItem, force as boolean, byref LineNo as Integer, byref Max as Integer) as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file. Notes: Returns empty text on success or error message from parser. See also:

• 13.2.32 ParseFile(File as FolderItem, force as boolean = false) as String 384

13.2.34 ParseFileMT(File as FolderItem, force as boolean = false) as String

Plugin Version: 21.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file. Notes: Returns empty text on success or error message from parser.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 13.2.35 ParseFileMT(File as FolderItem, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 384

13.2.35 ParseFileMT(File as FolderItem, force as boolean, byref LineNo as In- teger, byref Max as Integer) as String

Plugin Version: 21.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file. Notes: 13.2. CLASS LGLMBS 385 Returns empty text on success or error message from parser.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 13.2.34 ParseFileMT(File as FolderItem, force as boolean = false) as String 384

13.2.36 ParsePath(Path as String, force as boolean = false) as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file given by path. Notes: Returns empty text on success or error message from parser.

On MacOS and Linux, if file has the following extensions, the file will be decompressed with commandline tool and then parsed:

.gz gzip .xz xz .bz2 bzip2 .zip unzip .7z 7x

See also:

• 13.2.37 ParsePath(Path as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 385

13.2.37 ParsePath(Path as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file given by path. Notes: Returns empty text on success or error message from parser. 386 CHAPTER 13. SATSOLVER On MacOS and Linux, if file has the following extensions, the file will be decompressed with commandline tool and then parsed:

.gz gzip .xz xz .bz2 bzip2 .zip unzip .7z 7x

See also:

• 13.2.36 ParsePath(Path as String, force as boolean = false) as String 385

13.2.38 ParsePathMT(Path as String, force as boolean = false) as String

Plugin Version: 21.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file given by path. Notes: Returns empty text on success or error message from parser.

On MacOS and Linux, if file has the following extensions, the file will be decompressed with commandline tool and then parsed:

.gz gzip .xz xz .bz2 bzip2 .zip unzip .7z 7x

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 13.2.39 ParsePathMT(Path as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 387 13.2. CLASS LGLMBS 387 13.2.39 ParsePathMT(Path as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String

Plugin Version: 21.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file given by path. Notes: Returns empty text on success or error message from parser.

On MacOS and Linux, if file has the following extensions, the file will be decompressed with commandline tool and then parsed:

.gz gzip .xz xz .bz2 bzip2 .zip unzip .7z 7x

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 13.2.38 ParsePathMT(Path as String, force as boolean = false) as String 386

13.2.40 ParseString(Data as String, force as boolean = false) as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file given it as text. Notes: Returns empty text on success or error message from parser. Please pass text with data separated with unix line endings (endofline.unix), so you may need to use Re- placeLineEndings function. See also:

• 13.2.41 ParseString(Data as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 388 388 CHAPTER 13. SATSOLVER 13.2.41 ParseString(Data as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file given it as text. Notes: Returns empty text on success or error message from parser. Please pass text with data separated with unix line endings (endofline.unix), so you may need to use Re- placeLineEndings function. See also:

• 13.2.40 ParseString(Data as String, force as boolean = false) as String 387

13.2.42 ParseStringMT(Data as String, force as boolean = false) as String

Plugin Version: 21.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file given it as text. Notes: Returns empty text on success or error message from parser. Please pass text with data separated with unix line endings (endofline.unix), so you may need to use Re- placeLineEndings function.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 13.2.43 ParseStringMT(Data as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String 388

13.2.43 ParseStringMT(Data as String, force as boolean, byref LineNo as Inte- ger, byref Max as Integer) as String

Plugin Version: 21.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Parses data file given it as text. Notes: Returns empty text on success or error message from parser. Please pass text with data separated with unix line endings (endofline.unix), so you may need to use Re- placeLineEndings function. 13.2. CLASS LGLMBS 389 The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running. See also:

• 13.2.42 ParseStringMT(Data as String, force as boolean = false) as String 388

13.2.44 Print(File as FolderItem = nil)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Print system to file or stdout. Notes: Pass nil to use stdout. Remaining in DIMACS format

13.2.45 PrintAll(File as FolderItem = nil)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Prints all values. Notes: Including units & equivs. Pass nil to use stdout.

13.2.46 PrintBanner(Name as String, Prefix as String, File as FolderItem = nil)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Prints banner including version of library. Notes: Pass nil to use stdout. see lglbnr function.

13.2.47 PrintOptions(prefix as string, IgnoreSome as boolean)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. 390 CHAPTER 13. SATSOLVER Function: Print all options to stdout.

13.2.48 PrintPCS(mixed as boolean)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Prints PCS file.

13.2.49 PrintRangeOptions

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Print range options to stdout.

13.2.50 PrintSizes

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Prints data structure sizes.

13.2.51 PrintStats

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Prints statistics to stdout.

13.2.52 PrintUsage

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Print usage ”-h”.

13.2.53 ReadOptionFile(File as FolderItem) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Reads the option file. 13.2. CLASS LGLMBS 391 13.2.54 Reconstk(byref Start as Ptr, byref Top as Ptr)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Set Start and Top to the ’start’ and ’top’ of the reconstruction stack, which is used in BCE, BVE and CCE for reconstructing a solution after eliminating variables or clauses. Notes: These pointers are only valid until the next Sat or Simp call.

13.2.55 ReduceCache

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Reset cache size.

13.2.56 Representative(lit as Integer) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Return representative from equivalence class if literal is not top-level assigned nor eliminated.

13.2.57 ResetPhase(lit as integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Set default phase of a literal. Notes: Stop forcing phase in decisions.

13.2.58 Reusable(lit as Integer) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks if item can be reused. Notes: If a literal was not frozen at the last call to Sat (or Simp) it becomes ’unusable’ after the next call even though it might not have been used as blocking literal etc.

13.2.59 Reuse(lit as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. 392 CHAPTER 13. SATSOLVER Function: Reuses an item. Notes: If a literal was not frozen at the last call to Sat (or Simp) it becomes ’unusable’ after the next call even though it might not have been used as blocking literal etc.

13.2.60 Sat as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Calculates the system. Notes: May output messages to stdout.

13.2.61 SatMT as Integer

Plugin Version: 21.3, Platforms: macOS, Linux, Windows, Targets: All. Function: Calculates the system. Notes: May output messages to stdout.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.

13.2.62 SetAPITraceFile(File as FolderItem)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a text file and let the library output to this file. Notes: Logs API calls to the library.

13.2.63 SetID(tid as Integer, tids as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Set individual ids for logging and statistics. 13.2. CLASS LGLMBS 393 13.2.64 SetImportant(lit as integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Prefer decisions on ’important’ variables.

13.2.65 SetOutputFile(File as FolderItem)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates an output file and let the library output to this file. Notes: Sets output file for report.

13.2.66 SetPhase(lit as integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Set default phase of a literal. Notes: Any decision on this literal will always try this phase. Note, that this function does not have any effect on eliminated variables. Further equivalent variables share the same forced phase and thus iftheyare set to different default phases, only the last set operation will bekept.

13.2.67 SetPhases

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets the phases. Notes: Assume the solver is in the SATISFIABLE state (after Sat or Simp), then calling SetPhases will copy the current assignment as default phases.

13.2.68 SetTraceFile(File as FolderItem)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Creates a text file and let the library output to this file. Notes: Set trace output file. Logs trace calls to the library. 394 CHAPTER 13. SATSOLVER 13.2.69 Simp(iterations as integer) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Calculates the system. Notes: Iterations must be >= 0.

13.2.70 TraverseAllClauses

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Loops over all clauses and calls TraverseAllClauses event for each. Notes: Internally calls TraverseUnits, TraverseEquivalences and TraverseRemainingClauses. See also:

• 13.2.96 TraverseAllClauses(Lit as Integer) 399

13.2.71 TraverseEquivalences

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Loops over equivalences and calls TraverseEquivalences event for each. See also:

• 13.2.97 TraverseEquivalences(Lit as Integer, Representation as Integer) 399

13.2.72 TraverseRemainingClauses

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Loops over remaining clauses and calls TraverseRemainingClauses event for each. See also:

• 13.2.98 TraverseRemainingClauses(Lit as Integer) 399

13.2.73 TraverseUnits

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Loops over units and calls TraverseUnits event for each. See also:

• 13.2.99 TraverseUnits(Unit as Integer) 399 13.2. CLASS LGLMBS 395 13.2.74 Unclone(Child as LGLMBS) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Unclones the object.

13.2.75 Usable(lit as Integer) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Checks whether an item is usable. Notes: If a literal was not frozen at the last call to Sat (or Simp) it becomes ’unusable’ after the next call even though it might not have been used as blocking literal etc.

13.2.76 Properties

13.2.77 Aborted as Boolean

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The aborted status. Notes: We set this to true when the processing is aborted due to an error. See AbortMessage property for the message. (Read and Write property) See also:

• 13.2.95 Aborted 398

13.2.78 AbortMessage as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The abort reason message. Notes: (Read only property)

13.2.79 Bytes as Int64

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. 396 CHAPTER 13. SATSOLVER Function: Queries current size in bytes. Notes: (Read only property)

13.2.80 Changed as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Model changed. Notes: (Read only property)

13.2.81 Confs as Int64

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries number of conflicts. Notes: (Read only property)

13.2.82 Decs as Int64

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries number of decisions. Notes: (Read only property)

13.2.83 Handle as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal object reference. Notes: (Read only property)

13.2.84 Inconsistent as Boolean

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Contains empty clause? Notes: (Read only property) 13.2. CLASS LGLMBS 397 13.2.85 MaxMegaBytes as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Maximum memory usage in megabytes. Notes: (Read only property)

13.2.86 MaxVar as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries maximum index of variables. Notes: (Read only property)

13.2.87 MegaBytes as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries current size in memory as megabytes. Notes: (Read only property)

13.2.88 Options as Dictionary

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries all options with values. Notes: (Read only property)

13.2.89 Prefix as String

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: The prefix for messages. Notes: (Read and Write property)

13.2.90 ProcessTime as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. 398 CHAPTER 13. SATSOLVER Function: Queries CPU usage time used. Notes: Value is -1 on Windows as we don’t have the unix functions there. (Read only property)

13.2.91 Props as Int64

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries number of propagations. Notes: (Read only property)

13.2.92 Seconds as Double

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Returns time needed. Notes: (Read only property)

13.2.93 Option(Name as String) as Integer

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries or sets option value. Notes: (Read and Write computed property)

13.2.94 Events

13.2.95 Aborted

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: . Function: The event called when processing is aborted due to an error. Notes: Errors are printed to stdout. See AbortMessage property for the message. See also:

• 13.2.77 Aborted as Boolean 395 13.2. CLASS LGLMBS 399 13.2.96 TraverseAllClauses(Lit as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: . Function: The event called for TraverseAllClauses method. See also:

• 13.2.70 TraverseAllClauses 394

13.2.97 TraverseEquivalences(Lit as Integer, Representation as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: . Function: The event called for TraverseEquivalences method. See also:

• 13.2.71 TraverseEquivalences 394

13.2.98 TraverseRemainingClauses(Lit as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: . Function: The event called for TraverseRemainingClauses method. See also:

• 13.2.72 TraverseRemainingClauses 394

13.2.99 TraverseUnits(Unit as Integer)

Plugin Version: 20.0, Platforms: macOS, Linux, Windows, Targets: . Function: The event called for TraverseUnits method. See also:

• 13.2.73 TraverseUnits 394

13.2.100 Constants

13.2.101 LGL_SATISFIABLE = 10

Plugin Version: 20.0. Function: One of the SAT result values. Notes: The system is satisfiable. 400 CHAPTER 13. SATSOLVER 13.2.102 LGL_UNKNOWN = 0

Plugin Version: 20.0. Function: One of the SAT result values. Notes: It is not known whether it is satisfiable.

13.2.103 LGL_UNSATISFIABLE = 20

Plugin Version: 20.0. Function: One of the SAT result values. Notes: The system is not satisfiable. Chapter 14

SmartCard

14.1 class SmartCardContextMBS

14.1.1 class SmartCardContextMBS

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: The class for a SmartCard context. Example: dim c as new SmartCardContextMBS dim list() as string = c.Readers MsgBox Join(list, EndOfLine)

14.1.2 Blog Entries

• MBS Xojo Plugins, version 19.6pr1

14.1.3 Blog Entries

• MBS Xojo Plugins, version 19.6pr1

14.1.4 Methods

14.1.5 Cancel

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web.

401 402 CHAPTER 14. SMARTCARD Function: Terminates all outstanding actions within a specific resource manager context. Notes: The only requests that you can cancel are those that require waiting for external action by the smart card or user. Any such outstanding action requests will terminate with a status indication that the action was canceled. This is especially useful to force outstanding GetStatusChange calls to terminate.

Lasterror is set.

14.1.6 Connect(reader as string, ShareMode as UInt32, PreferredProtocols as UInt32) as SmartCardMBS

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Connects to a smartcard. Example: dim c as new SmartCardContextMBS dim s as SmartCardMBS s = c.Connect(”MyReader”, SmartCardMBS.kShareShared, SmartCardMBS.kProtocolAny) if s <>nil then MsgBox ”Connected” else MsgBox ”Error: ”+str(c.Lasterror) end if

Notes: Establishes a connection (using a specific resource manager context) between the calling application anda smart card contained by a specific reader. If no card exists in the specified reader, an error is returned.

Reader: The name of the reader that contains the target card. ShareMode: A flag that indicates whether other applications may form connections to the card. Useoneof SmartCardMBS.kShare* constants. e.g. kShareExclusive PreferredProtocols: A bitmask of acceptable protocols for the connection. Possible values may be combined with the OR operation. Use SmartCardMBS.kProtocol* constants. e.g. kProtocolT1

Lasterror and ActiveProtocol are set. Returns on success a smartcard object, else returns nil. 14.1. CLASS SMARTCARDCONTEXTMBS 403 14.1.7 Constructor

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Initializes a smartcard context.

14.1.8 IsValid as boolean

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Determines whether a smart card context handle is valid. Notes: Returns true if valid or false if not valid.

14.1.9 ReaderGroups as string()

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Provides the list of reader groups that have previously been introduced to the system. Notes: The groups may be SCard$ AllReaders, SCard$ DefaultReaders, SCard$ LocalReaders and SCard$ System- Readers. Lasterror is set.

14.1.10 Readers as string()

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Provides the list of readers within a set of named reader groups, eliminating duplicates. Example: dim c as new SmartCardContextMBS dim list() as string = c.Readers MsgBox Join(list, EndOfLine)

Notes: Lasterror is set. See also:

• 14.1.11 Readers(ReaderGroups() as string) as string() 404 404 CHAPTER 14. SMARTCARD 14.1.11 Readers(ReaderGroups() as string) as string()

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Provides the list of readers within a set of named reader groups, eliminating duplicates. Notes: The caller supplies a list of reader groups, and receives the list of readers within the named groups. Un- recognized group names are ignored. This function only returns readers within the named groups that are currently attached to the system and available for use.

ReaderGroups: The reader groups you like to query. Lasterror is set. See also:

• 14.1.10 Readers as string() 403

14.1.12 Properties

14.1.13 Available as Boolean

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Whether the smartcard API is available. Notes: This should be available on Mac and Windows.

Loads on Mac the PCSC.framework. For Linux you need pcsclite library installed. We try to load libpcsclite.so or /usr/lib/libpcsclite.so. On Windows we use winscard.dll built into Windows. (Read only property)

14.1.14 Handle as Integer

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Internal object reference. Notes: (Read and Write property)

14.1.15 Lasterror as Integer

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. 14.1. CLASS SMARTCARDCONTEXTMBS 405 Function: The last error code. Notes: (Read and Write property)

14.1.16 Constants

14.1.17 kErrorBadSeek = & H80100029

Plugin Version: 16.3. Function: One of the error codes. Notes: An error occurred in setting the smart card file object pointer.

14.1.18 kErrorCancelled = & H80100002

Plugin Version: 16.3. Function: One of the error codes. Notes: The action was canceled by an Cancel request.

14.1.19 kErrorCancelledByUser = & H8010006E

Plugin Version: 16.3. Function: One of the error codes. Notes: The action was canceled by the user.

14.1.20 kErrorCantDispose = & H8010000E

Plugin Version: 16.3. Function: One of the error codes. Notes: The system could not dispose of the media in the requested manner.

14.1.21 kErrorCardNotAuthenticated = & H8010006F

Plugin Version: 16.3. Function: One of the error codes. Notes: No PIN was presented to the smart card. 406 CHAPTER 14. SMARTCARD 14.1.22 kErrorCardUnsupported = & H8010001C

Plugin Version: 16.3. Function: One of the error codes. Notes: The smart card does not meet minimal requirements for support.

14.1.23 kErrorCertificateUnavailable = & H8010002D

Plugin Version: 16.3. Function: One of the error codes. Notes: The requested certificate could not be obtained.

14.1.24 kErrorChvBlocked = & H8010006C

Plugin Version: 16.3. Function: One of the error codes. Notes: The card cannot be accessed because the maximum number of PIN entry attempts has been reached.

14.1.25 kErrorCommDataLost = & H8010002F

Plugin Version: 16.3. Function: One of the error codes. Notes: A communications error with the smart card has been detected.

14.1.26 kErrorCommError = & H80100013

Plugin Version: 16.3. Function: One of the error codes. Notes: An internal communications error has been detected.

14.1.27 kErrorDirNotFound = & H80100023

Plugin Version: 16.3. 14.1. CLASS SMARTCARDCONTEXTMBS 407 Function: One of the error codes. Notes: The specified directory does not exist in the smart card.

14.1.28 kErrorDuplicateReader = & H8010001B

Plugin Version: 16.3. Function: One of the error codes. Notes: The reader driver did not produce a unique reader name.

14.1.29 kErrorEof = & H8010006D

Plugin Version: 16.3. Function: One of the error codes. Notes: The end of the smart card file has been reached.

14.1.30 kErrorFileNotFound = & H80100024

Plugin Version: 16.3. Function: One of the error codes. Notes: The specified file does not exist in the smart card.

14.1.31 kErrorIccCreateorder = & H80100021

Plugin Version: 16.3. Function: One of the error codes. Notes: The requested order of object creation is not supported.

14.1.32 kErrorIccInstallation = & H80100020

Plugin Version: 16.3. Function: One of the error codes. Notes: No primary provider can be found for the smart card. 408 CHAPTER 14. SMARTCARD 14.1.33 kErrorInsufficientBuffer = & H80100008

Plugin Version: 16.3. Function: One of the error codes. Notes: The data buffer for returned data is too small for the returned data.

14.1.34 kErrorInternalError = & H80100001

Plugin Version: 16.3. Function: One of the error codes. Notes: An internal consistency check failed.

14.1.35 kErrorInvalidAtr = & H80100015

Plugin Version: 16.3. Function: One of the error codes. Notes: An ATR string obtained from the registry is not a valid ATR string.

14.1.36 kErrorInvalidChv = & H8010002A

Plugin Version: 16.3. Function: One of the error codes. Notes: The supplied PIN is incorrect.

14.1.37 kErrorInvalidHandle = & H80100003

Plugin Version: 16.3. Function: One of the error codes. Notes: The supplied handle was not valid.

14.1.38 kErrorInvalidParameter = & H80100004

Plugin Version: 16.3. 14.1. CLASS SMARTCARDCONTEXTMBS 409 Function: One of the error codes. Notes: One or more of the supplied parameters could not be properly interpreted.

14.1.39 kErrorInvalidTarget = & H80100005

Plugin Version: 16.3. Function: One of the error codes. Notes: Registry startup information is missing or not valid.

14.1.40 kErrorInvalidValue = & H80100011

Plugin Version: 16.3. Function: One of the error codes. Notes: One or more of the supplied parameter values could not be properly interpreted.

14.1.41 kErrorNoAccess = & H80100027

Plugin Version: 16.3. Function: One of the error codes. Notes: Access is denied to the file.

14.1.42 kErrorNoDir = & H80100025

Plugin Version: 16.3. Function: One of the error codes. Notes: The supplied path does not represent a smart card directory.

14.1.43 kErrorNoFile = & H80100026

Plugin Version: 16.3. Function: One of the error codes. Notes: The supplied path does not represent a smart card file. 410 CHAPTER 14. SMARTCARD 14.1.44 kErrorNoKeyContainer = & H80100030

Plugin Version: 16.3. Function: One of the error codes. Notes: The requested key container does not exist on the smart card.

14.1.45 kErrorNoMemory = & H80100006

Plugin Version: 16.3. Function: One of the error codes. Notes: Not enough memory available to complete this command.

14.1.46 kErrorNoReadersAvailable = & H8010002E

Plugin Version: 16.3. Function: One of the error codes. Notes: No smart card reader is available.

14.1.47 kErrorNoService = & H8010001D

Plugin Version: 16.3. Function: One of the error codes. Notes: The smart card resource manager is not running.

14.1.48 kErrorNoSmartcard = & H8010000C

Plugin Version: 16.3. Function: One of the error codes. Notes: The operation requires a smart card, but no smart card is currently in the device.

14.1.49 kErrorNoSuchCertificate = & H8010002C

Plugin Version: 16.3. 14.1. CLASS SMARTCARDCONTEXTMBS 411 Function: One of the error codes. Notes: The requested certificate does not exist.

14.1.50 kErrorNotReady = & H80100010

Plugin Version: 16.3. Function: One of the error codes. Notes: The reader or card is not ready to accept commands.

14.1.51 kErrorNotTransacted = & H80100016

Plugin Version: 16.3. Function: One of the error codes. Notes: An attempt was made to end a nonexistent transaction.

14.1.52 kErrorPciTooSmall = & H80100019

Plugin Version: 16.3. Function: One of the error codes. Notes: The PCI receive buffer was too small.

14.1.53 kErrorProtoMismatch = & H8010000F

Plugin Version: 16.3. Function: One of the error codes. Notes: The requested protocols are incompatible with the protocol currently in use with the card.

14.1.54 kErrorReaderUnavailable = & H80100017

Plugin Version: 16.3. Function: One of the error codes. Notes: The specified reader is not currently available for use. 412 CHAPTER 14. SMARTCARD 14.1.55 kErrorReaderUnsupported = & H8010001A

Plugin Version: 16.3. Function: One of the error codes. Notes: The reader driver does not meet minimal requirements for support.

14.1.56 kErrorRemovedCard = & H80100069

Plugin Version: 16.3. Function: One of the error codes. Notes: The smart card has been removed, so further communication is not possible.

14.1.57 kErrorResetCard = & H80100068

Plugin Version: 16.3. Function: One of the error codes. Notes: The smart card was reset.

14.1.58 kErrorSecurityViolation = & H8010006A

Plugin Version: 16.3. Function: One of the error codes. Notes: Access was denied because of a security violation.

14.1.59 kErrorServerTooBusy = & H80100031

Plugin Version: 16.3. Function: One of the error codes. Notes: The smart card resource manager is too busy to complete this operation.

14.1.60 kErrorServiceStopped = & H8010001E

Plugin Version: 16.3. 14.1. CLASS SMARTCARDCONTEXTMBS 413 Function: One of the error codes. Notes: The smart card resource manager has shut down.

14.1.61 kErrorSharingViolation = & H8010000B

Plugin Version: 16.3. Function: One of the error codes. Notes: The smart card cannot be accessed because of other outstanding connections.

14.1.62 kErrorShutdown = & H80100018

Plugin Version: 16.3. Function: One of the error codes. Notes: The operation has been aborted to allow the server application to exit.

14.1.63 kErrorSuccess = 0

Plugin Version: 16.3. Function: One of the error codes. Notes: No error.

14.1.64 kErrorSystemCancelled = & H80100012

Plugin Version: 16.3. Function: One of the error codes. Notes: The action was canceled by the system, presumably to log off or shut down.

14.1.65 kErrorTimeout = & H8010000A

Plugin Version: 16.3. Function: One of the error codes. Notes: The user-specified time-out value has expired. 414 CHAPTER 14. SMARTCARD 14.1.66 kErrorUnexpected = & H8010001F

Plugin Version: 16.3. Function: One of the error codes. Notes: An unexpected card error has occurred.

14.1.67 kErrorUnknownCard = & H8010000D

Plugin Version: 16.3. Function: One of the error codes. Notes: The specified smart card name is not recognized.

14.1.68 kErrorUnknownError = & H80100014

Plugin Version: 16.3. Function: One of the error codes. Notes: An internal error has been detected, but the source is unknown.

14.1.69 kErrorUnknownReader = & H80100009

Plugin Version: 16.3. Function: One of the error codes. Notes: The specified reader name is not recognized.

14.1.70 kErrorUnknownResMng = & H8010002B

Plugin Version: 16.3. Function: One of the error codes. Notes: An unrecognized error code was returned.

14.1.71 kErrorUnpoweredCard = & H80100067

Plugin Version: 16.3. 14.1. CLASS SMARTCARDCONTEXTMBS 415 Function: One of the error codes. Notes: Power has been removed from the smart card, so that further communication is not possible.

14.1.72 kErrorUnresponsiveCard = & H80100066

Plugin Version: 16.3. Function: One of the error codes. Notes: The smart card is not responding to a reset.

14.1.73 kErrorUnsupportedCard = & H80100065

Plugin Version: 16.3. Function: One of the error codes. Notes: The reader cannot communicate with the card, due to ATR string configuration conflicts.

14.1.74 kErrorUnsupportedFeature = & H80100022

Plugin Version: 16.3. Function: One of the error codes. Notes: This smart card does not support the requested feature.

14.1.75 kErrorWaitedTooLong = & H80100007

Plugin Version: 16.3. Function: One of the error codes. Notes: An internal consistency timer has expired.

14.1.76 kErrorWriteTooMany = & H80100028

Plugin Version: 16.3. Function: One of the error codes. Notes: An attempt was made to write more data than would fit in the target object. 416 CHAPTER 14. SMARTCARD 14.1.77 kErrorWrongChv = & H8010006B

Plugin Version: 16.3. Function: One of the error codes. Notes: The card cannot be accessed because the wrong PIN was presented. 14.2. CLASS SMARTCARDMBS 417 14.2 class SmartCardMBS

14.2.1 class SmartCardMBS

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: The class for a smartcard. Notes: This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.

14.2.2 Blog Entries

• MBS Xojo Plugins, version 20.2pr2

• MBS Xojo Plugins, version 19.6pr2

• MBS Xojo Plugins, version 19.6pr1

• MBS Xojo Plugins, version 19.5pr6

• MonkeyBread Software Releases the MBS Xojo Plugins in version 18.5

• MBS Xojo Plugins, version 18.5pr3

• New functions for smart card reading

14.2.3 Blog Entries

• MBS Xojo Plugins, version 20.2pr2

• MBS Xojo Plugins, version 19.6pr2

• MBS Xojo Plugins, version 19.6pr1

• MBS Xojo Plugins, version 19.5pr6

• MonkeyBread Software Releases the MBS Xojo Plugins in version 18.5

• MBS Xojo Plugins, version 18.5pr3

• New functions for smart card reading

14.2.4 Methods

14.2.5 BeginTransaction

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. 418 CHAPTER 14. SMARTCARD Function: Starts a transaction. Notes: The function waits for the completion of all other transactions before it begins. After the transaction starts, all other applications are blocked from accessing the smart card while the transaction is in progress.

If a transaction is held on the card for more than five seconds with no operations happening on that card, then the card is reset. Calling any of the Smart Card and Reader Access Functions or Direct Card Access Functions on the card that is transacted results in the timer being reset to continue allowing the transaction to be used. The BeginTransaction function is a smart card and reader access function. For more information about other access functions, see Smart Card and Reader Access Functions.

Lasterror is set.

14.2.6 CancelTransaction

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Cancels current transaction. Notes: Lasterror is set.

14.2.7 Constructor

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: The private constructor.

14.2.8 Control(ControlCode as Integer, input as ptr, inputLength as UInt32, output as ptr, byref outputLength as UInt32)

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Direct control of the reader. Notes: You can call it any time after a successful call to SmartCard.Connect and before a successful call to Smart- Card.Disconnect. The effect on the state of the reader depends on the control code.

ControlCode: Control code for the operation. This value identifies the specific operation to be performed. 14.2. CLASS SMARTCARDMBS 419 Input: Pointer to a buffer that contains the data required to perform the operation. This parameter canbe nil if the ControlCode parameter specifies an operation that does not require input data. inputLength: Size, in bytes, of the buffer pointed to by Input. output: Pointer to a buffer that receives the operation’s output data. This parameter can be nilifthe ControlCode parameter specifies an operation that does not produce output data. outputLength: On input the size, in bytes, of the buffer pointed to by output. On output the receives the size, in bytes, of the data stored into the buffer pointed to by output.

Lasterror is set.

14.2.9 Disconnect(Disposition as Integer = 0)

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Terminates a connection previously opened between the calling application and a smart card in the target reader. Notes: Disposition: Action to take on the card in the connected reader on close. can be:

kUnpowerCard Power down the card and reset it (Cold Reset). kResetCard Reset the card (Warm Reset). kLeaveCard Do not do anything special on reconnect. kEjectCard Eject card.

Lasterror is set.

14.2.10 EndTransaction(Disposition as Integer = 0)

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Ends transaction. Notes: Completes a previously declared transaction, allowing other applications to resume interactions with the card.

Disposition: Action to take on the card in the connected reader on close. Can be Eject, Leave, Reset or Unpower. See constants.

Lasterror is set. 420 CHAPTER 14. SMARTCARD 14.2.11 GetAttrib(AttrId as UInt32) as Memoryblock

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Retrieves the current reader attributes for the given handle. Notes: It does not affect the state of the reader, driver, orcard. The plugin first queries for size of attribute and on success queries again to get the data and returnitasa memoryblock.

AttrId: The attribute ID. See kAttribute* constants.

Lasterror is set.

14.2.12 ReadFile(FileID as MemoryBlock) as MemoryBlock

Plugin Version: 18.5, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Read file from smart card with APDU protocol. Notes: Returns data as MemoryBlock or error message. The first two bytes are status code.

14.2.13 Reconnect(ShareMode as UInt32, PreferredProtocols as UInt32, Ini- tialization as UInt32)

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: The Reconnect function reestablishes an existing connection between the calling application and a smart card. Notes: This function moves a card handle from direct access to general access, or acknowledges and clears an error condition that is preventing further access to the card.

Initialization can be one of the following:

kUnpowerCard Power down the card and reset it (Cold Reset). kResetCard Reset the card (Warm Reset). kLeaveCard Do not do anything special on reconnect. 14.2. CLASS SMARTCARDMBS 421 ShareMode: A flag that indicates whether other applications may form connections to the card. Useoneof SmartCardMBS.kShare* constants. e.g. kShareExclusive PreferredProtocols: A bitmask of acceptable protocols for the connection. Possible values may be combined with the OR operation. Use SmartCardMBS.kProtocol* constants. e.g. kProtocolT1

Lasterror and ActiveProtocol are set.

14.2.14 SetAttrib(AttrId as UInt32, mem as Memoryblock)

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Sets the given reader attribute. Notes: It does not affect the state of the reader, reader driver, or smart card. Not all attributes are supported byall readers (nor can they be set at all times) as many of the attributes are under direct control of the transport protocol.

AttrId: The attribute ID. See kAttribute* constants. Mem: The data to store.

Lasterror is set.

14.2.15 SplitValues(Data as MemoryBlock) as Dictionary

Plugin Version: 18.5, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Split values read from smart card. Notes: Files on smartcard can contain key/value data. Returns Dictionary with numbers (key) and values as strings.

14.2.16 Status(byref Reader as string, byref State as Integer, byref Protocol as Integer, byref CardID as string)

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Provides the current status of a smart card in a reader. Notes: You can call it any time after a successful call to SCardConnect and before a successful call to SCardDis- 422 CHAPTER 14. SMARTCARD connect. It does not affect the state of the reader or reader driver.

Provides reader name, state of card (see kState constants), Protocol (see kProtocol constants) and CardID.

State: Current state of the smart card in the reader. Upon success, it receives one of the following state indicators. Protocol: Current protocol, if any. The returned value is meaningful only if the returned value of pdwState is kCardStateSpecific. CardID: 32-byte buffer that receives the ATR string from the currently inserted card, if available.

Lasterror is set. See also:

• 14.2.17 Status(byref State as Integer, byref Protocol as Integer, byref CardID as string) 422

14.2.17 Status(byref State as Integer, byref Protocol as Integer, byref CardID as string)

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Provides the current status of a smart card in a reader. Notes: Same as other Status function, but without querying the name. Lasterror is set. See also:

• 14.2.16 Status(byref Reader as string, byref State as Integer, byref Protocol as Integer, byref CardID as string) 421

14.2.18 Transmit(ioSendPci as Ptr, SendBuffer as ptr, SendLength as UInt32, ioRecvPci as ptr, RecvBuffer as Ptr, byref RecvLength as UInt32)

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: Sends a service request to the smart card and expects to receive data back from the card. Example: dim card as SmartCardMBS // your card dim header as new memoryBlock(8) header.Int32Value(0) = 2 // T1 header.Int32Value(4) = 8 // size of this block 14.2. CLASS SMARTCARDMBS 423 dim command as new MemoryBlock(5) command.Int8Value(0) = 0 command.Int8Value(1) = & hCA command.Int8Value(2) = 1 command.Int8Value(3) = & h82 command.Int8Value(4) = 2

dim buffer as new MemoryBlock(512) dim ReceiveHeader as new MemoryBlock(8)

dim RecvLength as UInt32 card.Transmit(header, command, command.Size, ReceiveHeader, buffer, RecvLength)

MsgBox ”Received ”+str(RecvLength)+” bytes”

Notes: ioSendPci: A pointer to the protocol header structure for the instruction. This buffer is in the format of an SCARD_IO_RE- QUEST structure, followed by the specific protocol control information (PCI). For the T=0, T=1, and Raw protocols, the PCI structure is constant. The smart card subsystem supplies a global T=0, T=1, or Raw PCI structure, which you can reference by using the symbols SCARD_PCI_T0, SCARD_PCI_T1, and SCARD_PCI_RAW respectively.

SendBuffer: A pointer to the actual data to be written to the card. For T=0, the data parameters are placed into the address pointed to by SendBuffer according to the follow- ing structure:

Type name Description Byte Cla The instruction class Byte Ins The instruction code Byte P1 Parameter to the instruction Byte P2 Parameter to the instruction Byte P3 Size of I/O transfer

The data sent to the card should immediately follow the send buffer. In the special case where no datais sent to the card and no data is expected in return, P3 is not sent.

SendLength: The length, in bytes, of the SendBuffer parameter. For T=0, in the special case where no data is sent to the card and no data expected in return, this length must reflect that the P3 member is not being sent; the length shouldbe4. 424 CHAPTER 14. SMARTCARD ioRecvPci: Pointer to the protocol header structure for the instruction, followed by a buffer in which to receive any returned protocol control information (PCI) specific to the protocol in use. This parameter can be nilifno PCI is returned.

RecvBuffer: Pointer to any data returned from the card. For T=0, the data is immediately followed by the SW1 and SW2 status bytes. If no data is returned from the card, then this buffer will only contain the SW1 and SW2 status bytes.

RecvLength: Supplies the length, in bytes, of the RecvBuffer parameter and receives the actual number of bytes received from the smart card. This value cannot be SCARD_AUTOALLOCATE because Transmit does not support SCARD_AUTOALLOCATE. For T=0, the receive buffer must be at least two bytes long to receive the SW1 and SW2 status bytes. see also https://msdn.microsoft.com/en-us/library/windows/desktop/aa379804(v=vs.85).aspx

Lasterror is set.

14.2.19 Properties

14.2.20 ActiveProtocol as Integer

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: The active protocol. Notes: (Read and Write property)

14.2.21 Handle as Integer

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: The internal object reference. Notes: (Read and Write property) 14.2. CLASS SMARTCARDMBS 425 14.2.22 Lasterror as Integer

Plugin Version: 16.3, Platforms: macOS, Linux, Windows, Targets: Desktop, Console & Web. Function: The last error code. Notes: (Read and Write property)

14.2.23 Constants

14.2.24 kAttributeAtrString = 590595

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Answer to reset (ATR) string.

14.2.25 kAttributeChannelId = 131344

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: DWORD encoded as & hDDDDCCCC, where DDDD = data channel type and CCCC = channel number.

The following encodings are defined for DDDD: & h01 serial I/O; CCCC is a port number. & h02 parallel I/O; CCCC is a port number. & h04 PS/2 keyboard port; CCCC is zero. & h08 SCSI; CCCC is SCSI ID number. & h10 IDE; CCCC is device number. & h20 USB; CCCC is device number. & hFy vendor-defined interface with y in the range zero through 15; CCCC is vendor defined.

14.2.26 kAttributeCharacteristics = 393552

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Integer indicating which mechanical characteristics are supported. If zero, no special characteristics are supported. 426 CHAPTER 14. SMARTCARD Note that multiple bits can be set: & h00000001 Card swallowing mechanism & h00000002 Card ejection mechanism & h00000004 Card capture mechanism All other values are reserved for future use (RFU).

14.2.27 kAttributeCurrentBwt = 524809

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Current block waiting time.

14.2.28 kAttributeCurrentClk = 524802

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Current clock rate, in kHz.

14.2.29 kAttributeCurrentCwt = 524810

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Current character waiting time.

14.2.30 kAttributeCurrentD = 524804

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Bit rate conversion factor.

14.2.31 kAttributeCurrentEbcEncoding = 524811

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: 14.2. CLASS SMARTCARDMBS 427 Current error block control encoding. 0 = longitudinal redundancy check (LRC) 1 = cyclical redundancy check (CRC)

14.2.32 kAttributeCurrentF = 524803

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Clock conversion factor.

14.2.33 kAttributeCurrentIfsc = 524807

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Current byte size for information field size card.

14.2.34 kAttributeCurrentIfsd = 524808

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Current byte size for information field size device.

14.2.35 kAttributeCurrentIoState = 590594

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Current IO state

14.2.36 kAttributeCurrentN = 524805

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Current guard time. 428 CHAPTER 14. SMARTCARD 14.2.37 kAttributeCurrentProtocolType = 524801

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Integer encoded as 0x0rrrpppp where rrr is RFU and should be 0x000. pppp encodes the current protocol type. Whichever bit has been set indicates which ISO protocol is currently in use. (For example, if bit zero is set, T=0 protocol is in effect.)

14.2.38 kAttributeCurrentW = 524806

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Current work waiting time.

14.2.39 kAttributeDefaultClk = 196897

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Default clock rate, in kHz.

14.2.40 kAttributeDefaultDataRate = 196899

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Default data rate, in bps.

14.2.41 kAttributeDeviceFriendlyNameA = 2147418115

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Reader’s display name. Windows ANSI encoding.

14.2.42 kAttributeDeviceFriendlyNameW = 2147418117

Plugin Version: 16.3. 14.2. CLASS SMARTCARDMBS 429 Function: One of the attribute ID constants. Notes: Reader’s display name. Unicode encoding.

14.2.43 kAttributeDeviceInUse = 2147418114

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Reserved for future use.

14.2.44 kAttributeDeviceSystemNameA = 2147418116

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Reader’s system name. Windows ANSI encoding.

14.2.45 kAttributeDeviceSystemNameW = 2147418118

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Reader’s system name. Unicode encoding.

14.2.46 kAttributeDeviceUnit = 2147418113

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Instance of this vendor’s reader attached to the computer. The first instance will be device unit 0, the next will be unit 1 (if it is the same brand of reader) and so on. Two different brands of readers will both have zero for this value.

14.2.47 kAttributeEscAuthrequest = 499717

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Esc authentication request 430 CHAPTER 14. SMARTCARD 14.2.48 kAttributeEscCancel = 499715

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Esc cancel

14.2.49 kAttributeEscReset = 499712

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Esc reset

14.2.50 kAttributeExtendedBwt = 524812

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Extended block wait time.

14.2.51 kAttributeIccInterfaceStatus = 590593

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Single byte. Zero if smart card electrical contact is not active; nonzero if contact is active.

14.2.52 kAttributeIccPresence = 590592

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Single byte indicating smart card presence: 0 = not present 1 = card present but not swallowed (applies only if reader supports smart card swallowing) 2 = card present (and swallowed if reader supports smart card swallowing) 4 = card confiscated. 14.2. CLASS SMARTCARDMBS 431 14.2.53 kAttributeIccTypePerAtr = 590596

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Single byte indicating smart card type. 0 = unknown type 1 = 7816 Asynchronous 2 = 7816 Synchronous Other values RFU.

14.2.54 kAttributeMaxClk = 196898

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Maximum clock rate, in kHz.

14.2.55 kAttributeMaxDataRate = 196900

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Maximum data rate, in bps.

14.2.56 kAttributeMaxIfsd = 196901

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Maximum bytes for information file size device.

14.2.57 kAttributeMaxinput = 499719

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Maximum input 432 CHAPTER 14. SMARTCARD 14.2.58 kAttributePowerMgmtSupport = 262449

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Zero if device does not support power down while smart card is inserted. Nonzero otherwise.

14.2.59 kAttributeProtocolTypes = 196896

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Integer encoded as 0x0rrrpppp where rrr is RFU and should be 0x000. pppp encodes the supported protocol types. A ’1’ in a given bit position indicates support for the associated ISO protocol, so if bits zero and one are set, both T=0 and T=1 protocols are supported.

14.2.60 kAttributeSupressT1IfsRequest = 2147418119

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Supress T1 information file size request.

14.2.61 kAttributeUserAuthInputDevice = 328002

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: User authentication input device.

14.2.62 kAttributeUserToCardAuthDevice = 328000

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: User to card authentication device 14.2. CLASS SMARTCARDMBS 433 14.2.63 kAttributeVendorIfdSerialNo = 65795

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Vendor-supplied interface device serial number.

14.2.64 kAttributeVendorIfdType = 65793

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Vendor-supplied interface device type (model designation of reader).

14.2.65 kAttributeVendorIfdVersion = 65794

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Vendor-supplied interface device version (DWORD in the form 0xMMmmbbbb where MM = major version, mm = minor version, and bbbb = build number).

14.2.66 kAttributeVendorName = 65792

Plugin Version: 16.3. Function: One of the attribute ID constants. Notes: Vendor name.

14.2.67 kCardStateAbsent = 2

Plugin Version: 16.3. Function: One of the card state constants. Notes: There is no card in the reader.

14.2.68 kCardStateNegotiable = 32

Plugin Version: 16.3. 434 CHAPTER 14. SMARTCARD Function: One of the card state constants. Notes: The card has been reset and is awaiting PTS negotiation.

14.2.69 kCardStatePowered = 16

Plugin Version: 16.3. Function: One of the card state constants. Notes: Power is being provided to the card, but the reader driver is unaware of the mode of the card.

14.2.70 kCardStatePresent = 4

Plugin Version: 16.3. Function: One of the card state constants. Notes: There is a card in the reader, but it has not been moved into position for use.

14.2.71 kCardStateSpecific = 64

Plugin Version: 16.3. Function: One of the card state constants. Notes: The card has been reset and specific communication protocols have been established.

14.2.72 kCardStateSwallowed = 8

Plugin Version: 16.3. Function: One of the card state constants. Notes: There is a card in the reader in position for use. The card is not powered.

14.2.73 kCardStateUnknown = 1

Plugin Version: 16.3. Function: One of the card state constants. Notes: Unknown state. 14.2. CLASS SMARTCARDMBS 435 14.2.74 kEjectCard = 3

Plugin Version: 16.3. Function: One of the card initialization modes. Notes: Eject card.

14.2.75 kLeaveCard = 0

Plugin Version: 16.3. Function: One of the card initialization modes. Notes: Do not do anything special on reconnect.

14.2.76 kProtocolAny = 3

Plugin Version: 16.3. Function: One of the protocol constants. Notes: Any protocol is welcome

14.2.77 kProtocolRAW = 4

Plugin Version: 16.3. Function: One of the protocol constants. Notes: Raw protocol

14.2.78 kProtocolT0 = 1

Plugin Version: 16.3. Function: One of the protocol constants. Notes: T=0 is the active protocol.

14.2.79 kProtocolT1 = 2

Plugin Version: 16.3. 436 CHAPTER 14. SMARTCARD Function: One of the protocol constants. Notes: T=1 is the active protocol.

14.2.80 kProtocolT15 = 8

Plugin Version: 16.3. Function: One of the protocol constants. Notes: T=15 protocol (not on Windows)

14.2.81 kProtocolUndefined = 0

Plugin Version: 16.3. Function: One of the protocol constants. Notes: kShareDirect has been specified, so that no protocol negotiation has occurred. It is possible that there is no card in the reader.

14.2.82 kProtocolUnset = 0

Plugin Version: 16.3. Function: One of the protocol constants. Notes: Unset

14.2.83 kResetCard = 1

Plugin Version: 16.3. Function: One of the card initialization modes. Notes: Reset the card (Warm Reset).

14.2.84 kShareDirect = 3

Plugin Version: 16.3. Function: One of the flags that indicates whether other applications may form connections to thecard. Notes: This application is allocating the reader for its private use, and will be controlling it directly. No other applications are allowed access to it. 14.2. CLASS SMARTCARDMBS 437 14.2.85 kShareExclusive = 1

Plugin Version: 16.3. Function: One of the flags that indicates whether other applications may form connections to thecard. Notes: This application is not willing to share the card with other applications.

14.2.86 kShareShared = 2

Plugin Version: 16.3. Function: One of the flags that indicates whether other applications may form connections to thecard. Notes: This application is willing to share the card with other applications.

14.2.87 kUnpowerCard = 2

Plugin Version: 16.3. Function: One of the card initialization modes. Notes: Power down the card and reset it (Cold Reset). 438 CHAPTER 14. SMARTCARD Chapter 15

String

15.1 class TextConverterMBS

15.1.1 class TextConverterMBS

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The class for converting text from one text encoding to other one. Example: dim s as string = ”Hello äöü” dim c as new TextConverterMBS c.Input = s c.InputEncoding = ”UTF-8” c.OutputEncoding = ”WINDOWS-1252” c.Convert dim output as string = c.Output

Break // see in debugger

Notes: Wraps iconv library.

Encoding list with alternative names:

439 440 CHAPTER 15. STRING • ANSI_X3.4-1968,ANSI_X3.4-1986,ASCII,CP367,IBM367,ISO-IR-6,ISO646-US,ISO_646.IRV:1991,US,US- ASCII,CSASCII

• UTF-8

• ISO-10646-UCS-2,UCS-2,CSUNICODE

• UCS-2BE,UNICODE-1-1,UNICODEBIG,CSUNICODE11

• UCS-2LE,UNICODELITTLE

• ISO-10646-UCS-4,UCS-4,CSUCS4

• UCS-4BE

• UCS-4LE

• UTF-16

• UTF-16BE

• UTF-16LE

• UTF-32

• UTF-32BE

• UTF-32LE

• UNICODE-1-1-UTF-7,UTF-7,CSUNICODE11UTF7

• UCS-2-INTERNAL

• UCS-2-SWAPPED

• UCS-4-INTERNAL

• UCS-4-SWAPPED

• C99

• JAVA

• CP819,IBM819,ISO-8859-1,ISO-IR-100,ISO8859-1,ISO_8859-1,ISO_8859-1:1987,L1,LATIN1,CSISOLATIN1

• ISO-8859-2,ISO-IR-101,ISO8859-2,ISO_8859-2,ISO_8859-2:1987,L2,LATIN2,CSISOLATIN2

• ISO-8859-3,ISO-IR-109,ISO8859-3,ISO_8859-3,ISO_8859-3:1988,L3,LATIN3,CSISOLATIN3

• ISO-8859-4,ISO-IR-110,ISO8859-4,ISO_8859-4,ISO_8859-4:1988,L4,LATIN4,CSISOLATIN4

• CYRILLIC,ISO-8859-5,ISO-IR-144,ISO8859-5,ISO_8859-5,ISO_8859-5:1988,CSISOLATINCYRILLIC

• ARABIC,ASMO-708,ECMA-114,ISO-8859-6,ISO-IR-127,ISO8859-6,ISO_8859-6,ISO_8859-6:1987,CSISOLATINARABIC

• ECMA-118,ELOT_928,GREEK,GREEK8,ISO-8859-7,ISO-IR-126,ISO8859-7,ISO_8859-7,ISO_8859-7:1987,ISO_8859- 7:2003,CSISOLATINGREEK 15.1. CLASS TEXTCONVERTERMBS 441 • HEBREW,ISO-8859-8,ISO-IR-138,ISO8859-8,ISO_8859-8,ISO_8859-8:1988,CSISOLATINHEBREW

• ISO-8859-9,ISO-IR-148,ISO8859-9,ISO_8859-9,ISO_8859-9:1989,L5,LATIN5,CSISOLATIN5

• ISO-8859-10,ISO-IR-157,ISO8859-10,ISO_8859-10,ISO_8859-10:1992,L6,LATIN6,CSISOLATIN6

• ISO-8859-11,ISO8859-11,ISO_8859-11

• ISO-8859-13,ISO-IR-179,ISO8859-13,ISO_8859-13,L7,LATIN7

• ISO-8859-14,ISO-CELTIC,ISO-IR-199,ISO8859-14,ISO_8859-14,ISO_8859-14:1998,L8,LATIN8

• ISO-8859-15,ISO-IR-203,ISO8859-15,ISO_8859-15,ISO_8859-15:1998,LATIN-9

• ISO-8859-16,ISO-IR-226,ISO8859-16,ISO_8859-16,ISO_8859-16:2001,L10,LATIN10

• KOI8-R,CSKOI8R

• KOI8-U

• KOI8-RU

• CP1250,MS-EE,WINDOWS-1250

• CP1251,MS-CYRL,WINDOWS-1251

• CP1252,MS-ANSI,WINDOWS-1252

• CP1253,MS-GREEK,WINDOWS-1253

• CP1254,MS-TURK,WINDOWS-1254

• CP1255,MS-HEBR,WINDOWS-1255

• CP1256,MS-ARAB,WINDOWS-1256

• CP1257,WINBALTRIM,WINDOWS-1257

• CP1258,WINDOWS-1258

• 850,CP850,IBM850,CSPC850MULTILINGUAL

• 862,CP862,IBM862,CSPC862LATINHEBREW

• 866,CP866,IBM866,CSIBM866

• CP1131

• MAC,MACINTOSH,MACROMAN,CSMACINTOSH

• MACCENTRALEUROPE

• MACICELAND

• MACCROATIAN

• MACROMANIA 442 CHAPTER 15. STRING • MACCYRILLIC

• MACUKRAINE

• MACGREEK

• MACTURKISH

• MACHEBREW

• MACARABIC

• MACTHAI

• HP-ROMAN8,R8,ROMAN8,CSHPROMAN8

• NEXTSTEP

• ARMSCII-8

• GEORGIAN-ACADEMY

• GEORGIAN-PS

• KOI8-T

• CP154,CYRILLIC-ASIAN,PT154,PTCP154,CSPTCP154

• KZ-1048,RK1048,STRK1048-2002,CSKZ1048

• MULELAO-1

• CP1133,IBM-CP1133

• ISO-IR-166,TIS-620,TIS620,TIS620-0,TIS620.2529-1,TIS620.2533-0,TIS620.2533-1

• CP874,WINDOWS-874

• VISCII,VISCII1.1-1,CSVISCII

• TCVN,TCVN-5712,TCVN5712-1,TCVN5712-1:1993

• ISO-IR-14,ISO646-JP,JIS_C6220-1969-RO,JP,CSISO14JISC6220RO

• JISX0201-1976,JIS_X0201,X0201,CSHALFWIDTHKATAKANA

• ISO-IR-87,JIS0208,JIS_C6226-1983,JIS_X0208,JIS_X0208-1983,JIS_X0208-1990,X0208,CSISO87JISX0208

• ISO-IR-159,JIS_X0212,JIS_X0212-1990,JIS_X0212.1990-0,X0212,CSISO159JISX02121990

• CN,GB_1988-80,ISO-IR-57,ISO646-CN,CSISO57GB1988

• CHINESE,GB_2312-80,ISO-IR-58,CSISO58GB231280

• CN-GB-ISOIR165,ISO-IR-165

• ISO-IR-149,KOREAN,KSC_5601,KS_C_5601-1987,KS_C_5601-1989,CSKSC56011987 15.1. CLASS TEXTCONVERTERMBS 443 • EUC-JP,EUCJP,EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE,CSEUCPKDFMTJAPANESE

• MS_KANJI,SHIFT-JIS,SHIFT_JIS,SJIS,CSSHIFTJIS

• CP932

• ISO-2022-JP,CSISO2022JP

• ISO-2022-JP-1

• ISO-2022-JP-2,CSISO2022JP2

• CP50221,ISO-2022-JP-MS

• CN-GB,EUC-CN,EUCCN,GB2312,CSGB2312

• GBK

• CP936,MS936,WINDOWS-936

• GB18030

• ISO-2022-CN,CSISO2022CN

• ISO-2022-CN-EXT

• HZ,HZ-GB-2312

• EUC-TW,EUCTW,CSEUCTW

• BIG-5,BIG-FIVE,BIG5,BIGFIVE,CN-BIG5,CSBIG5

• CP950

• BIG5-HKSCS:1999

• BIG5-HKSCS:2001

• BIG5-HKSCS:2004

• BIG5-HKSCS,BIG5-HKSCS:2008,BIG5HKSCS

• EUC-KR,EUCKR,CSEUCKR

• CP949,UHC

• CP1361,JOHAB

• ISO-2022-KR,CSISO2022KR

• CP856

• CP922

• CP943

• CP1046 444 CHAPTER 15. STRING • CP1124

• CP1129

• CP1161,IBM-1161,IBM1161,CSIBM1161

• CP1162,IBM-1162,IBM1162,CSIBM1162

• CP1163,IBM-1163,IBM1163,CSIBM1163

• DEC-KANJI

• DEC-HANYU

• 437,CP437,IBM437,CSPC8CODEPAGE437

• CP737

• CP775,IBM775,CSPC775BALTIC

• 852,CP852,IBM852,CSPCP852

• CP853

• 855,CP855,IBM855,CSIBM855

• 857,CP857,IBM857,CSIBM857

• CP858

• 860,CP860,IBM860,CSIBM860

• 861,CP-IS,CP861,IBM861,CSIBM861

• 863,CP863,IBM863,CSIBM863

• CP864,IBM864,CSIBM864

• 865,CP865,IBM865,CSIBM865

• 869,CP-GR,CP869,IBM869,CSIBM869

• CP1125

• EUC-JIS-2004,EUC-JISX0213

• SHIFT_JIS-2004,SHIFT_JISX0213

• ISO-2022-JP-2004,ISO-2022-JP-3

• BIG5-2003

• ISO-IR-230,TDS565

• ATARI,ATARIST

• RISCOS-LATIN1 15.1. CLASS TEXTCONVERTERMBS 445 15.1.2 Blog Entries

• MBS Xojo Plugins, version 20.4pr9

• MonkeyBread Software Releases the MBS Xojo Plugins in version 19.4

• MonkeyBread Software Releases the MBS Xojo Plugins in version 19.1

• MBS Xojo Plugins, version 19.1pr3

15.1.3 Videos

• Presentation from Xojo Developer Conference 2019 in Miami.

15.1.4 Xojo Developer Magazine

• 17.5, page 11: News

• 17.3, page 37: Coding in Paradise, Co-Working for Programmers by Glen Newbury

15.1.5 Blog Entries

• MBS Xojo Plugins, version 20.4pr9

• MonkeyBread Software Releases the MBS Xojo Plugins in version 19.4

• MonkeyBread Software Releases the MBS Xojo Plugins in version 19.1

• MBS Xojo Plugins, version 19.1pr3

15.1.6 Xojo Developer Magazine

• 17.5, page 11: News

• 17.3, page 37: Coding in Paradise, Co-Working for Programmers by Glen Newbury

15.1.7 Videos

• Presentation from Xojo Developer Conference 2019 in Miami. 446 CHAPTER 15. STRING 15.1.8 Methods

15.1.9 Canonicalize(name as String) as String

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Canonicalize an encoding name. Example: MsgBox TextConverterMBS.Canonicalize(”utf-8”) MsgBox TextConverterMBS.Canonicalize(”Latin1”)

Notes: The result is either a canonical encoding name, or name itself.

15.1.10 Constructor

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The constructor. Notes: Currently enables translit and ignore by default.

15.1.11 Convert

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Converts text. Example: dim s as string = ”Hello äöü” dim c as new TextConverterMBS c.Input = s c.InputEncoding = ”UTF-8” c.OutputEncoding = ”WINDOWS-1252” c.Convert dim output as string = c.Output

Break // see in debugger

Notes: 15.1. CLASS TEXTCONVERTERMBS 447 Input is read from either Input or InputData properties. ErrorCode and ErrorMessage are set. Output is set with output data.

15.1.12 EncodingNames(Mode as Integer = 0) as String()

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries names of text encodings. Example: MsgBox Join(TextConverterMBS.EncodingNames(1),EndOfLine)

Notes: Mode 0 returns list of text encoding names. Mode 1 returns list of text encoding names and alternative names separated by comma. Mode 2 returns list of text encoding names and alternative names. e.g. ”CP1252,MS-ANSI,WINDOWS-1252” in the list for mode 1.

15.1.13 LoadIconvLibrary(path as String, byref Error as String) as boolean

Plugin Version: 20.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Loads the iconv library. Notes: The TextConverterMBS class uses libiconv for text encoding conversion. If you explicitly need, you can load the library on start of solution.

MBS Plugin may try to load iconv.dll/dylib/so automatically when first iconv function is called.

15.1.14 Properties

15.1.15 ErrorCode as Integer

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Last error code from Convert method. Notes: (Read and Write property) 448 CHAPTER 15. STRING

15.1.16 ErrorMessage as String

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Text message for error. Notes: (Read and Write property)

15.1.17 Ignore as Boolean

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether to ignore errors. Notes: Characters that cannot be represented in the target character set will be silently discarded. (Read and Write property)

15.1.18 Input as String

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Input text string. Notes: (Read and Write property)

15.1.19 InputData as MemoryBlock

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Input as memoryblock. Notes: (Read and Write property)

15.1.20 InputEncoding as String

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Name of input encoding. Notes: 15.1. CLASS TEXTCONVERTERMBS 449 e.g. ”UTF-8” (Read and Write property)

15.1.21 InputPosition as Integer

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The input position on the end of convert. Notes: If errors are not ignored, this shows error position. (Read and Write property)

15.1.22 LibVersion as Integer

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The library version for iconv. Notes: Returns major * 256 + minor, e.g. & h10B for 1.11. (Read only property)

15.1.23 Output as String

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The output text. Notes: String may not have an encoding set, if the plugin does not recognize the encoding. But for e.g. UTF-8, we set the text encoding. (Read and Write property)

15.1.24 OutputEncoding as String

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Name of output encoding. Notes: e.g. ”UTF-8” (Read and Write property) 450 CHAPTER 15. STRING

15.1.25 OutputLength as Integer

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The length of the output in bytes. Notes: (Read and Write property)

15.1.26 Translit as Boolean

Plugin Version: 19.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether to activate transliteration. Notes: This means that when a character cannot be represented in the target character set, it can be approximated through one or several characters that look similar to the original character. (Read and Write property) Chapter 16

Tidy

16.1 class TidyAttributeMBS

16.1.1 class TidyAttributeMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: An attribute of a node.

16.1.2 Blog Entries

• MBS Xojo Plugins, version 17.4pr3

• MBS REALbasic Plugins, version 10.5pr4

16.1.3 Blog Entries

• MBS Xojo Plugins, version 17.4pr3

• MBS REALbasic Plugins, version 10.5pr4

16.1.4 Properties

16.1.5 Document as TidyDocumentMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All.

451 452 CHAPTER 16. TIDY Function: The document of this attribute. Notes: (Read only property)

16.1.6 ID as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The attribute ID. Notes: (Read only property)

16.1.7 IsABBR as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the ABBR attribute. Notes: (Read only property)

16.1.8 IsALINK as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the ALINK attribute. Notes: (Read only property)

16.1.9 IsALT as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the ALT attribute. Notes: (Read only property)

16.1.10 IsBGCOLOR as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the BGCOLOR attribute. Notes: (Read only property) 16.1. CLASS TIDYATTRIBUTEMBS 453 16.1.11 IsCHECKED as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the CHECKED attribute. Notes: (Read only property)

16.1.12 IsCOLSPAN as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the COLSPAN attribute. Notes: (Read only property)

16.1.13 IsCONTENT as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the CONTENT attribute. Notes: (Read only property)

16.1.14 IsDATAFLD as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the DATAFLD attribute. Notes: (Read only property)

16.1.15 IsEvent as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the Event attribute. Notes: (Read only property)

16.1.16 IsFOR as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 454 CHAPTER 16. TIDY Function: Whether this attribute is the FOR attribute. Notes: (Read only property)

16.1.17 IsHEIGHT as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the HEIGHT attribute. Notes: (Read only property)

16.1.18 IsHREF as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the HREF attribute. Notes: (Read only property)

16.1.19 IsHTTP_EQUIV as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the HTTP_EQUIV attribute. Notes: (Read only property)

16.1.20 IsID as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the ID attribute. Notes: (Read only property)

16.1.21 IsISMAP as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the ISMAP attribute. Notes: (Read only property) 16.1. CLASS TIDYATTRIBUTEMBS 455 16.1.22 IsLANG as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the LANG attribute. Notes: (Read only property)

16.1.23 IsLANGUAGE as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the LANGUAGE attribute. Notes: (Read only property)

16.1.24 IsLINK as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the LINK attribute. Notes: (Read only property)

16.1.25 IsLONGDESC as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the LONGDESC attribute. Notes: (Read only property)

16.1.26 IsNAME as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the NAME attribute. Notes: (Read only property)

16.1.27 IsOnBLUR as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 456 CHAPTER 16. TIDY Function: Whether this attribute is the OnBLUR attribute. Notes: (Read only property)

16.1.28 IsOnCLICK as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnCLICK attribute. Notes: (Read only property)

16.1.29 IsOnFOCUS as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnFOCUS attribute. Notes: (Read only property)

16.1.30 IsOnKEYDOWN as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnKEYDOWN attribute. Notes: (Read only property)

16.1.31 IsOnKEYPRESS as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnKEYPRESS attribute. Notes: (Read only property)

16.1.32 IsOnKEYUP as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnKEYUP attribute. Notes: (Read only property) 16.1. CLASS TIDYATTRIBUTEMBS 457 16.1.33 IsOnMOUSEDOWN as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnMOUSEDOWN attribute. Notes: (Read only property)

16.1.34 IsOnMOUSEMOVE as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnMOUSEMOVE attribute. Notes: (Read only property)

16.1.35 IsOnMOUSEOUT as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnMOUSEOUT attribute. Notes: (Read only property)

16.1.36 IsOnMOUSEOVER as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnMOUSEOVER attribute. Notes: (Read only property)

16.1.37 IsOnMOUSEUP as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the OnMOUSEUP attribute. Notes: (Read only property)

16.1.38 IsProp as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 458 CHAPTER 16. TIDY Function: Whether this attribute is the Prop attribute. Notes: (Read only property)

16.1.39 IsREL as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the REL attribute. Notes: (Read only property)

16.1.40 IsROWSPAN as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the ROWSPAN attribute. Notes: (Read only property)

16.1.41 IsSELECTED as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the SELECTED attribute. Notes: (Read only property)

16.1.42 IsSRC as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the SRC attribute. Notes: (Read only property)

16.1.43 IsSTYLE as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the STYLE attribute. Notes: (Read only property) 16.1. CLASS TIDYATTRIBUTEMBS 459 16.1.44 IsSUMMARY as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the SUMMARY attribute. Notes: (Read only property)

16.1.45 IsTARGET as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the TARGET attribute. Notes: (Read only property)

16.1.46 IsTEXT as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the TEXT attribute. Notes: (Read only property)

16.1.47 IsTITLE as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the TITLE attribute. Notes: (Read only property)

16.1.48 IsTYPE as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the TYPE attribute. Notes: (Read only property)

16.1.49 IsUSEMAP as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 460 CHAPTER 16. TIDY Function: Whether this attribute is the USEMAP attribute. Notes: (Read only property)

16.1.50 IsVALUE as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the VALUE attribute. Notes: (Read only property)

16.1.51 IsVLINK as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the VLINK attribute. Notes: (Read only property)

16.1.52 IsWIDTH as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the WIDTH attribute. Notes: (Read only property)

16.1.53 IsXMLNS as Boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether this attribute is the XMLNS attribute. Notes: (Read only property)

16.1.54 Name as string

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The name of the attribute. Notes: (Read only property) 16.1. CLASS TIDYATTRIBUTEMBS 461 16.1.55 NextAttribute as TidyAttributeMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The next attribute in the attribute list of the node. Notes: (Read only property)

16.1.56 Value as string

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The value of the attribute. Notes: (Read only property) 462 CHAPTER 16. TIDY 16.2 module TidyAttrIdMBS

16.2.1 module TidyAttrIdMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: A module with constants for use with the Tidy classes.

16.2.2 Constants

16.2.3 TidyAttrABBR=1

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.2.4 TidyAttrABOUT=315

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.5 TidyAttrACCEPT=2

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.2.6 TidyAttrACCEPT_CHARSET=3

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.2.7 TidyAttrACCESSKEY=4

Plugin Version: 5.4. 16.2. MODULE TIDYATTRIDMBS 463 Function: A constant for use with the Tidy classes.

16.2.8 TidyAttrACTION=5

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.2.9 TidyAttrADD_DATE=6

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.2.10 TidyAttrALIGN=7

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.2.11 TidyAttrALINK=8

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.2.12 TidyAttrALLOWFULLSCREEN=9

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.13 TidyAttrALT=10

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 464 CHAPTER 16. TIDY 16.2.14 TidyAttrARCHIVE=11

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.15 TidyAttrARIA_ACTIVEDESCENDANT=271

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.16 TidyAttrARIA_ATOMIC=272

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.17 TidyAttrARIA_AUTOCOMPLETE=273

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.18 TidyAttrARIA_BUSY=274

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.19 TidyAttrARIA_CHECKED=275

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 465 16.2.20 TidyAttrARIA_CONTROLS=276

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.21 TidyAttrARIA_DESCRIBEDBY=277

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.22 TidyAttrARIA_DISABLED=278

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.23 TidyAttrARIA_DROPEFFECT=279

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.24 TidyAttrARIA_EXPANDED=280

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.25 TidyAttrARIA_FLOWTO=281

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 466 CHAPTER 16. TIDY 16.2.26 TidyAttrARIA_GRABBED=282

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.27 TidyAttrARIA_HASPOPUP=283

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.28 TidyAttrARIA_HIDDEN=284

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.29 TidyAttrARIA_INVALID=285

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.30 TidyAttrARIA_LABEL=286

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.31 TidyAttrARIA_LABELLEDBY=287

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 467 16.2.32 TidyAttrARIA_LEVEL=288

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.33 TidyAttrARIA_LIVE=289

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.34 TidyAttrARIA_MULTILINE=290

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.35 TidyAttrARIA_MULTISELECTABLE=291

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.36 TidyAttrARIA_ORIENTATION=292

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.37 TidyAttrARIA_OWNS=293

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 468 CHAPTER 16. TIDY 16.2.38 TidyAttrARIA_POSINSET=294

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.39 TidyAttrARIA_PRESSED=295

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.40 TidyAttrARIA_READONLY=296

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.41 TidyAttrARIA_RELEVANT=297

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.42 TidyAttrARIA_REQUIRED=298

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.43 TidyAttrARIA_SELECTED=299

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 469 16.2.44 TidyAttrARIA_SETSIZE=300

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.45 TidyAttrARIA_SORT=301

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.46 TidyAttrARIA_VALUEMAX=302

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.47 TidyAttrARIA_VALUEMIN=303

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.48 TidyAttrARIA_VALUENOW=304

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.49 TidyAttrARIA_VALUETEXT=305

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 470 CHAPTER 16. TIDY 16.2.50 TidyAttrAS=324

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.51 TidyAttrASYNC=171

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.52 TidyAttrAUTOCOMPLETE=172

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.53 TidyAttrAUTOFOCUS=173

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.54 TidyAttrAUTOPLAY=174

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.55 TidyAttrAXIS=12

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 471 16.2.56 TidyAttrBACKGROUND=13

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.57 TidyAttrBASEPROFILE=311

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.58 TidyAttrBGCOLOR=14

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.59 TidyAttrBGPROPERTIES=15

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.60 TidyAttrBORDER=16

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.61 TidyAttrBORDERCOLOR=17

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 472 CHAPTER 16. TIDY 16.2.62 TidyAttrBOTTOMMARGIN=18

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.63 TidyAttrCELLPADDING=19

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.64 TidyAttrCELLSPACING=20

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.65 TidyAttrCHALLENGE=175

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.66 TidyAttrCHAR=21

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.67 TidyAttrCHAROFF=22

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 473 16.2.68 TidyAttrCHARSET=23

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.69 TidyAttrCHECKED=24

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.70 TidyAttrCITE=25

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.71 TidyAttrCLASS=26

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.72 TidyAttrCLASSID=27

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.73 TidyAttrCLEAR=28

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 474 CHAPTER 16. TIDY 16.2.74 TidyAttrCODE=29

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.75 TidyAttrCODEBASE=30

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.76 TidyAttrCODETYPE=31

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.77 TidyAttrCOLOR=32

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.78 TidyAttrCOLS=33

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.79 TidyAttrCOLSPAN=34

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 475 16.2.80 TidyAttrCOMPACT=35

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.81 TidyAttrCONTENT=36

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.82 TidyAttrCONTENTEDITABLE=176

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.83 TidyAttrCONTENTSCRIPTTYPE=312

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.84 TidyAttrCONTENTSTYLETYPE=313

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.85 TidyAttrCONTEXTMENU=177

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 476 CHAPTER 16. TIDY 16.2.86 TidyAttrCONTROLS=178

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.87 TidyAttrCOORDS=37

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.88 TidyAttrCROSSORIGIN=179

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.89 TidyAttrDATA=38

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.90 TidyAttrDATAFLD=39

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.91 TidyAttrDATAFORMATAS=40

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 477 16.2.92 TidyAttrDATAPAGESIZE=41

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.93 TidyAttrDATASRC=42

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.94 TidyAttrDATATYPE=316

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.95 TidyAttrDATETIME=43

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.96 TidyAttrDECLARE=44

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.97 TidyAttrDEFAULT=180

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 478 CHAPTER 16. TIDY 16.2.98 TidyAttrDEFER=45

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.99 TidyAttrDIR=46

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.100 TidyAttrDIRNAME=181

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.101 TidyAttrDISABLED=47

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.102 TidyAttrDISPLAY=314

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 479 16.2.103 TidyAttrDRAGGABLE=182

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.104 TidyAttrDROPZONE=183

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.105 TidyAttrENCODING=48

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.106 TidyAttrENCTYPE=49

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.107 TidyAttrEVENT=164

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.108 TidyAttrFACE=50

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 480 CHAPTER 16. TIDY 16.2.109 TidyAttrFOR=51

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.110 TidyAttrFORM=184

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.111 TidyAttrFORMACTION=185

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.112 TidyAttrFORMENCTYPE=186

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.113 TidyAttrFORMMETHOD=187

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.114 TidyAttrFORMNOVALIDATE=188

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 481 16.2.115 TidyAttrFORMTARGET=189

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.116 TidyAttrFRAME=52

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.117 TidyAttrFRAMEBORDER=53

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.118 TidyAttrFRAMESPACING=54

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.119 TidyAttrGRIDX=55

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.120 TidyAttrGRIDY=56

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 482 CHAPTER 16. TIDY 16.2.121 TidyAttrHEADERS=57

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.122 TidyAttrHEIGHT=58

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.123 TidyAttrHIDDEN=190

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.124 TidyAttrHIGH=191

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.125 TidyAttrHREF=59

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.126 TidyAttrHREFLANG=60

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 483 16.2.127 TidyAttrHSPACE=61

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.128 TidyAttrHTTP_EQUIV=62

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.129 TidyAttrICON=192

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.130 TidyAttrID=63

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.131 TidyAttrINLIST=317

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.132 TidyAttrINTEGRITY=323

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 484 CHAPTER 16. TIDY 16.2.133 TidyAttrISMAP=64

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.134 TidyAttrITEMID=65

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.135 TidyAttrITEMPROP=66

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.136 TidyAttrITEMREF=67

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.137 TidyAttrITEMSCOPE=68

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.138 TidyAttrITEMTYPE=69

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 485 16.2.139 TidyAttrKEYTYPE=193

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.140 TidyAttrKIND=194

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.141 TidyAttrLABEL=70

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.142 TidyAttrLANG=71

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.143 TidyAttrLANGUAGE=72

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.144 TidyAttrLAST_MODIFIED=73

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 486 CHAPTER 16. TIDY 16.2.145 TidyAttrLAST_VISIT=74

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.146 TidyAttrLEFTMARGIN=75

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.147 TidyAttrLINK=76

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.148 TidyAttrLIST=195

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.149 TidyAttrLONGDESC=77

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.150 TidyAttrLOOP=196

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 487 16.2.151 TidyAttrLOW=197

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.152 TidyAttrLOWSRC=78

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.153 TidyAttrMANIFEST=198

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.154 TidyAttrMARGINHEIGHT=79

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.155 TidyAttrMARGINWIDTH=80

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.156 TidyAttrMAX=199

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 488 CHAPTER 16. TIDY 16.2.157 TidyAttrMAXLENGTH=81

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.158 TidyAttrMEDIA=82

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.159 TidyAttrMEDIAGROUP=200

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.160 TidyAttrMETHOD=83

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.161 TidyAttrMETHODS=165

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.162 TidyAttrMIN=201

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 489 16.2.163 TidyAttrMULTIPLE=84

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.164 TidyAttrN=166

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.165 TidyAttrNAME=85

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.166 TidyAttrNOHREF=86

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.167 TidyAttrNORESIZE=87

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.168 TidyAttrNOSHADE=88

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 490 CHAPTER 16. TIDY 16.2.169 TidyAttrNOVALIDATE=202

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.170 TidyAttrNOWRAP=89

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.171 TidyAttrOBJECT=90

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.172 TidyAttrOnABORT=205

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.173 TidyAttrOnAFTERPRINT=206

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.174 TidyAttrOnAFTERUPDATE=91

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 491 16.2.175 TidyAttrOnBEFOREPRINT=207

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.176 TidyAttrOnBEFOREUNLOAD=92

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.177 TidyAttrOnBEFOREUPDATE=93

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.178 TidyAttrOnBLUR=94

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.179 TidyAttrOnCANPLAY=208

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.180 TidyAttrOnCANPLAYTHROUGH=209

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 492 CHAPTER 16. TIDY 16.2.181 TidyAttrOnCHANGE=95

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.182 TidyAttrOnCLICK=96

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.183 TidyAttrOnCONTEXTMENU=210

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.184 TidyAttrOnCUECHANGE=211

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.185 TidyAttrOnDATAAVAILABLE=97

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.186 TidyAttrOnDATASETCHANGED=98

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 493 16.2.187 TidyAttrOnDATASETCOMPLETE=99

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.188 TidyAttrOnDBLCLICK=100

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.189 TidyAttrOnDRAG=212

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.190 TidyAttrOnDRAGEND=213

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.191 TidyAttrOnDRAGENTER=214

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.192 TidyAttrOnDRAGLEAVE=215

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 494 CHAPTER 16. TIDY 16.2.193 TidyAttrOnDRAGOVER=216

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.194 TidyAttrOnDRAGSTART=217

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.195 TidyAttrOnDROP=218

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.196 TidyAttrOnDURATIONCHANGE=219

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.197 TidyAttrOnEMPTIED=220

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.198 TidyAttrOnENDED=221

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 495 16.2.199 TidyAttrOnERROR=222

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.200 TidyAttrOnERRORUPDATE=101

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.201 TidyAttrOnFOCUS=102

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.202 TidyAttrOnHASHCHANGE=223

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.203 TidyAttrOnINPUT=224

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.204 TidyAttrOnINVALID=225

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 496 CHAPTER 16. TIDY 16.2.205 TidyAttrOnKEYDOWN=103

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.206 TidyAttrOnKEYPRESS=104

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.207 TidyAttrOnKEYUP=105

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.208 TidyAttrOnLOAD=106

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.209 TidyAttrOnLOADEDDATA=226

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.210 TidyAttrOnLOADEDMETADATA=227

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 497 16.2.211 TidyAttrOnLOADSTART=228

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.212 TidyAttrOnMESSAGE=229

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.213 TidyAttrOnMOUSEDOWN=107

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.214 TidyAttrOnMOUSEMOVE=108

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.215 TidyAttrOnMOUSEOUT=109

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.216 TidyAttrOnMOUSEOVER=110

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 498 CHAPTER 16. TIDY 16.2.217 TidyAttrOnMOUSEUP=111

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.218 TidyAttrOnMOUSEWHEEL=230

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.219 TidyAttrOnOFFLINE=231

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.220 TidyAttrOnONLINE=232

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.221 TidyAttrOnPAGEHIDE=233

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.222 TidyAttrOnPAGESHOW=234

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 499 16.2.223 TidyAttrOnPAUSE=235

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.224 TidyAttrOnPLAY=236

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.225 TidyAttrOnPLAYING=237

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.226 TidyAttrOnPOPSTATE=238

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.227 TidyAttrOnPROGRESS=239

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.228 TidyAttrOnRATECHANGE=240

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 500 CHAPTER 16. TIDY 16.2.229 TidyAttrOnREADYSTATECHANGE=241

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.230 TidyAttrOnREDO=242

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.231 TidyAttrOnRESET=112

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.232 TidyAttrOnRESIZE=243

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.233 TidyAttrOnROWENTER=113

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.234 TidyAttrOnROWEXIT=114

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 501 16.2.235 TidyAttrOnSCROLL=244

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.236 TidyAttrOnSEEKED=245

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.237 TidyAttrOnSEEKING=246

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.238 TidyAttrOnSELECT=115

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.239 TidyAttrOnSHOW=247

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.240 TidyAttrOnSTALLED=248

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 502 CHAPTER 16. TIDY 16.2.241 TidyAttrOnSTORAGE=249

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.242 TidyAttrOnSUBMIT=116

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.243 TidyAttrOnSUSPEND=250

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.244 TidyAttrOnTIMEUPDATE=251

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.245 TidyAttrOnUNDO=252

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.246 TidyAttrOnUNLOAD=117

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 503 16.2.247 TidyAttrOnVOLUMECHANGE=253

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.248 TidyAttrOnWAITING=254

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.249 TidyAttrOPEN=203

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.250 TidyAttrOPTIMUM=204

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.251 TidyAttrPATTERN=255

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.252 TidyAttrPLACEHOLDER=256

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 504 CHAPTER 16. TIDY 16.2.253 TidyAttrPOSTER=257

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.254 TidyAttrPREFIX=318

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.255 TidyAttrPRELOAD=258

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.256 TidyAttrPRESERVEASPECTRATIO=309

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.257 TidyAttrPROFILE=118

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.258 TidyAttrPROMPT=119

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 505 16.2.259 TidyAttrPROPERTY=319

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.260 TidyAttrPUBDATE=259

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.261 TidyAttrRADIOGROUP=260

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.262 TidyAttrRBSPAN=120

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.263 TidyAttrREADONLY=121

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.264 TidyAttrREL=122

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 506 CHAPTER 16. TIDY 16.2.265 TidyAttrREQUIRED=261

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.266 TidyAttrRESOURCE=320

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.267 TidyAttrREV=123

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.268 TidyAttrREVERSED=262

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.269 TidyAttrRIGHTMARGIN=124

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.270 TidyAttrROLE=125

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 507 16.2.271 TidyAttrROWS=126

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.272 TidyAttrROWSPAN=127

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.273 TidyAttrRULES=128

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.274 TidyAttrSANDBOX=263

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.275 TidyAttrSCHEME=129

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.276 TidyAttrSCOPE=130

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 508 CHAPTER 16. TIDY 16.2.277 TidyAttrSCOPED=264

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.278 TidyAttrSCROLLING=131

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.279 TidyAttrSDAFORM=167

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.280 TidyAttrSDAPREF=168

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.281 TidyAttrSDASUFF=169

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.282 TidyAttrSEAMLESS=265

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 509 16.2.283 TidyAttrSELECTED=132

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.284 TidyAttrSHAPE=133

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.285 TidyAttrSHOWGRID=134

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.286 TidyAttrSHOWGRIDX=135

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.287 TidyAttrSHOWGRIDY=136

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.288 TidyAttrSIZE=137

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 510 CHAPTER 16. TIDY 16.2.289 TidyAttrSIZES=266

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.290 TidyAttrSPAN=138

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.291 TidyAttrSPELLCHECK=267

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.292 TidyAttrSRC=139

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.293 TidyAttrSRCDOC=268

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.294 TidyAttrSRCLANG=269

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 511 16.2.295 TidyAttrSRCSET=140

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.296 TidyAttrSTANDBY=141

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.297 TidyAttrSTART=142

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.298 TidyAttrSTEP=270

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.299 TidyAttrSTYLE=143

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.300 TidyAttrSUMMARY=144

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 512 CHAPTER 16. TIDY 16.2.301 TidyAttrTABINDEX=145

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.302 TidyAttrTARGET=146

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.303 TidyAttrTEXT=147

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.304 TidyAttrTITLE=148

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.305 TidyAttrTOPMARGIN=149

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.306 TidyAttrTRANSLATE=150

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 513 16.2.307 TidyAttrTYPE=151

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.308 TidyAttrTYPEOF=321

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.309 TidyAttrUNKNOWN=0

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.2.310 TidyAttrURN=170

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.311 TidyAttrUSEMAP=152

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.312 TidyAttrVALIGN=153

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 514 CHAPTER 16. TIDY 16.2.313 TidyAttrVALUE=154

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.314 TidyAttrVALUETYPE=155

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.315 TidyAttrVERSION=156

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.316 TidyAttrVIEWBOX=308

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.317 TidyAttrVLINK=157

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.318 TidyAttrVOCAB=322

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.2. MODULE TIDYATTRIDMBS 515 16.2.319 TidyAttrVSPACE=158

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.320 TidyAttrWIDTH=159

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.321 TidyAttrWRAP=160

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.322 TidyAttrX=306

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.323 TidyAttrXMLNS=163

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.324 TidyAttrXMLNSXLINK=325

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 516 CHAPTER 16. TIDY 16.2.325 TidyAttrXML_LANG=161

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.326 TidyAttrXML_SPACE=162

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.327 TidyAttrY=307

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.2.328 TidyAttrZOOMANDPAN=310

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.3. MODULE TIDYCONFIGCATEGORYMBS 517 16.3 module TidyConfigCategoryMBS

16.3.1 module TidyConfigCategoryMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: A module with constants for use with the Tidy classes.

16.3.2 Constants

16.3.3 TidyDiagnostics=1

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.3.4 TidyEncoding=3

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.3.5 TidyMarkup=0

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.3.6 TidyMiscellaneous=4

Plugin Version: 5.4. Function: A constant for use with the Tidy classes.

16.3.7 TidyPrettyPrint=2

Plugin Version: 5.4. 518 CHAPTER 16. TIDY Function: A constant for use with the Tidy classes. 16.4. MODULE TIDYDOCTYPEMODESMBS 519 16.4 module TidyDoctypeModesMBS

16.4.1 module TidyDoctypeModesMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: A module with constants for use with the Tidy classes.

16.4.2 Constants

16.4.3 TidyDoctypeAuto=2

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.4.4 TidyDoctypeHtml5=0

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.4.5 TidyDoctypeLoose=4

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.4.6 TidyDoctypeOmit=1

Plugin Version: 17.1. Function: A constant for use with the Tidy classes.

16.4.7 TidyDoctypeStrict=3

Plugin Version: 17.1. 520 CHAPTER 16. TIDY Function: A constant for use with the Tidy classes.

16.4.8 TidyDoctypeUser=5

Plugin Version: 17.1. Function: A constant for use with the Tidy classes. 16.5. CLASS TIDYDOCUMENTMBS 521 16.5 class TidyDocumentMBS

16.5.1 class TidyDocumentMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: A document in the tidy library. Example: dim t as new TidyDocumentMBS call t.ParseString(”

Hello World

”) // pass here bad html call t.CleanAndRepair dim s As String=t.SaveString MsgBox s // show fixed html

Notes: The main class for using the tidy library in Xojo.

16.5.2 Blog Entries

• MBS Xojo Plugins, version 19.4pr2 • MBS Xojo Plugins, version 17.2pr2

16.5.3 Blog Entries

• MBS Xojo Plugins, version 19.4pr2 • MBS Xojo Plugins, version 17.2pr2

16.5.4 Methods

16.5.5 AccessWarningCount as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Number of Tidy accessibility warnings encountered.

16.5.6 Body as TidyNodeMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 522 CHAPTER 16. TIDY Function: The body node in the html tree.

16.5.7 CleanAndRepair as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Execute configured cleanup and repair operations on parsed markup. Example: dim t as new TidyDocumentMBS

call t.ParseString(”

Hello World

”) // pass here bad html call t.CleanAndRepair dim s As String=t.SaveString MsgBox s // show fixed html

16.5.8 ConfigErrorCount as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Number of Tidy configuration errors encountered.

16.5.9 CopyConfig(otherDocument as TidyDocumentMBS) as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Copy current configuration settings from one document to another.

16.5.10 DetectedGenericXml as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Input is generic XML (not HTML or XHTML)?

16.5.11 DetectedHtmlVersion as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 16.5. CLASS TIDYDOCUMENTMBS 523 Function: Detected HTML version: 0, 2, 3 or 4.

16.5.12 DetectedXhtml as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Input is XHTML?

16.5.13 ErrorBuffer as string

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Copies the error text save in the error buffer. Notes: You need to use InstallErrorBuffer before using this function.

16.5.14 ErrorCount as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Number of Tidy errors encountered. Notes: If >0, output is suppressed unless ForceOutput is set.

16.5.15 ErrorSummary

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Write more complete information about errors to current error sink.

16.5.16 FileExists(filename as string) as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Whether the file with that name exists.

16.5.17 GeneralInfo

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 524 CHAPTER 16. TIDY Function: Write more general information about markup to current error sink.

16.5.18 GetBooleanOption(OptionID as Integer) as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries the value of a boolean option.

16.5.19 GetIntegerOption(OptionID as Integer) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries the value of an integer option.

16.5.20 GetStringOption(OptionID as Integer) as string

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Queries the value of a string option.

16.5.21 Head as TidyNodeMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The head node in the html tree.

16.5.22 Html as TidyNodeMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The html node in the html tree.

16.5.23 InstallErrorBuffer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 16.5. CLASS TIDYDOCUMENTMBS 525 Function: Installs an error buffer. Notes: Use ErrorBuffer to get the text later.

16.5.24 LibraryVersion as string

Plugin Version: 17.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The version number of the library.

16.5.25 LoadConfigFile(filename as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Load an ASCII Tidy configuration file.

16.5.26 LoadConfigFileWithEncoding(Filename as string, CharacterEncoding as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Load a Tidy configuration file with the specified character encoding.

16.5.27 NextOption(Iterator as TidyIteratorMBS) as TidyOptionMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Finds the next option in the list.

16.5.28 NextRelatedOption(Iterator as TidyIteratorMBS) as TidyOptionMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Get next related option. 526 CHAPTER 16. TIDY 16.5.29 NextUserDeclaredTag(OptionID as Integer, Iterator as TidyIteratorMBS) as string

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Get next declared tag of specified type: TidyInlineTags, TidyBlockTags, TidyEmptyTags or TidyPreTags. Notes: See TidyOptionIdMBS for constants.

16.5.30 OptionCharcterEncodingName(OptionID as Integer) as String

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Get character encoding name. Notes: Used with TidyCharEncoding, TidyOutCharEncoding, TidyInCharEncoding options.

16.5.31 OptionCurrentPick(OptionID as Integer) as String

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Get current pick list value for option by ID. Notes: Useful for enum types.

16.5.32 OptionForID(OptionID as Integer) as TidyOptionMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Finds option based on given ID. Notes: Returns nil on failure.

16.5.33 OptionForName(OptionName as string) as TidyOptionMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Finds option by name.

16.5.34 OptionIDForName(OptionName as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 16.5. CLASS TIDYDOCUMENTMBS 527 Function: Finds Option by name. Notes: Returns nil on failure.

16.5.35 OptionList as TidyIteratorMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: An iterator running through all the options available.

16.5.36 OptionResetToDefault(OptionID as Integer) as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Resets the option to default value.

16.5.37 OptionsDifferentThanDefault as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Any settings different than default?

16.5.38 OptionsDifferentThanSnapshot as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Any settings different than snapshot?

16.5.39 OptionsResetAllToDefault as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Reset all options to their default values.

16.5.40 OptionsResetToSnapshot as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 528 CHAPTER 16. TIDY Function: Reset config settings to snapshot (after document processing).

16.5.41 OptionsSnapshot as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Take a snapshot of current config settings.

16.5.42 ParseFile(filename as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Parse markup in named file.

16.5.43 ParseSource(theInput as TidyInputMBS) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Parse markup in given generic input source.

16.5.44 ParseString(data as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Parse markup in given string. Example: dim t as new TidyDocumentMBS

call t.ParseString(”

Hello World

”) // pass here bad html call t.CleanAndRepair dim s As String=t.SaveString MsgBox s // show fixed html

16.5.45 ParseStringOption(OptionName as string, value as string) as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 16.5. CLASS TIDYDOCUMENTMBS 529 Function: Parses a string to set an option. Example: dim t as new TidyDocumentMBS

MsgBox str(t.OptionQuiet) dim b1 as boolean = t.ParseStringOption(”Quiet”,”true”) MsgBox str(t.OptionQuiet) dim b2 as boolean = t.ParseStringOption(”Quiet”,”false”) MsgBox str(t.OptionQuiet)

Notes: Useful if you don’t know the type of the option. Returns true on success and false on failure.

16.5.46 RelatedOptionsList(Option as TidyOptionMBS) as TidyIteratorMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Iterate over a list of related options.

16.5.47 ReleaseDate as string

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Get release date (version) for current library.

16.5.48 ReportDoctype as Integer

Plugin Version: 17.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The report document type.

16.5.49 Root as TidyNodeMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The root node in the html tree. 530 CHAPTER 16. TIDY 16.5.50 RunDiagnostics as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Run configured diagnostics on parsed and repaired markup. Notes: Must call CleanAndRepair first.

16.5.51 SaveConfig(theOutput as TidyOutputMBS) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Save current settings to given output sink. Notes: Only non-default values are written.

16.5.52 SaveConfigFile(filename as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Save current settings to named file. Notes: Only non-default values are written.

16.5.53 SaveFile(filename as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Save to named file.

16.5.54 SaveOutput(theOutput as TidyOutputMBS) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Save to given generic output.

16.5.55 SaveString as string

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Save to a string. Example: 16.5. CLASS TIDYDOCUMENTMBS 531 dim t as new TidyDocumentMBS call t.ParseString(”

Hello World

”) // pass here bad html call t.CleanAndRepair dim s As String=t.SaveString MsgBox s // show fixed html

Notes: Returns ”” on failure.

The returned string has no encoding set. You need to use DefineEncoding.

16.5.56 SetBooleanOption(OptionID as Integer, value as boolean) as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets an option with a given boolean value. Notes: Returns true on success and false on failure.

16.5.57 SetCharacterEncoding(encodingName as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Set the input/output character encoding for parsing markup. Notes: Values include: ascii, latin1, raw, utf8, iso2022, mac, win1252, utf16le, utf16be, utf16, big5 and shiftjis. Case in-sensitive.

16.5.58 SetErrorFile(filename as string) as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Redirects error output to named file. Notes: Returns true on success.

16.5.59 SetInputCharacterEncoding(encodingName as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. 532 CHAPTER 16. TIDY Function: Set the input character encoding for parsing markup. Example: dim t as new TidyDocumentMBS

MsgBox str(t.OptionInCharEncoding) call t.SetInputCharacterEncoding ”utf8” MsgBox str(t.OptionInCharEncoding)

Notes: Values include: ascii, latin1, raw, utf8, iso2022, mac, win1252, utf16le, utf16be, utf16, big5 and shiftjis. Case in-sensitive.

16.5.60 SetIntegerOption(OptionID as Integer, value as Integer) as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets an option with a given integer value. Notes: Returns true on success and false on failure.

16.5.61 SetOutputCharacterEncoding(encodingName as string) as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Set the output character encoding for parsing markup. Notes: Values include: ascii, latin1, raw, utf8, iso2022, mac, win1252, utf16le, utf16be, utf16, big5 and shiftjis. Case in-sensitive.

16.5.62 SetStringOption(OptionID as Integer, value as string) as boolean

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Sets an option with a given string value. Notes: Returns true on success and false on failure.

16.5.63 Status as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Get status of current document. 16.5. CLASS TIDYDOCUMENTMBS 533 16.5.64 UserDeclaredTagList as TidyIteratorMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Iterate over user declared tags.

16.5.65 WarningCount as Integer

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: Number of warnings encountered.

16.5.66 Properties

16.5.67 ErrorOutput as TidyOutputMBS

Plugin Version: 5.4, Platforms: macOS, Linux, Windows, Targets: All. Function: The output where the error report is written to. Notes: (Read and Write property)

16.5.68 Handle as Integer

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The internal reference to the tidy document object. Notes: (Read only property)

16.5.69 OptionAccessibilityCheck as Integer

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option accessibility-check. Notes: This option specifies what level of accessibility checking, if any, that Tidy should perform. Level 0 (Tidy Classic) is equivalent to Tidy Classic’s accessibility checking. For more information on Tidy’s accessibility checking, visit Tidy’s Accessibility Page (http://www.html- tidy.org/accessibility/). (Read and Write property) 534 CHAPTER 16. TIDY 16.5.70 OptionAccessibilityCheckLevel as Integer

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies what level of accessibility checking, if any, that Tidy shoulddo. Deprecated: This item is deprecated and should no longer be used. Notes: Level 0 is equivalent to Tidy Classic’s accessibility checking. For more information on Tidy’s accessibility checking, visit the Adaptive Technology Resource Centre at the University of Toronto. : http://www.aprompt.ca/Tidy/accessibilitychecks.html (Read and Write property)

16.5.71 OptionAddXmlDecl as Boolean

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option add-xml-decl. Notes: This option specifies if Tidy should add the XML declaration when outputting XML orXHTML. Note that if the input already includes an & lt;?xml ... ?& gt; declaration then this option will be ignored. If the encoding for the output is different from ascii, one of the utf* encodings, or raw, then the declaration is always added as required by the XML standard. (Read and Write property)

16.5.72 OptionAddXmlSpace as Boolean

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option add-xml-space. Notes: This option specifies if Tidy should add xml:space=”preserve” to elements such as & lt;pre& gt;, <style& gt; and & lt;script& gt; when generating XML. This is needed if the whitespace in such elements is to be parsed appropriately without having access to the DTD. (Read and Write property)

16.5.73 OptionAltText as String

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. 16.5. CLASS TIDYDOCUMENTMBS 535 Function: The tidy option alt-text. Notes: This option specifies the default alt= text Tidy uses for & lt;img& gt; attributes when the alt= attributeis missing. Use with care, as it is your responsibility to make your documents accessible to people who cannot see the images. (Read and Write property)

16.5.74 OptionAnchorAsName as Boolean

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option anchor-as-name. Notes: This option controls the deletion or addition of the name attribute in elements where it can serve as anchor. If set to yes a name attribute, if not already existing, is added along an existing id attribute if the DTD allows it. If set to no any existing name attribute is removed if an id attribute exists or has been added. (Read and Write property)

16.5.75 OptionAsciiChars as Boolean

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option ascii-chars. Notes: Can be used to modify behavior of the clean option when set to yes. If set to yes when using clean, & amp;emdash;, & amp;rdquo;, and other named character entities are down- graded to their closest ASCII equivalents. (Read and Write property)

16.5.76 OptionAssumeXmlProcins as Boolean

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option assume-xml-procins. Notes: This option specifies if Tidy should change the parsing of processing instructions to require ?>asthe terminator rather than & gt;. This option is automatically set if the input is in XML. 536 CHAPTER 16. TIDY (Read and Write property)

16.5.77 OptionBare as Boolean

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option bare. Notes: This option specifies if Tidy should strip Microsoft specific HTML from Word 2000 documents, andoutput spaces rather than non-breaking spaces where they exist in the input. (Read and Write property)

16.5.78 OptionBlockTags as String

Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies new block-level tags. Deprecated: This item is deprecated and should no longer be used. Notes: This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you can’t changethe content model for elements such as

,
    ,
      and
      . This option is ignored in XML mode. (Read and Write property)

      16.5.79 OptionBodyOnly as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should print only the contents of the body tag as an HTML fragment. Deprecated: This item is deprecated and should no longer be used. Notes: If set to ”auto”, this is performed only if the body tag has been inferred. Useful for incorporating existing whole pages as a portion of another page. This option has no effect if XML output is requested.

      Value is 0 for no, 1 for yes and 2 for auto. (Read and Write property)

      16.5.80 OptionBreakBeforeBr as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. 16.5. CLASS TIDYDOCUMENTMBS 537 Function: The tidy option break-before-br. Notes: This option specifies if Tidy should output a line break before each & lt;br& gt; element. (Read and Write property)

      16.5.81 OptionCharEncoding as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option char-encoding. Notes: This option specifies the character encoding Tidy uses for both the input and output. For ascii Tidy will accept Latin-1 (ISO-8859-1) character values, but will use entities for all characters whose value & gt;127. For raw, Tidy will output values above 127 without translating them into entities. For latin1, characters above 255 will be written as entities. For utf8, Tidy assumes that both input and output are encoded as UTF-8. You can use iso2022 for files encoded using the ISO-2022 family of encodings e.g. ISO-2022-JP. For mac and win1252, Tidy will accept vendor specific character values, but will use entities for all characters whose value & gt;127. For unsupported encodings, use an external utility to convert to and from UTF-8. (Read and Write property)

      16.5.82 OptionClean as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option clean. Notes: This option specifies if Tidy should perform cleaning of some legacy presentational tags (currently <i& gt;, & lt;b& gt;, & lt;center& gt; when enclosed within appropriate inline tags, and & lt;font& gt;). If set to yes then legacy tags will be replaced with CSS & lt;style& gt; tags and structural markup as appropriate. (Read and Write property)

      16.5.83 OptionCoerceEndtags as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option coerce-endtags. Notes: 538 CHAPTER 16. TIDY This option specifies if Tidy should coerce a start tag into an end tag in cases where it looks like anendtag was probably intended; for example, given & lt;span& gt;foo & lt;b& gt;bar& lt;b& gt; baz& lt;/span& gt; Tidy will output & lt;span& gt;foo & lt;b& gt;bar& lt;/b& gt; baz& lt;/span& gt; (Read and Write property)

      16.5.84 OptionCssPrefix as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option css-prefix. Notes: This option specifies the prefix that Tidy uses for styles rules. By default, c will be used. (Read and Write property)

      16.5.85 OptionDecorateInferredUl as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option decorate-inferred-ul. Notes: This option specifies if Tidy should decorate inferred & lt;ul& gt; elements with some CSS markup toavoid indentation to the right. (Read and Write property)

      16.5.86 OptionDoctype as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option doctype. Notes: This option specifies the DOCTYPE declaration generated by Tidy. If set to omit the output won’t contain a DOCTYPE declaration. Note this this also implies numeric-entities is set to yes. If set to html5 the DOCTYPE is set to & lt;!DOCTYPE html& gt;. If set to auto (the default) Tidy will use an educated guess based upon the contents of the document. If set to strict, Tidy will set the DOCTYPE to the HTML4 or XHTML1 strict DTD. If set to loose, the DOCTYPE is set to the HTML4 or XHTML1 loose (transitional) DTD. Alternatively, you can supply a string for the formal public identifier (FPI). 16.5. CLASS TIDYDOCUMENTMBS 539 For example: doctype: ”-//ACME//DTD HTML 3.14159//EN” If you specify the FPI for an XHTML document, Tidy will set the system identifier to an empty string. For an HTML document, Tidy adds a system identifier only if one was already present in order to preserve the processing mode of some browsers. Tidy leaves the DOCTYPE for generic XML documents unchanged. This option does not offer a validation of document conformance. (Read and Write property)

      16.5.87 OptionDoctypeMode as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option doctype-mode. Notes: (Read only property)

      16.5.88 OptionDropEmptyElements as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option drop-empty-elements. Notes: This option specifies if Tidy should discard empty elements. (Read and Write property)

      16.5.89 OptionDropEmptyParas as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option drop-empty-paras. Notes: This option specifies if Tidy should discard empty paragraphs. (Read and Write property)

      16.5.90 OptionDropFontTags as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option drop-font-tags. Notes: 540 CHAPTER 16. TIDY Deprecated; do not use. This option is destructive to & lt;font& gt; tags, and it will be removed from future versions of Tidy. Use the clean option instead. If you do set this option despite the warning it will perform as clean except styles will be inline instead of put into a CSS class. & lt;font& gt; tags will be dropped completely and their styles will not be preserved. If both clean and this option are enabled, & lt;font& gt; tags will still be dropped completely, and other styles will be preserved in a CSS class instead of inline. See clean for more information. (Read and Write property)

      16.5.91 OptionDropPropAttrs as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should strip out proprietary attributes, such as MS data binding attributes. Deprecated: This item is deprecated and should no longer be used. Notes: (Read and Write property)

      16.5.92 OptionDropProprietaryAttributes as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option drop-proprietary-attributes. Notes: This option specifies if Tidy should strip out proprietary attributes, such as Microsoft data bindingat- tributes. Additionally attributes that aren’t permitted in the output version of HTML will be dropped if used with strict-tags-attributes. (Read and Write property)

      16.5.93 OptionDuplicateAttrs as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: One of the options. Deprecated: This item is deprecated and should no longer be used. Notes: (Read and Write property)

      16.5.94 OptionEmacs as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should change the format for reporting errors and warnings toa format that is more easily parsed by GNU Emacs. 16.5. CLASS TIDYDOCUMENTMBS 541 Deprecated: This item is deprecated and should no longer be used. Notes: (Read and Write property)

      16.5.95 OptionEmacsFile as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: Used internally. Deprecated: This item is deprecated and should no longer be used. Notes: (Read and Write property)

      16.5.96 OptionEmptyTags as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies new empty inline tags. Deprecated: This item is deprecated and should no longer be used. Notes: This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Remember to also declare empty tags as either inline or blocklevel. This option is ignored in XML mode. (Read and Write property)

      16.5.97 OptionEncloseBlockText as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option enclose-block-text. Notes: This option specifies if Tidy should insert a & lt;p& gt; element to enclose any text it finds inanyelement that allows mixed content for HTML transitional but not HTML strict. (Read and Write property)

      16.5.98 OptionEncloseBodyText as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should enclose any text it finds in the body element withina

      element. Deprecated: This item is deprecated and should no longer be used. Notes: This is useful when you want to take existing HTML and use it with a style sheet. (Read and Write property) 542 CHAPTER 16. TIDY 16.5.99 OptionEncloseText as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option enclose-text. Notes: This option specifies if Tidy should enclose any text it finds in the body element within a & lt;p& gt;element. This is useful when you want to take existing HTML and use it with a style sheet. (Read and Write property)

      16.5.100 OptionErrFile as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies the error file Tidy uses for errors and warnings. Deprecated: This item is deprecated and should no longer be used. Notes: Normally errors and warnings are output to ”stderr”. (Read and Write property)

      16.5.101 OptionErrorFile as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option error-file. Notes: This option specifies the error file Tidy uses for errors and warnings. Normally errors and warnings are output to stderr. (Read and Write property)

      16.5.102 OptionEscapeCdata as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option escape-cdata. Notes: This option specifies if Tidy should convert & lt;! [ CDATA []] & gt; sections to normal text. (Read and Write property) 16.5. CLASS TIDYDOCUMENTMBS 543 16.5.103 OptionEscapeScripts as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option escape-scripts. Notes: This option causes items that look like closing tags, like & lt;/g to be escaped to & lt;\/g. Set this option to ’no’ if you do not want this. (Read and Write property)

      16.5.104 OptionFixBackslash as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option fix-backslash. Notes: This option specifies if Tidy should replace backslash characters \in URLs with forward slashes/. (Read and Write property)

      16.5.105 OptionFixBadComments as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option fix-bad-comments. Notes: This option specifies if Tidy should replace unexpected hyphens with = characters when it comes across adjacent hyphens. The default is yes. This option is provided for users of Cold Fusion which uses the comment syntax: & lt;!— —& gt;. (Read and Write property) 544 CHAPTER 16. TIDY 16.5.106 OptionFixComments as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should replace unexpected hyphens with ”=” characters whenit comes across adjacent hyphens. Deprecated: This item is deprecated and should no longer be used. Notes: The default is yes. This option is provided for users of Cold Fusion which uses the comment syntax: (Read and Write property)

      16.5.107 OptionFixUri as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option fix-uri. Notes: This option specifies if Tidy should check attribute values that carry URIs for illegal characters andifsuch are found, escape them as HTML4 recommends. (Read and Write property)

      16.5.108 OptionForceOutput as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option force-output. Notes: This option specifies if Tidy should produce output even if errors are encountered. Use this option with care; if Tidy reports an error, this means Tidy was not able to (or is not sure how to) fix the error, so the resulting output may not reflect your intention. (Read and Write property)

      16.5.109 OptionGdoc as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option gdoc. Notes: This option specifies if Tidy should enable specific behavior for cleaning up HTML exported fromGoogle Docs. 16.5. CLASS TIDYDOCUMENTMBS 545 (Read and Write property)

      16.5.110 OptionGnuEmacs as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option gnu-emacs. Notes: This option specifies if Tidy should change the format for reporting errors and warnings to a format thatis more easily parsed by GNU Emacs. (Read and Write property)

      16.5.111 OptionGnuEmacsFile as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option gnu-emacs-file. Notes: Used internally. (Read and Write property)

      16.5.112 OptionHideComments as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option hide-comments. Notes: This option specifies if Tidy should print out comments. (Read and Write property)

      16.5.113 OptionHideEndtags as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option hide-endtags. Notes: This option is an alias for omit-optional-tags. (Read and Write property) 546 CHAPTER 16. TIDY 16.5.114 OptionHtmlOut as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should generate pretty printed output, writing it asHTML. Deprecated: This item is deprecated and should no longer be used. Notes: (Read and Write property)

      16.5.115 OptionInCharEncoding as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies the character encoding Tidy uses for the input. Deprecated: This item is deprecated and should no longer be used. Notes: See char-encoding for more info. (Read and Write property)

      16.5.116 OptionIndent as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option indent. Notes: This option specifies if Tidy should indent block-level tags. If set to auto Tidy will decide whether or not to indent the content of tags such as & lt;title& gt;, & lt;h1& gt;-& lt;h6& gt;, & lt;li& gt;, & lt;td& gt;, or & lt;p& gt; based on the content including a block-level element. Setting indent to yes can expose layout bugs in some browsers. Use the option indent-spaces to control the number of spaces or tabs output per level of indent, and indent- with-tabs to specify whether spaces or tabs are used. (Read and Write property)

      16.5.117 OptionIndentAttributes as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option indent-attributes. Notes: This option specifies if Tidy should begin each attribute on a newline. (Read and Write property) 16.5. CLASS TIDYDOCUMENTMBS 547 16.5.118 OptionIndentCdata as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option indent-cdata. Notes: This option specifies if Tidy should indent <! [ CDATA []] & gt; sections. (Read and Write property)

      16.5.119 OptionIndentContent as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: One of the options. Deprecated: This item is deprecated and should no longer be used. Notes: (Read and Write property)

      16.5.120 OptionIndentSpaces as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option indent-spaces. Notes: This option specifies the number of spaces or tabs that Tidy uses to indent content when indent isenabled. Note that the default value for this option is dependent upon the value of indent-with-tabs (see also). (Read and Write property)

      16.5.121 OptionIndentWithTabs as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option indent-with-tabs. Notes: This option specifies if Tidy should indent with tabs instead of spaces, assuming indent isyes. Set it to yes to indent using tabs instead of the default spaces. Use the option indent-spaces to control the number of tabs output per level of indent. Note that when indent-with-tabs is enabled the default value of indent-spaces is reset to 1. Note tab-size controls converting input tabs to spaces. Set it to zero to retain input tabs. (Read and Write property) 548 CHAPTER 16. TIDY 16.5.122 OptionInlineTags as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies new non-empty inline tags. This option takes a space or comma separated list of tag names. Deprecated: This item is deprecated and should no longer be used. Notes: Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. This option is ignored in XML mode. (Read and Write property)

      16.5.123 OptionInputEncoding as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option input-encoding. Notes: This option specifies the character encoding Tidy uses for the input. See char-encoding for moreinfo. (Read and Write property)

      16.5.124 OptionInputXml as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option input-xml. Notes: This option specifies if Tidy should use the XML parser rather than the error correcting HTMLparser. (Read and Write property)

      16.5.125 OptionJoinClasses as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option join-classes. Notes: This option specifies if Tidy should combine class names to generate a single, new class name ifmultiple class assignments are detected on an element. (Read and Write property) 16.5. CLASS TIDYDOCUMENTMBS 549 16.5.126 OptionJoinStyles as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option join-styles. Notes: This option specifies if Tidy should combine styles to generate a single, new style if multiple style valuesare detected on an element. (Read and Write property)

      16.5.127 OptionKeepFileTimes as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should keep the original modification time of files that Tidymodifies in place. Deprecated: This item is deprecated and should no longer be used. Notes: The default is no. Setting the option to yes allows you to tidy files without causing these files to be uploaded to a web server when using a tool such as SiteCopy. Note this feature is not supported on some platforms. (Read and Write property)

      16.5.128 OptionKeepTime as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option keep-time. Notes: This option specifies if Tidy should keep the original modification time of files that Tidy modifies inplace. Setting the option to yes allows you to tidy files without changing the file modification date, which maybe useful with certain tools that use the modification date for things such as automatic server deployment. Note this feature is not supported on some platforms. (Read and Write property)

      16.5.129 OptionLanguage as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option language. Notes: Currently not used, but this option specifies the language Tidy would use if it were properly localized. For example: en. 550 CHAPTER 16. TIDY (Read and Write property)

      16.5.130 OptionLiteralAttribs as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should ensure that whitespace characters within attribute values are passed through unchanged. Deprecated: This item is deprecated and should no longer be used. Notes: (Read and Write property)

      16.5.131 OptionLiteralAttributes as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option literal-attributes. Notes: This option specifies how Tidy deals with whitespace characters within attribute values. If the value is no Tidy normalizes attribute values by replacing any newline or tab with a single space, and further by replacing any contiguous whitespace with a single space. To force Tidy to preserve the original, literal values of all attributes and ensure that whitespace within attribute values is passed through unchanged, set this option to yes. (Read and Write property)

      16.5.132 OptionLogicalEmphasis as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option logical-emphasis. Notes: This option specifies if Tidy should replace any occurrence of & lt;i& gt; with & lt;em& gt; andanyoccur- rence of & lt;b& gt; with & lt;strong& gt;. Any attributes are preserved unchanged. This option can be set independently of the clean option. (Read and Write property)

      16.5.133 OptionLowerLiterals as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option lower-literals. Notes: 16.5. CLASS TIDYDOCUMENTMBS 551 This option specifies if Tidy should convert the value of an attribute that takes a list of predefined valuesto lower case. This is required for XHTML documents. (Read and Write property)

      16.5.134 OptionMakeBare as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should strip Microsoft specific HTML from Word 2000 documents, and output spaces rather than non-breaking spaces where they exist in the input. Deprecated: This item is deprecated and should no longer be used. Notes: (Read and Write property)

      16.5.135 OptionMakeClean as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should strip out surplus presentational tags and attributes replacing them by style rules and structural markup as appropriate. Deprecated: This item is deprecated and should no longer be used. Notes: It works well on the HTML saved by Microsoft Office products. (Read and Write property)

      16.5.136 OptionMark as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies if Tidy should add a meta element to the document head to indicate that the document has been tidied. Deprecated: This item is deprecated and should no longer be used. Notes: Tidy won’t add a meta element if one is already present. (Read and Write property)

      16.5.137 OptionMarkup as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option markup. Notes: 552 CHAPTER 16. TIDY This option specifies if Tidy should generate a pretty printed version of the markup. Note that Tidywon’t generate a pretty printed version if it finds significant errors (see force-output). (Read and Write property)

      16.5.138 OptionMergeDivs as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option merge-divs. Notes: This option can be used to modify the behavior of clean when set to yes. This option specifies if Tidy should merge nested & lt;div& gt; such as & lt;div& gt;& lt;div& gt;...& lt;/div& gt;& lt;/div& gt;. If set to auto the attributes of the inner & lt;div& gt; are moved to the outer one. Nested & lt;div& gt; with id attributes are not merged. If set to yes the attributes of the inner & lt;div& gt; are discarded with the exception of class and style. (Read and Write property)

      16.5.139 OptionMergeEmphasis as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option merge-emphasis. Notes: This option specifies if Tidy should merge nested & lt;b& gt; and & lt;i& gt; elements; for example, forthe case & lt;b class=”rtop-2”& gt;foo & lt;b class=”r2-2”& gt;bar& lt;/b& gt; baz& lt;/b& gt;, Tidy will output & lt;b class=”rtop-2”& gt;foo bar baz& lt;/b& gt;. (Read and Write property)

      16.5.140 OptionMergeSpans as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option merge-spans. Notes: This option can be used to modify the behavior of clean when set to yes. This option specifies if Tidy should merge nested & lt;span& gt; such as & lt;span& gt;& lt;span& gt;...& lt;/span& gt;& lt;/span& gt;. The algorithm is identical to the one used by merge-divs. 16.5. CLASS TIDYDOCUMENTMBS 553 (Read and Write property)

      16.5.141 OptionNcr as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option ncr. Notes: This option specifies if Tidy should allow numeric character references. (Read and Write property)

      16.5.142 OptionNewBlocklevelTags as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option new-blocklevel-tags. Notes: This option specifies new block-level tags. This option takes a space or comma separated list of tagnames. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you can’t change the content model for elements such as & lt;table& gt;, & lt;ul& gt;, & lt;ol& gt; and & lt;dl& gt;. This option is ignored in XML mode. (Read and Write property)

      16.5.143 OptionNewEmptyTags as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option new-empty-tags. Notes: This option specifies new empty inline tags. This option takes a space or comma separated list of tagnames. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Remember to also declare empty tags as either inline or blocklevel. This option is ignored in XML mode. (Read and Write property) 554 CHAPTER 16. TIDY 16.5.144 OptionNewInlineTags as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option new-inline-tags. Notes: This option specifies new non-empty inline tags. This option takes a space or comma separated listoftag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. This option is ignored in XML mode. (Read and Write property)

      16.5.145 OptionNewline as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option newline. Notes: The default is appropriate to the current platform. Genrally CRLF on PC-DOS, Windows and OS/2; CR on Classic Mac OS; and LF everywhere else (Linux, Mac OS X, and Unix). (Read and Write property)

      16.5.146 OptionNewPreTags as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option new-pre-tags. Notes: This option specifies new tags that are to be processed in exactly the same way as HTML’s <pre> element. This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you cannot as yet add new CDATA elements. This option is ignored in XML mode. (Read and Write property)

      16.5.147 OptionNumEntities as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. 16.5. CLASS TIDYDOCUMENTMBS 555 Function: This option specifies if Tidy should output entities other than the built-in HTML entities (& amp;, & lt;, & gt; and & quot;) in the numeric rather than the named entity form. Deprecated: This item is deprecated and should no longer be used. Notes: Only entities compatible with the DOCTYPE declaration generated are used. Entities that can be repre- sented in the output encoding are translated correspondingly. (Read and Write property)

      16.5.148 OptionNumericEntities as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option numeric-entities. Notes: This option specifies if Tidy should output entities other than the built-in HTML entities (& amp;amp;,& amp;lt;, & amp;gt;, and & amp;quot;) in the numeric rather than the named entity form. Only entities compatible with the DOCTYPE declaration generated are used. Entities that can be represented in the output encoding are translated correspondingly. (Read and Write property)

      16.5.149 OptionOmitOptionalTags as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option omit-optional-tags. Notes: This option specifies if Tidy should omit optional start tags and end tags when generating output. Setting this option causes all tags for the & lt;html& gt;, & lt;head& gt;, and & lt;body& gt; elements to be omitted from output, as well as such end tags as & lt;/p& gt;, & lt;/li& gt;, & lt;/dt& gt;, & lt;/dd& gt;, & lt;/option& gt;, & lt;/tr& gt;, & lt;/td& gt;, and & lt;/th& gt;. This option is ignored for XML output. (Read and Write property)

      16.5.150 OptionOutCharEncoding as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies the character encoding Tidy uses for the output. Deprecated: This item is deprecated and should no longer be used. Notes: See char-encoding for more info. May only be different from input-encoding for Latin encodings (ascii, latin0, latin1, mac, win1252, ibm858). 556 CHAPTER 16. TIDY (Read and Write property)

      16.5.151 OptionOutFile as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies the output file Tidy uses for markup. Deprecated: This item is deprecated and should no longer be used. Notes: Normally markup is written to ”stdout”. (Read and Write property)

      16.5.152 OptionOutputBom as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option output-bom. Notes: This option specifies if Tidy should write a Unicode Byte Order Mark character (BOM; also knownasZero Width No-Break Space; has value of U+FEFF) to the beginning of the output, and only applies to UTF-8 and UTF-16 output encodings. If set to auto this option causes Tidy to write a BOM to the output only if a BOM was present at the beginning of the input. A BOM is always written for XML/XHTML output using UTF-16 output encodings. (Read and Write property)

      16.5.153 OptionOutputEncoding as Integer

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option output-encoding. Notes: This option specifies the character encoding Tidy uses for the output. Note that this may only be different from input-encoding for Latin encodings (ascii, latin0, latin1, mac, win1252, ibm858). See char-encoding for more information (Read and Write property) 16.5. CLASS TIDYDOCUMENTMBS 557 16.5.154 OptionOutputFile as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option output-file. Notes: This option specifies the output file Tidy uses for markup. Normally markup is written tostdout. (Read and Write property)

      16.5.155 OptionOutputHtml as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option output-html. Notes: This option specifies if Tidy should generate pretty printed output, writing it asHTML. (Read and Write property)

      16.5.156 OptionOutputXhtml as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option output-xhtml. Notes: This option specifies if Tidy should generate pretty printed output, writing it as extensible HTML. This option causes Tidy to set the DOCTYPE and default namespace as appropriate to XHTML, and will use the corrected value in output regardless of other sources. For XHTML, entities can be written as named or numeric entities according to the setting of numeric-entities. The original case of tags and attributes will be preserved, regardless of other options. (Read and Write property)

      16.5.157 OptionOutputXml as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option output-xml. Notes: This option specifies if Tidy should pretty print output, writing it as well-formed XML. Any entities not defined in XML 1.0 will be written as numeric entities to allow them to be parsedbyan XML parser. The original case of tags and attributes will be preserved, regardless of other options. 558 CHAPTER 16. TIDY (Read and Write property)

      16.5.158 OptionPreserveEntities as Boolean

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: The tidy option preserve-entities. Notes: This option specifies if Tidy should preserve well-formed entities as found in the input. (Read and Write property)

      16.5.159 OptionPreTags as String

      Plugin Version: 10.1, Platforms: macOS, Linux, Windows, Targets: All. Function: This option specifies new tags that are to be processed in exactly the same wayasHTML’s

      element. Deprecated: This item is deprecated and should no longer be used. Notes: This option takes a space or comma separated list of tag names. Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. Note you can not asyetadd new CDATA elements (similar to