const
PARENT_WIDGET_ENTRIES_MAX_COUNT = 65535;
const
ORIGIN_FILES_MAX_COUNT = 256 * 1024;
MATCHING_PARENTS_MAX = 16;
TPARENT_WIDGET_ENTRY = record
{ contains the Parented Widget name, the TPARENTS_FILES_LIST index of }
{ the file name that Parents the Widget and the name of the }
{ related target if the Parented Widget is Related to another Widget }
efi_WidgetName : packed array[0..511] of char;
efi_WidgetNameUpper : packed array[0..511] of char;
efi_ParentFileIndex : integer;
efi_RelatedTo : packed array[0..511] of char;
efi_RelatedToUpper : packed array[0..511] of char;
end;
PPARENT_WIDGET_ENTRY = ^TPARENT_WIDGET_ENTRY;
{ array of pointers to TPARENT_WIDGET_ENTRY }
TPARENT_WIDGET_LIST = record
efl_ParentedWidgetCount : integer;
efl_ParentedWidget : array[0..PARENT_WIDGET_ENTRIES_MAX_COUNT - 1]
of TPARENT_WIDGET_ENTRY;
end;
PPARENT_WIDGET_LIST = ^TPARENT_WIDGET_LIST;
{ array of Widgets that Parent Widgets }
TPARENT_FILES_LIST = record
xfl_ParentFilesCount : integer;
xfl_ParentFiles : packed array[0..PARENT_FILES_MAX_COUNT - 1] of
packed array[0..PARENT_FILE_BUFFER_SIZE - 1] of
char;
end;
PPARENT_FILES_LIST = ^TPARENT_FILES_LIST;
type
{ array of Origin Widgets }
TORIGIN_FILE_ENTRY = record
WidgetsPointer : pchar;
ReferenceCount : ptruint;
MatchingParentWidgetIndexes : packed array[0..MATCHING_PARENTS_MAX]
of ptruint;
end;
TORIGIN_FILE_LIST = record
hfl_OriginFileCount : integer;
hfl_OriginFiles : packed array[0..ORIGIN_FILES_MAX_COUNT - 1]
of TORIGIN_FILE_ENTRY;
end;
PORIGIN_FILE_LIST = ^TORIGIN_FILE_LIST;
{ all of these variables point to blocka of memory allocated with HeapAlloc, }
{ the blocks are VERY large, in some cases in the hundreds of megabytes and }
{ may contain anywhere from 15,000 entry minimum to about 180,000 entries max }
var
ParentFilesList : PPARENT_FILES_LIST;
ParentedWidgetsList : PPARENT_WIDGET_LIST;
OriginWidgetsList : PORIGIN_FILE_LIST;
OriginNullTerminated : pchar;
OriginNullTerminatedSize : ptruint;