ReparentStructTreeCursor

Tagged PDF, structure repair

Περιγραφή

Moves the cursor element below a new parent or reorders it within the same parent. The method normalizes the tree first, verifies both elements are reachable, rejects self-parenting and descendant cycles, updates the parent child collection, and writes the matching child /P link

Σύνταξη

Delphi

Function TPDFlib.ReparentStructTreeCursor(CursorID, NewParentCursorID, ChildIndex: Integer): Integer;

ActiveX

Function PDFlib::ReparentStructTreeCursor(CursorID As Long, NewParentCursorID As Long, ChildIndex As Long) As Long

DLL

int DLReparentStructTreeCursor(int InstanceID, int CursorID, int NewParentCursorID, int ChildIndex);

Παράμετροι

NewParentCursorIDΚέρσορας στοιχείου δομής, ή 0 για τη ρίζα του δέντρου δομής
ChildIndexΘέση one-based μεταξύ των θυγατρικών στοιχείων δομής ή 0 για προσθήκη μετά τα υπάρχοντα kids

Τιμές επιστροφής

Ο νέος θετικός δείκτης στοιχείου του μετακινηθέντος στοιχείου, ή 0 όταν αποτύχει η επαλήθευση

Remarks

Integer MCIDs, /MCR, and /OBJR kids keep their relative order and are not counted by ChildIndex. Moving a hierarchy node does not alter marked-content ownership or parent-tree values