Class: GtkSource::SpaceDrawer
- Inherits:
-
Object
- Object
- GtkSource::SpaceDrawer
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#bind_matrix_setting(settings, key, flags) ⇒ nil
Binds the [propertySpaceDrawer:matrix] property to a [classGio.Settings] key.
-
#enable_matrix ⇒ Boolean
Whether the Gtk::SourceSpaceDrawer:matrix property is enabled.
-
#enable_matrix=(enable_matrix) ⇒ Boolean
Whether the [propertySpaceDrawer:matrix] property is enabled.
-
#enable_matrix? ⇒ Boolean
Whether the [propertySpaceDrawer:matrix] property is enabled.
-
#get_types_for_locations(locations) ⇒ GtkSource::SpaceTypeFlags
If only one location is specified, this function returns what kind of white spaces are drawn at that location.
-
#initialize ⇒ GtkSource::SpaceDrawer
constructor
Creates a new Gtk::SourceSpaceDrawer object.
-
#matrix ⇒ GLib::Variant
The property is a [structGLib.Variant] property to specify where and what kind of white spaces to draw.
-
#matrix=(matrix) ⇒ GLib::Variant
The property is a [structGLib.Variant] property to specify where and what kind of white spaces to draw.
-
#set_types_for_locations(locations, types) ⇒ nil
Modifies the [propertySpaceDrawer:matrix] property at the specified locations.
Constructor Details
#initialize ⇒ GtkSource::SpaceDrawer
Creates a new Gtk::SourceSpaceDrawer object.
Useful for storing space drawing settings independently of a [classView].
Instance Method Details
#bind_matrix_setting(settings, key, flags) ⇒ nil
Binds the [propertySpaceDrawer:matrix] property to a [classGio.Settings] key.
The [classGio.Settings] key must be of the same type as the
[propertySpaceDrawer:matrix] property, that is, "au".
The [methodGio.Settings.bind] function cannot be used, because the default GIO mapping functions don't support [structGLib.Variant] properties (maybe it will be supported by a future GIO version, in which case this function can be deprecated).
#enable_matrix ⇒ Boolean
Returns whether the Gtk::SourceSpaceDrawer:matrix property is enabled.
#enable_matrix=(enable_matrix) ⇒ Boolean
Whether the [propertySpaceDrawer:matrix] property is enabled.
#enable_matrix? ⇒ Boolean
Whether the [propertySpaceDrawer:matrix] property is enabled.
#get_types_for_locations(locations) ⇒ GtkSource::SpaceTypeFlags
If only one location is specified, this function returns what kind of white spaces are drawn at that location.
The value is retrieved from the [propertySpaceDrawer:matrix] property.
If several locations are specified, this function returns the logical AND for those locations. Which means that if a certain kind of white space is present in the return value, then that kind of white space is drawn at all the specified locations.
#matrix ⇒ GLib::Variant
The property is a [structGLib.Variant] property to specify where and what kind of white spaces to draw.
The [structGLib.Variant] is of type "au", an array of unsigned integers. Each
integer is a combination of [flagsSpaceTypeFlags]. There is one
integer for each [flagsSpaceLocationFlags], in the same order as
they are defined in the enum (%GTK_SOURCE_SPACE_LOCATION_NONE and
%GTK_SOURCE_SPACE_LOCATION_ALL are not taken into account).
If the array is shorter than the number of locations, then the value for the missing locations will be %GTK_SOURCE_SPACE_TYPE_NONE.
By default, %GTK_SOURCE_SPACE_TYPE_ALL is set for all locations.4
#matrix=(matrix) ⇒ GLib::Variant
The property is a [structGLib.Variant] property to specify where and what kind of white spaces to draw.
The [structGLib.Variant] is of type "au", an array of unsigned integers. Each
integer is a combination of [flagsSpaceTypeFlags]. There is one
integer for each [flagsSpaceLocationFlags], in the same order as
they are defined in the enum (%GTK_SOURCE_SPACE_LOCATION_NONE and
%GTK_SOURCE_SPACE_LOCATION_ALL are not taken into account).
If the array is shorter than the number of locations, then the value for the missing locations will be %GTK_SOURCE_SPACE_TYPE_NONE.
By default, %GTK_SOURCE_SPACE_TYPE_ALL is set for all locations.4
#set_types_for_locations(locations, types) ⇒ nil
Modifies the [propertySpaceDrawer:matrix] property at the specified locations.