TextPointerFixed example for Delphi

Procedure TForm1.ExampleTextPointerFixed ( hObject: HANNOBJECT );
var
   nObjectType: L_INT;
   bTextPointerFixed: Boolean;
begin
   nObjectType:= LEADAnn1.AnnGetType(hObject);

   if (nObjectType <> ANNOBJECT_TEXT) Then
   begin
      ShowMessage( 'This object is not a Text Object');
   end;

   bTextPointerFixed:= LEADAnn1.AnnTextPointerFixed[hObject];
   if (bTextPointerFixed = true) Then
   begin
      bTextPointerFixed:= false;
   end
   else
   begin
      bTextPointerFixed:= true;
   end;

   LEADAnn1.AnnTextPointerFixed[hObject]:= bTextPointerFixed;
end;