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

## Functions

GtkWidget * | tepl_prefs_create_font_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 ()
GtkWidget * | tepl_prefs_create_theme_variant_combo_box ()
GtkWidget * | tepl_prefs_create_right_margin_component ()
GtkWidget * | tepl_prefs_create_display_statusbar_checkbutton ()
GtkWidget * | tepl_prefs_create_display_grid_checkbutton ()

## 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_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

### tepl_prefs_create_theme_variant_combo_box ()

    GtkWidget *
    tepl_prefs_create_theme_variant_combo_box
                                   (GSettings *settings,
                                    const gchar *theme_variant_key);

#### Parameters

settings | a GSettings. |
theme_variant_key | a key part of `settings` . Its type must be an enum for TeplSettingsThemeVariant. |

#### Returns

A widget containing a GtkComboBoxText intended to choose a TeplSettingsThemeVariant.

[transfer floating]

Since: 6.10

### tepl_prefs_create_right_margin_component ()

    GtkWidget *
    tepl_prefs_create_right_margin_component
                                   (GSettings *settings,
                                    const gchar *display_right_margin_key,
                                    const gchar *right_margin_position_key);

#### Parameters

settings | a GSettings. |
display_right_margin_key | a key part of `settings` . The type of the key must be a boolean. |
right_margin_position_key | a key part of `settings` . The type of the key must be an unsigned integer. |

#### Returns

a component intended for “show-right-margin” and “right-margin-position”.

[transfer floating]

Since: 6.10

### tepl_prefs_create_display_statusbar_checkbutton ()

    GtkWidget *
    tepl_prefs_create_display_statusbar_checkbutton
                                   (GSettings *settings,
                                    const gchar *display_statusbar_key);

#### Parameters

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

#### Returns

A GtkCheckButton intended for configuring the visibility of a GtkStatusbar.

[transfer floating]

Since: 6.10

### tepl_prefs_create_display_grid_checkbutton ()

    GtkWidget *
    tepl_prefs_create_display_grid_checkbutton
                                   (GSettings *settings,
                                    const gchar *background_pattern_key);

#### Parameters

settings | a GSettings. |
background_pattern_key | a key part of `settings` . Its type must be an enum for GtkSourceBackgroundPatternType. |

#### Returns

a GtkCheckButton intended for `GTK_SOURCE_BACKGROUND_PATTERN_TYPE_GRID`.

[transfer floating]

Since: 6.10