## IdeEditorSidebar IdeEditorSidebar — The left sidebar for the editor |

## Functions

GtkWidget * | ide_editor_sidebar_new ()
const gchar * | ide_editor_sidebar_get_section_id ()
void | ide_editor_sidebar_set_section_id ()
void | ide_editor_sidebar_add_section ()

## Types and Values

#define | IDE_TYPE_EDITOR_SIDEBAR
| IdeEditorSidebar

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── DzlBin
                            ╰── DzlDockRevealer
                                ╰── DzlDockBinEdge
                                    ╰── IdePanel
                                        ╰── IdeEditorSidebar

## Implemented Interfaces

IdeEditorSidebar implements AtkImplementorIface, GtkBuildable and DzlDockItem.

## Description

The IdeEditorSidebar is the widget displayed on the left of the IdeEditorSurface. It contains an open document list, and then the various sections that have been added to the sidebar.

Use `ide_editor_sidebar_add_section()` to add a section to the sidebar.

## Functions

### ide_editor_sidebar_new ()

    GtkWidget *
    ide_editor_sidebar_new (void);

Creates a new IdeEditorSidebar instance.

#### Returns

A new IdeEditorSidebar.

[transfer full]

Since: 3.32

### ide_editor_sidebar_get_section_id ()

    const gchar *
    ide_editor_sidebar_get_section_id (IdeEditorSidebar *self);

Gets the id of the current section.

#### Parameters

self | a IdeEditorSidebar |

#### Returns

The id of the current section if it registered one.

[nullable]

Since: 3.32

### ide_editor_sidebar_set_section_id ()

    void
    ide_editor_sidebar_set_section_id (IdeEditorSidebar *self,
                                       const gchar *section_id);

Changes the current section to `section_id` .

#### Parameters

self | a IdeEditorSidebar |
section_id | a section id to switch to |

Since: 3.32

### ide_editor_sidebar_add_section ()

    void
    ide_editor_sidebar_add_section (IdeEditorSidebar *self,
                                    const gchar *id,
                                    const gchar *title,
                                    const gchar *icon_name,
                                    const gchar *menu_id,
                                    const gchar *menu_icon_name,
                                    GtkWidget *section,
                                    gint priority);

Adds a new section to the IdeEditorSidebar. `icon_name` will be used to display an icon for the section. `title` should contain the title to display above the section.

If you want to be able to switch to the section manually, you should set `id` so that `ide_editor_sidebar_set_section_id()` will allow you to use id.

To remove your section, call `gtk_widget_destroy()` on `section` .

#### Parameters

self | a IdeEditorSidebar |
id | an optional id for the section. | [nullable]
title | the title of the section |
icon_name | the icon name for the section's icon |
menu_id | an optional menu-id to display. | [nullable]
menu_icon_name | an optional icon-name for displaying the menu. | [nullable]
section | the widget to display in the sidebar |

Since: 3.32

## Types and Values

### IDE_TYPE_EDITOR_SIDEBAR

    #define IDE_TYPE_EDITOR_SIDEBAR (ide_editor_sidebar_get_type())

### IdeEditorSidebar

    typedef struct _IdeEditorSidebar IdeEditorSidebar;