An easy way to test all these features is to use the test-widget mini-program
provided in the GtkSourceView repository, in the tests/ directory.
GtkSourceView as GtkBuildable
The GtkSourceView implementation of the gtk.buildable.Buildable interface exposes the
property@View:completion object with the internal-child "completion".
An example of a UI definition fragment with GtkSourceView:
Gtk CSS provides the best way to change the font for a gtksource.view.View in a
manner that allows for components like class@Map to scale the desired
font.
Subclass of gtk.text_view.TextView.
gtksource.view.View is the main class of the GtkSourceView library. Use a class@Buffer to display text with a gtksource.view.View.
This class provides:
An easy way to test all these features is to use the test-widget mini-program provided in the GtkSourceView repository, in the tests/ directory.
GtkSourceView as GtkBuildable
The GtkSourceView implementation of the gtk.buildable.Buildable interface exposes the property@View:completion object with the internal-child "completion".
An example of a UI definition fragment with GtkSourceView:
Changing the Font
Gtk CSS provides the best way to change the font for a gtksource.view.View in a manner that allows for components like class@Map to scale the desired font.
If you need to adjust the font or size of font within a portion of the document only, you should use a gtk.text_tag.TextTag with the gtk.text_tag.TextTag.utf8 or gtk.text_tag.TextTag.gdouble set so that the font size may be scaled relative to the default font set in CSS.