Class: GtkSource::Region
- Inherits:
-
Object
- Object
- GtkSource::Region
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#add_region(region_to_add) ⇒ nil
Adds region_to_add to region.
-
#add_subregion(_start, _end) ⇒ nil
Adds the subregion delimited by _start and _end to region.
-
#buffer ⇒ Gtk::TextBuffer
The [classGtk.TextBuffer].
-
#buffer=(buffer) ⇒ Gtk::TextBuffer
The [classGtk.TextBuffer].
-
#get_bounds(start, end) ⇒ Boolean
Gets the start and end bounds of the region.
-
#get_start_region_iter(iter) ⇒ nil
Initializes a [structRegionIter] to the first subregion of region.
-
#initialize(buffer) ⇒ GtkSource::Region
constructor
A new Gtk::SourceRegion object for buffer.
-
#intersect_region(region2) ⇒ GtkSource::Region
Returns the intersection between region1 and region2.
-
#intersect_subregion(_start, _end) ⇒ GtkSource::Region
Returns the intersection between region and the subregion delimited by _start and _end.
-
#is_empty ⇒ Boolean
Returns whether the region is empty.
-
#subtract_region(region_to_subtract) ⇒ nil
Subtracts region_to_subtract from region.
-
#subtract_subregion(_start, _end) ⇒ nil
Subtracts the subregion delimited by _start and _end from region.
-
#to_string ⇒ String
Gets a string represention of region, for debugging purposes.
Constructor Details
#initialize(buffer) ⇒ GtkSource::Region
Returns a new Gtk::SourceRegion object for buffer.
Instance Method Details
#add_region(region_to_add) ⇒ nil
Adds region_to_add to region.
region_to_add is not modified.
#add_subregion(_start, _end) ⇒ nil
Adds the subregion delimited by _start and _end to region.
#buffer ⇒ Gtk::TextBuffer
The [classGtk.TextBuffer]. The Gtk::SourceRegion has a weak reference to the buffer.
#buffer=(buffer) ⇒ Gtk::TextBuffer
The [classGtk.TextBuffer]. The Gtk::SourceRegion has a weak reference to the buffer.
#get_bounds(start, end) ⇒ Boolean
Gets the start and end bounds of the region.
#get_start_region_iter(iter) ⇒ nil
Initializes a [structRegionIter] to the first subregion of region.
If region is empty, iter will be initialized to the end iterator.
#intersect_region(region2) ⇒ GtkSource::Region
Returns the intersection between region1 and region2.
region1 and region2 are not modified.
#intersect_subregion(_start, _end) ⇒ GtkSource::Region
Returns the intersection between region and the subregion delimited by _start and _end.
region is not modified.
#is_empty ⇒ Boolean
Returns whether the region is empty.
A nil region is considered empty.
#subtract_region(region_to_subtract) ⇒ nil
Subtracts region_to_subtract from region.
region_to_subtract is not modified.
#subtract_subregion(_start, _end) ⇒ nil
Subtracts the subregion delimited by _start and _end from region.
#to_string ⇒ String
Gets a string represention of region, for debugging purposes.
The returned string contains the character offsets of the subregions. It doesn't include a newline character at the end of the string.