Reference Codebot.Frame.Source.pas
Part of the Codebot Frame Design package
The Codebot.Frame.Source unit finds the parts of the unit of a form or frame that change when it is converted into a control, and edits its text.
TFormSource reads the tokens of the unit, skipping comments but keeping compiler directives. Analyze finds the unit name, the interface and implementation, the uses clauses, the declaration of the form class and its ancestor, the end of the unit, and whether the unit is written in Delphi mode. It also removes the fields of the components, the global variable of the form, and the form resource directive.
Changes are added as edits of the text and made all at once by Apply, so the comments, directives, and code that don't change are kept exactly as they were written.
Items 46 items
| Name | Kind | Line |
|---|---|---|
| TFormSource | class | 51 |
| AncestorIndex | field | 82 |
| ClassEndIndex | field | 84 |
| ClassIndex | field | 80 |
| ClassMembers | field | 89 |
| FormVariables | field | 91 |
| ImplementationIndex | field | 67 |
| ImplementationUses | field | 87 |
| ImplementationUsesEnd | field | 78 |
| InterfaceIndex | field | 75 |
| InterfaceUses | field | 86 |
| InterfaceUsesEnd | field | 73 |
| IsDelphiMode | field | 63 |
| UnitEndIndex | field | 70 |
| UnitNameIndex | field | 65 |
| AddEdit | procedure | 102 |
| Analyze | function | 98 |
| Apply | function | 115 |
| Create | constructor | 92 |
| Destroy | destructor | 93 |
| InsertAfter | procedure | 106 |
| InsertBeforeLine | procedure | 104 |
| IsSymbol | function | 121 |
| IsWord | function | 119 |
| LineOf | function | 113 |
| RemoveTokens | procedure | 111 |
| ReplaceIdent | procedure | 100 |
| ReplaceToken | procedure | 108 |
| Token | function | 117 |
| TokenCount | function | 116 |
| Error | property | 122 |
| TPasToken | record | 32 |
| EndPos | field | 37 |
| Kind | field | 33 |
| StartPos | field | 35 |
| Text | field | 38 |
| TPasTokenKind | enum | 27 |
| ptIdent | enum value | 27 |
| ptNumber | enum value | 27 |
| ptString | enum value | 27 |
| ptSymbol | enum value | 27 |
| ptDirective | enum value | 27 |
| TSourceEdit | record | 43 |
| Count | field | 45 |
| Pos | field | 44 |
| Text | field | 46 |