## TeplTabGroup TeplTabGroup — Interface for a group of TeplTab's |

## Functions

GList * | tepl_tab_group_get_tabs ()
GList * | tepl_tab_group_get_views ()
GList * | tepl_tab_group_get_buffers ()
TeplTab * | tepl_tab_group_get_active_tab ()
void | tepl_tab_group_set_active_tab ()
TeplView * | tepl_tab_group_get_active_view ()
TeplBuffer * | tepl_tab_group_get_active_buffer ()
void | tepl_tab_group_append_tab ()

## Properties

TeplBuffer * | active-buffer | Read
TeplTab * | active-tab | Read / Write
TeplView * | active-view | Read

## Types and Values

| TeplTabGroup
struct | TeplTabGroupInterface

## Object Hierarchy

        GInterface
        ╰── TeplTabGroup

## Prerequisites

TeplTabGroup requires GObject.

## Known Implementations

TeplTabGroup is implemented by TeplApplicationWindow, TeplNotebook and TeplTab.

## Includes

    #include <tepl/tepl.h>

## Description

The `tepl_tab_group_get_tabs()` function permits to get the list of TeplTab's. The `tepl_tab_group_get_active_tab()` function permits to get the TeplTab currently shown in the TeplTabGroup.

TeplTabGroup also contains convenience functions to get TeplView's and TeplBuffer's instead of TeplTab's.

## Functions

### tepl_tab_group_get_tabs ()

    GList *
    tepl_tab_group_get_tabs (TeplTabGroup *tab_group);

Gets the list of TeplTab's contained in `tab_group` .

If `tab_group` contains non-TeplTab children, those will not be present in the returned list. In other words, it is not guaranteed that the index of a TeplTab in the returned GList has the same child index in the `tab_group` container.

#### Parameters

tab_group | a TeplTabGroup. |

#### Returns

the list of all the TeplTab's contained in `tab_group` .

[transfer container][element-type TeplTab]

Since: 3.0

### tepl_tab_group_get_views ()

    GList *
    tepl_tab_group_get_views (TeplTabGroup *tab_group);

Convenience function.

#### Parameters

tab_group | a TeplTabGroup. |

#### Returns

like `tepl_tab_group_get_tabs()`, but returns TeplView's.

[transfer container][element-type TeplView]

Since: 3.0

### tepl_tab_group_get_buffers ()

    GList *
    tepl_tab_group_get_buffers (TeplTabGroup *tab_group);

Convenience function.

#### Parameters

tab_group | a TeplTabGroup. |

#### Returns

like `tepl_tab_group_get_tabs()`, but returns TeplBuffer's.

[transfer container][element-type TeplBuffer]

Since: 3.0

### tepl_tab_group_get_active_tab ()

    TeplTab *
    tepl_tab_group_get_active_tab (TeplTabGroup *tab_group);

#### Parameters

tab_group | a TeplTabGroup. |

#### Returns

the TeplTab currently shown in `tab_group` .

[transfer none][nullable]

Since: 3.0

### tepl_tab_group_set_active_tab ()

    void
    tepl_tab_group_set_active_tab (TeplTabGroup *tab_group,
                                   TeplTab *tab);

Sets the “active-tab”. `tab` must be part of `tab_group` .

#### Parameters

tab_group | a TeplTabGroup. |
tab | a TeplTab part of `tab_group` . |

Since: 3.0

### tepl_tab_group_get_active_view ()

    TeplView *
    tepl_tab_group_get_active_view (TeplTabGroup *tab_group);

Convenience function.

#### Parameters

tab_group | a TeplTabGroup. |

#### Returns

the TeplView of the active tab.

[transfer none][nullable]

Since: 3.0

### tepl_tab_group_get_active_buffer ()

    TeplBuffer *
    tepl_tab_group_get_active_buffer (TeplTabGroup *tab_group);

Convenience function.

#### Parameters

tab_group | a TeplTabGroup. |

#### Returns

the TeplBuffer of the active tab.

[transfer none][nullable]

Since: 3.0

### tepl_tab_group_append_tab ()

    void
    tepl_tab_group_append_tab (TeplTabGroup *tab_group,
                               TeplTab *tab,
                               gboolean jump_to);

Appends `tab` to `tab_group` .

#### Parameters

tab_group | a TeplTabGroup. |
tab | a TeplTab. |
jump_to | whether to set `tab` as the active tab after appending it. |

Since: 3.0

## Types and Values

### TeplTabGroup

    typedef struct _TeplTabGroup TeplTabGroup;

### struct TeplTabGroupInterface

    struct TeplTabGroupInterface {
    	GTypeInterface parent_interface;

    	GList *		(*get_tabs)		(TeplTabGroup *tab_group);

    	TeplTab * (*get_active_tab) (TeplTabGroup *tab_group);

    	void		(*set_active_tab) (TeplTabGroup *tab_group,
    						 TeplTab      *tab);

    	void		(*append_tab_vfunc) (TeplTabGroup *tab_group,
    						 TeplTab      *tab);
    };

The virtual function table for TeplTabGroup. When implementing one of the vfunc, you can assume that the pre-conditions are already checked (the parameters are valid).

#### Members

GTypeInterface `parent_interface`; | The parent interface. |
`get_tabs` () | Virtual function pointer for `tepl_tab_group_get_tabs()`. By default, `NULL` is returned. When implementing this vfunc, GList nodes must be created only for TeplTab children; if the TeplTabGroup contains a non-TeplTab child, it must be skipped. See the documentation of `tepl_tab_group_get_tabs()`. |
`get_active_tab` () | Virtual function pointer for `tepl_tab_group_get_active_tab()`. By default, `NULL` is returned. |
`set_active_tab` () | Virtual function pointer for `tepl_tab_group_set_active_tab()`. Does nothing by default. |
`append_tab_vfunc` () | Virtual function pointer for `tepl_tab_group_append_tab()`, without the `jump_to` parameter. The default implementation prints a warning about the operation not being supported. |

Since: 3.0

## Property Details

### The `“active-buffer”` property

      “active-buffer”            TeplBuffer *

The TeplBuffer of the active tab.

Owner: TeplTabGroup

Flags: Read

Since: 3.0

### The `“active-tab”` property

      “active-tab”               TeplTab *

The TeplTab currently shown.

Owner: TeplTabGroup

Flags: Read / Write

Since: 3.0

### The `“active-view”` property

      “active-view”              TeplView *

The TeplView of the active tab.

Owner: TeplTabGroup

Flags: Read

Since: 3.0