GtkSource.Region¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class GtkSource.Region(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(buffer)¶
- Parameters:
buffer (
Gtk.TextBuffer
) – aGtk.TextBuffer
.- Returns:
a new
GtkSource.Region
object for buffer.- Return type:
New in version 3.22.
- add_region(region_to_add)¶
- Parameters:
region_to_add (
GtkSource.Region
orNone
) – theGtkSource.Region
to add to self, orNone
.
Adds region_to_add to self. region_to_add is not modified.
New in version 3.22.
- add_subregion(_start, _end)¶
- Parameters:
_start (
Gtk.TextIter
) – the start of the subregion._end (
Gtk.TextIter
) – the end of the subregion.
Adds the subregion delimited by _start and _end to self.
New in version 3.22.
- get_bounds()¶
- Returns:
True
if start and end have been set successfully (if non-None
), orFalse
if the self is empty.- Return type:
(
bool
, start:Gtk.TextIter
, end:Gtk.TextIter
)
Gets the start and end bounds of the self.
New in version 3.22.
- get_buffer()¶
- Returns:
the
Gtk.TextBuffer
.- Return type:
New in version 3.22.
- get_start_region_iter()¶
- Returns:
iterator to initialize to the first subregion.
- Return type:
iter:
GtkSource.RegionIter
Initializes a
GtkSource.RegionIter
to the first subregion of self. If self is empty, iter will be initialized to the end iterator.New in version 3.22.
- intersect_region(region2)¶
- Parameters:
region2 (
GtkSource.Region
orNone
) – aGtkSource.Region
, orNone
.- Returns:
the intersection as a
GtkSource.Region
object.- Return type:
Returns the intersection between self and region2. self and region2 are not modified.
New in version 3.22.
- intersect_subregion(_start, _end)¶
- Parameters:
_start (
Gtk.TextIter
) – the start of the subregion._end (
Gtk.TextIter
) – the end of the subregion.
- Returns:
the intersection as a new
GtkSource.Region
.- Return type:
Returns the intersection between self and the subregion delimited by _start and _end. self is not modified.
New in version 3.22.
- is_empty()¶
- Returns:
whether the self is empty.
- Return type:
Returns whether the self is empty. A
None
self is considered empty.New in version 3.22.
- subtract_region(region_to_subtract)¶
- Parameters:
region_to_subtract (
GtkSource.Region
orNone
) – theGtkSource.Region
to subtract from self, orNone
.
Subtracts region_to_subtract from self. region_to_subtract is not modified.
New in version 3.22.
- subtract_subregion(_start, _end)¶
- Parameters:
_start (
Gtk.TextIter
) – the start of the subregion._end (
Gtk.TextIter
) – the end of the subregion.
Subtracts the subregion delimited by _start and _end from self.
New in version 3.22.
- to_string()¶
- Returns:
a string represention of self. Free with
GLib.free
() when no longer needed.- Return type:
Gets a string represention of self, 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.
New in version 3.22.
Property Details¶
- GtkSource.Region.props.buffer¶
- Name:
buffer
- Type:
- Default Value:
- Flags:
The
Gtk.TextBuffer
. TheGtkSource.Region
has a weak reference to the buffer.New in version 3.22.