TeplPrefs: Tepl 6 Reference Manual

## TeplPrefs TeplPrefs — Preferences widgets to configure a text editor |

## Functions

GtkWidget * | tepl_prefs_create_font_component ()
GtkWidget * | tepl_prefs_create_color_scheme_component ()
GtkWidget * | tepl_prefs_create_display_line_numbers_checkbutton ()
GtkWidget * | tepl_prefs_create_tab_width_spinbutton ()
GtkWidget * | tepl_prefs_create_insert_spaces_component ()
GtkWidget * | tepl_prefs_create_highlighting_component ()
GtkWidget * | tepl_prefs_create_files_component ()

## Includes

    #include <tepl/tepl.h>

## Description

Functions to create GUI elements that are useful for a preferences dialog or panel. In order to configure a text editor.

## Functions

### tepl_prefs_create_font_component ()

    GtkWidget *
    tepl_prefs_create_font_component (GSettings *settings,
                                      const gchar *use_default_font_key,
                                      const gchar *editor_font_key);

#### Parameters

settings | a GSettings. |
use_default_font_key | a key part of `settings` to store whether to use the system font. The type of the key must be a boolean. |
editor_font_key | a key part of `settings` to store the editor font. The type of the key must be a string. |

#### Returns

A component for configuring the font.

[transfer floating]

Since: 6.2

### tepl_prefs_create_color_scheme_component ()

    GtkWidget *
    tepl_prefs_create_color_scheme_component
                                   (GSettings *settings,
                                    const gchar *style_scheme_key);

This function creates a component containing a TeplStyleSchemeChooserWidget.

#### Parameters

settings | a GSettings. |
style_scheme_key | a key part of `settings` to store the style scheme ID. The type of the key must be a string. |

#### Returns

A component for choosing the GtkSourceStyleScheme to use.

[transfer floating]

Since: 6.2

### tepl_prefs_create_display_line_numbers_checkbutton ()

    GtkWidget *
    tepl_prefs_create_display_line_numbers_checkbutton
                                   (GSettings *settings,
                                    const gchar *display_line_numbers_key);

#### Parameters

settings | a GSettings. |
display_line_numbers_key | a key part of `settings` . The type of the key must be a boolean. |

#### Returns

A GtkCheckButton intended for “show-line-numbers”.

[transfer floating]

Since: 6.2

### tepl_prefs_create_tab_width_spinbutton ()

    GtkWidget *
    tepl_prefs_create_tab_width_spinbutton
                                   (GSettings *settings,
                                    const gchar *tab_width_key);

#### Parameters

settings | a GSettings. |
tab_width_key | a key part of `settings` . The type of the key must be an unsigned integer, with a range. |

#### Returns

A widget containing a GtkSpinButton intended for “tab-width”.

[transfer floating]

Since: 6.2

### tepl_prefs_create_insert_spaces_component ()

    GtkWidget *
    tepl_prefs_create_insert_spaces_component
                                   (GSettings *settings,
                                    const gchar *insert_spaces_key,
                                    const gchar *smart_backspace_key);

#### Parameters

settings | a GSettings. |
insert_spaces_key | a key part of `settings` . The type of the key must be a boolean. |
smart_backspace_key | a key part of `settings` . The type of the key must be a boolean. |

#### Returns

a component intended for “insert-spaces-instead-of-tabs” and “smart-backspace”.

[transfer floating]

Since: 6.2

### tepl_prefs_create_highlighting_component ()

    GtkWidget *
    tepl_prefs_create_highlighting_component
                                   (GSettings *settings,
                                    const gchar *highlight_current_line_key,
                                    const gchar *highlight_matching_brackets_key);

#### Parameters

settings | a GSettings. |
highlight_current_line_key | a key part of `settings` . The type of the key must be a boolean. |
highlight_matching_brackets_key | a key part of `settings` . The type of the key must be a boolean. |

#### Returns

a component intended for “highlight-current-line” and “highlight-matching-brackets”.

[transfer floating]

Since: 6.2

### tepl_prefs_create_files_component ()

    GtkWidget *
    tepl_prefs_create_files_component (GSettings *settings,
                                       const gchar *create_backup_copy_key,
                                       const gchar *auto_save_key,
                                       const gchar *auto_save_interval);

#### Parameters

settings | a GSettings. |
create_backup_copy_key | a key part of `settings` . The type of the key must be a boolean. Intended to be used with `TEPL_FILE_SAVER_FLAGS_CREATE_BACKUP` (for example). |
auto_save_key | a key part of `settings` . The type of the key must be a boolean. Whether to autosave files. |
auto_save_interval | a key part of `settings` . The type of the key must be an unsigned integer, with a range. The interval is in minutes. |

#### Returns

a component for some files preferences.

[transfer floating]

Since: 6.2