module Gtksv_utils:sig..end
Using the same sourceview preferences through all applications which use the LablGtkSourceView2 library.
Use the source_language_manager and source_style_scheme_manager
below to get the languages to use in your code views.
val source_language_manager : GSourceView2.source_language_manager
val sort_languages_by_name : GSourceView2.source_language list -> GSourceView2.source_language listSort the given list of languages by name.
val available_source_languages : ?manager:GSourceView2.source_language_manager ->
unit -> GSourceView2.source_language listavailable_source_languages () returns the list of languages known by the
language_manager.
manager : can be given to use an alternative language_managerval source_language_by_name : ?manager:GSourceView2.source_language_manager ->
string -> GSourceView2.source_language optionsource_language_by_name ?manager name returns the language with
the given name, or None if no such language was found.
val source_style_scheme_manager : GSourceView2.source_style_scheme_managerThis source style scheme manager has an extended search path to look for styles in the user's ~/.mlgtksourceview2 directory first.
val available_source_style_schemes : ?manager:GSourceView2.source_style_scheme_manager ->
unit -> GSourceView2.source_style_scheme list
val source_style_scheme_by_name : ?manager:GSourceView2.source_style_scheme_manager ->
string -> GSourceView2.source_style_scheme optionsource_style_scheme_by_name ?manager name returns the style scheme with
the given name, or None if no such style scheme was found.
val store_style_scheme_selection : GSourceView2.source_style_scheme option -> unitStore the name of the given style scheme in the user's personal files.
val read_style_scheme_selection : ?manager:GSourceView2.source_style_scheme_manager ->
unit -> GSourceView2.source_style_scheme optionRead the name of the selected style scheme from the user's personal files.
manager : can specify the style scheme manager to use instead of
Gtksv_utils.source_style_scheme_manager.val source_style_scheme : unit -> GSourceView2.source_style_scheme optionReturn the currently selected style scheme, if any.
val set_source_style_scheme : GSourceView2.source_style_scheme option -> unitSet the currently selected style scheme, if any.
val register_source_buffer : GSourceView2.source_buffer -> unitRegister a source buffer so that each time the scheme returned
by Gtksv_utils.source_style_scheme changes, the new scheme is set in
the buffer. It is also set when registering the buffer.
val unregister_source_buffer : GSourceView2.source_buffer -> unitUnregister the given source buffer.
val apply_source_style_scheme_to_registered_buffers : GSourceView2.source_style_scheme option -> unitApply the given style scheme to the registered buffers.
type source_view_props
val store_sourceview_props : source_view_props -> unitStore the given source view properties in the user's personal files.
val read_sourceview_props : unit -> source_view_propsRead the source view properties from the user's personal files. If there is no properties file, default properties are returned.
val register_source_view : GSourceView2.source_view -> unitRegister a source view so that each time the function Gtksv_utils.read_sourceview_props
is called, the properties read are applied to every registered view.
The sourceview is automatically unregistered when it is destroyed.
val apply_sourceview_props : GSourceView2.source_view -> source_view_props -> unitApply the given source view properties to the given source view.
val apply_sourceview_props_to_registered : source_view_props -> unitApply the given source view properties to the registered views.
class source_style_scheme_box :?manager:GSourceView2.source_style_scheme_manager -> ?current:GSourceView2.source_style_scheme option -> ?preview:GSourceView2.source_style_scheme option -> unit -> unit ->object..end
This box can be used to make the user set the source style scheme.
val edit_source_style_scheme : ?modal:bool ->
?manager:GSourceView2.source_style_scheme_manager ->
?current:GSourceView2.source_style_scheme option ->
?preview:(GSourceView2.source_style_scheme option -> unit) -> unit -> unitMake the user set his source style scheme.
Then Gtksv_utils.store_style_scheme_selection is used to save the changes or
Gtksv_utils.read_style_scheme_selection is used to restore the original values.
preview : is the function called to apply the shcheme when
the user makes a change or when he closes the window with "Ok".class sourceview_props_box :(source_view_props -> unit) ->object..end
This box can be used to make the user set source view properties.
val edit_sourceview_props : ?modal:bool ->
?preview:(source_view_props -> unit) -> unit -> unitMake the user set his source view properties.
Then Gtksv_utils.store_sourceview_props is used to save the changes or
Gtksv_utils.read_sourceview_props is used to restore the original values.
preview : is the function called to apply the properties when
the user makes a change or when he closes the window with "Ok".