GeditEncodingsComboBox: gedit Reference Manual

## GeditEncodingsComboBox GeditEncodingsComboBox |

## Functions

GtkWidget * | gedit_encodings_combo_box_new ()
const GtkSourceEncoding * | gedit_encodings_combo_box_get_selected_encoding ()
void | gedit_encodings_combo_box_set_selected_encoding ()

## Properties

gboolean | save-mode | Read / Write / Construct

## Types and Values

| GeditEncodingsComboBox

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkComboBox
                            ╰── GeditEncodingsComboBox

## Implemented Interfaces

GeditEncodingsComboBox implements AtkImplementorIface, GtkBuildable, GtkCellLayout and GtkCellEditable.

## Description

## Functions

### gedit_encodings_combo_box_new ()

    GtkWidget *
    gedit_encodings_combo_box_new (gboolean save_mode);

Creates a new encodings combo box object. If `save_mode` is `FALSE`, it means that the combo box is used for loading a content (e.g. a file), so the row "Automatically Detected" is added. For saving a content, the encoding must be provided.

#### Parameters

save_mode | whether the combo box is used for saving a content. |

#### Returns

a new GeditEncodingsComboBox object.

### gedit_encodings_combo_box_get_selected_encoding ()

    const GtkSourceEncoding *
    gedit_encodings_combo_box_get_selected_encoding
                                   (GeditEncodingsComboBox *menu);

#### Parameters

menu | a GeditEncodingsComboBox. |

#### Returns

the selected GtkSourceEncoding, or `NULL` if the encoding should be auto-detected (only for loading mode, not for saving).

### gedit_encodings_combo_box_set_selected_encoding ()

    void
    gedit_encodings_combo_box_set_selected_encoding
                                   (GeditEncodingsComboBox *menu,
                                    const GtkSourceEncoding *encoding);

Sets the selected encoding.

#### Parameters

menu | a GeditEncodingsComboBox. |
encoding | the GtkSourceEncoding. |

## Types and Values

### GeditEncodingsComboBox

    typedef struct _GeditEncodingsComboBox GeditEncodingsComboBox;

## Property Details

### The `“save-mode”` property

      “save-mode”                gboolean

Whether the combo box should be used for saving a content. If `FALSE`, the combo box is used for loading a content (e.g. a file) and the row "Automatically Detected" is added.

Owner: GeditEncodingsComboBox

Flags: Read / Write / Construct

Default value: FALSE