Module Brr.RangeSource

Range objects.

Comparison constants

Sourcetype compare_how

Constants for the first argument of compare_boundary_points.

Sourceval end_to_end : compare_how

Range.END_TO_END.

Sourceval end_to_start : compare_how

Range.END_TO_START.

Sourceval start_to_end : compare_how

Range.START_TO_END.

Sourceval start_to_start : compare_how

Range.START_TO_START.

Ranges

Sourcetype t

The type for Range objects.

Sourceval create : unit -> t

create () is a new range object.

Sourceval clone_range : t -> t

clone_range r clones r.

Sourceval collapse_to_start : t -> unit

collapse_to_start r collapses r to its start.

Sourceval collapse_to_end : t -> unit

collapse_to_end r collapses r to its end.

Sourceval compare_boundary_points : t -> compare_how -> t -> int

compare_boundary_points r how r' compares r to r'.

Sourceval compare_point : t -> El.t -> int -> int

compare_point r el offset compare r to el.

Sourceval delete_contents : t -> unit

delete_contents r deletes the content in range r.

Sourceval insert_node : t -> El.t -> unit

insert_node r el insert el at the start of r.

Sourceval intersects_node : t -> El.t -> bool

intersects_node r e is true if el intersects r.

Sourceval is_point_in_range : t -> El.t -> int -> bool

is_point_in_range r el offset is true if the point is in the range of r.

Sourceval select_node : t -> El.t -> unit

select_node r el sets r to conatin el.

Sourceval select_node_contents : t -> El.t -> unit

select_node_contents r el sets r to the contents of el.

Sourceval set_end : t -> El.t -> int -> unit

set_end r el offset sets the end of r to el.

Sourceval set_end_after : t -> El.t -> unit

set_end_after r el sets the end of r after the end of el.

Sourceval set_end_before : t -> El.t -> unit

set_end_before r sets the end of r before the end of el.

Sourceval set_start : t -> El.t -> int -> unit

set_start r el offset sets the start of r to el.

Sourceval set_start_after : t -> El.t -> unit

set_start_after r el sets the start of r after el.

Sourceval set_start_before : t -> El.t -> unit

set_start_before r el sets the start of r before el.

Sourceval surround_contents : t -> El.t -> unit

surround_contents r el surrounds the content of r by el.

Sourceval to_string : t -> Jstr.t

to_string r converts r to a string.

Properties

Sourceval collapsed : t -> bool

collapsed r indicates if r is collapsed.

Sourceval common_ancestor_container : t -> El.t

common_ancestor_container r is the common ancestor container of r

Sourceval end_container : t -> El.t

end_container r is the end container of r.

Sourceval end_offset : t -> int

end_offset r is the end offset of r.

Sourceval start_container : t -> El.t

end_container r is the start container of r.

Sourceval start_offset : t -> int

end_offset r is the start offset of r.