Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

Working with Multiple Selection Object

The created multiple selection object is empty. IMultiSelection.Empty property is TRUE for empty selection objects. You may use the IMultiSelection.AddRange method to add a contiguous range to the selection, IMultiSelection.RemoveRange method to remove (subtract) a range from the selection and IMultiSelection.ToggleRange method to “toggle” the given range in a selection.

IMultiSelection.InsertRange and IMultiSelection.DeleteRange are used to insert and delete new ranges into the selection. These methods differ from previously described in that the data beyond the inserted/deleted range is shifted. IMultiSelection.DeleteRange method is not currently implemented.

Call the IMultiSelection.Invert method to invert the current selection and IMultiSelection.Clear method to clear the current selection. Both methods perform in constant-time, not depending on the selection's complexity.

IMultiSelection.Save and IMultiSelection.Load methods may be used to save (with compression) the current selection to a file or load it from a file correspondingly. IMultiSelection.Load method accepts the loading mode, allowing you to merge two selection objects using different algorithms.

IMultiSelection.IsIn method checks if the given offset is located within the selection.

The IMultiSelection.TotalSize property holds the total size of all ranges in the selection. IMultiSelection.Count property holds the total number of ranges in the selection.