TeplPanel

TeplPanel — Side or bottom panel container

Functions

Types and Values

struct TeplPanel

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkGrid
                    ╰── TeplPanel

Implemented Interfaces

TeplPanel implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Includes

#include <tepl/tepl.h>

Description

TeplPanel permits to create a side or bottom panel that contains several components.

TeplPanel is a GtkGrid subclass containing only one child GtkWidget by default: the GtkStack that can be retrieved with tepl_panel_get_stack().

Functions

tepl_panel_new ()

TeplPanel *
tepl_panel_new (void);

Creates a new TeplPanel containing only an empty GtkStack that can be retrieved with tepl_panel_get_stack().

Returns

a new TeplPanel.

[transfer floating]

Since: 5.0

tepl_panel_new_for_left_side_panel ()

TeplPanel *
tepl_panel_new_for_left_side_panel (void);

Creates a new TeplPanel intended to be used as a side panel added on the left side inside a GtkWindow.

It contains:

Returns

a new left side TeplPanel.

[transfer floating]

Since: 5.0

tepl_panel_get_stack ()

GtkStack *
tepl_panel_get_stack (TeplPanel *panel);

Parameters

panel

a TeplPanel.

 

Returns

the GtkStack widget of panel (a direct child GtkWidget of panel ).

[transfer none]

Since: 5.0

tepl_panel_add_component ()

void
tepl_panel_add_component (TeplPanel *panel,
                          GtkWidget *component,
                          const gchar *name,
                          const gchar *title,
                          const gchar *icon_name);

The equivalent of gtk_stack_add_titled(), with an optional icon_name to set the “icon-name” GtkStack child property.

Parameters

panel

a TeplPanel.

 

component

the child GtkWidget to add to the GtkStack of panel .

 

name

the name for component .

 

title

a human-readable title for component .

 

icon_name

the icon name for component , or NULL.

[nullable]

Since: 5.0

tepl_panel_provide_active_component_gsetting ()

void
tepl_panel_provide_active_component_gsetting
                               (TeplPanel *panel,
                                GSettings *settings,
                                const gchar *setting_key);

Provides a GSettings key for saving and restoring the “visible-child-name” property of the GtkStack belonging to panel .

This function just stores settings and setting_key for further use by tepl_panel_restore_state_from_gsettings() and tepl_panel_save_state_to_gsettings().

Note that only one settings /setting_key pair is stored by panel for further use, if you call this function twice on the same panel , the second call overrides the first one.

Parameters

panel

a TeplPanel.

 

settings

a GSettings object.

 

setting_key

a GSettings key of type string.

 

Since: 5.0

tepl_panel_restore_state_from_gsettings ()

void
tepl_panel_restore_state_from_gsettings
                               (TeplPanel *panel);

Restores the state of panel according to the provided GSettings.

This function must be called when all components have been added to the GtkStack of panel .

Parameters

panel

a TeplPanel.

 

Since: 5.0

tepl_panel_save_state_to_gsettings ()

void
tepl_panel_save_state_to_gsettings (TeplPanel *panel);

Saves the current state of panel to the provided GSettings.

Parameters

panel

a TeplPanel.

 

Since: 5.0

Types and Values

struct TeplPanel

struct TeplPanel;