## TeplPanel TeplPanel — Side or bottom panel interface |

## Functions

TeplPanelItem * | tepl_panel_add ()
void | tepl_panel_remove ()
void | tepl_panel_set_active ()

## Types and Values

| TeplPanel
struct | TeplPanelInterface

## Object Hierarchy

        GInterface
        ╰── TeplPanel

## Prerequisites

TeplPanel requires GObject.

## Known Implementations

TeplPanel is implemented by TeplPanelContainer.

## Includes

    #include <tepl/tepl.h>

## Description

TeplPanel represents a panel that is usually shown on the side or at the bottom (inside a main window), and can contain several items.

## Functions

### tepl_panel_add ()

    TeplPanelItem *
    tepl_panel_add (TeplPanel *panel,
                    GtkWidget *widget,
                    const gchar *name,
                    const gchar *title,
                    const gchar *icon_name);

Adds an item to the panel. See TeplPanelItem for the meaning of the parameters.

`widget` should have its “visible” property set to `TRUE` in order to be correctly shown in the panel.

A TeplPanelItem object is returned, which can be used as a parameter to other TeplPanel functions (TeplPanelItem serves as a kind of handle).

Note that TeplPanel also owns a reference to the TeplPanelItem. So either store the TeplPanelItem for later use, or unref it directly after calling this function.

#### Parameters

panel | a TeplPanel. |
widget | a GtkWidget. |
name | the name. | [nullable]
title | the title. | [nullable]
icon_name | the icon-name. | [nullable]

#### Returns

a new TeplPanelItem object.

[transfer full][nullable]

Since: 6.8

### tepl_panel_remove ()

    void
    tepl_panel_remove (TeplPanel *panel,
                       TeplPanelItem *item);

Removes an item from `panel` .

#### Parameters

panel | a TeplPanel. |
item | the TeplPanelItem to remove. |

Since: 6.8

### tepl_panel_set_active ()

    void
    tepl_panel_set_active (TeplPanel *panel,
                           TeplPanelItem *item);

Sets `item` to be the one that is currently shown in `panel` .

This is different than setting the “visible” property to `TRUE`. All GtkWidget's of a `panel` should have their “visible” property set to `TRUE` all the time, but only one TeplPanelItem is shown at a time.

#### Parameters

panel | a TeplPanel. |
item | a TeplPanelItem. |

Since: 6.8

## Types and Values

### TeplPanel

    typedef struct _TeplPanel TeplPanel;

### struct TeplPanelInterface

    struct TeplPanelInterface {
    	GTypeInterface parent_interface;

    	TeplPanelItem * (*add)		(TeplPanel   *panel,
    					 GtkWidget   *widget,
    					 const gchar *name,
    					 const gchar *title,
    					 const gchar *icon_name);

    	void		(*remove) (TeplPanel     *panel,
    					 TeplPanelItem *item);

    	void		(*set_active) (TeplPanel     *panel,
    					 TeplPanelItem *item);
    };

The virtual function table for TeplPanel.

#### Members

GTypeInterface `parent_interface`; | The parent interface. |
`add` () | The virtual function pointer for `tepl_panel_add()`. By default, returns `NULL`. |
`remove` () | The virtual function pointer for `tepl_panel_remove()`. By default, does nothing. |
`set_active` () | The virtual function pointer for `tepl_panel_set_active()`. By default, does nothing. |

Since: 6.8