TeplApplicationWindow: Tepl 3 Reference Manual

## TeplApplicationWindow TeplApplicationWindow — An extension of GtkApplicationWindow |

## Functions

TeplApplicationWindow * | tepl_application_window_get_from_gtk_application_window ()
GtkApplicationWindow * | tepl_application_window_get_application_window ()
void | tepl_application_window_set_tab_group ()

## Properties

GtkApplicationWindow * | application-window | Read / Write / Construct Only

## Types and Values

| TeplApplicationWindow

## Object Hierarchy

        GObject
        ╰── TeplApplicationWindow

## Implemented Interfaces

TeplApplicationWindow implements TeplTabGroup.

## Includes

    #include <tepl/tepl.h>

## Description

TeplApplicationWindow extends the GtkApplicationWindow class.

An application needs to call `tepl_application_window_set_tab_group()` to benefit from the TeplTabGroup interface implemented by this class.

Note that TeplApplicationWindow extends the GtkApplicationWindow class but without subclassing it, because several libraries might want to extend GtkApplicationWindow and an application needs to be able to use all those extensions at the same time.

### GActions

This class adds the following GAction's to the GtkApplicationWindow. Corresponding AmtkActionInfo's are available with `tepl_application_get_tepl_action_info_store()`.

#### For the File menu

- `"win.tepl-new-file"`: creates a new TeplTab, appends it with `tepl_tab_group_append_tab()` and set it as the active tab.

#### For the Edit menu

The following actions require the `AMTK_FACTORY_IGNORE_ACCELS_FOR_APP` flag, because otherwise accelerators don't work in other text widgets than the active view (e.g. in a GtkEntry):

- `"win.tepl-cut"`: calls `tepl_view_cut_clipboard()` on the active view.

- `"win.tepl-copy"`: calls `tepl_view_copy_clipboard()` on the active view.

- `"win.tepl-paste"`: calls `tepl_view_paste_clipboard()` on the active view.

- `"win.tepl-delete"`: calls `tepl_view_delete_selection()` on the active view.

- `"win.tepl-select-all"`: calls `tepl_view_select_all()` on the active view.

See the `tepl_menu_shell_append_edit_actions()` convenience function.

## Functions

### tepl_application_window_get_from_gtk_application_window ()

    TeplApplicationWindow *
    tepl_application_window_get_from_gtk_application_window
                                   (GtkApplicationWindow *gtk_window);

Returns the TeplApplicationWindow of `gtk_window` . The returned object is guaranteed to be the same for the lifetime of `gtk_window` .

#### Parameters

gtk_window | a GtkApplicationWindow. |

#### Returns

the TeplApplicationWindow of `gtk_window` .

[transfer none]

Since: 2.0

### tepl_application_window_get_application_window ()

    GtkApplicationWindow *
    tepl_application_window_get_application_window
                                   (TeplApplicationWindow *tepl_window);

#### Parameters

tepl_window | a TeplApplicationWindow. |

#### Returns

the GtkApplicationWindow of `tepl_window` .

[transfer none]

Since: 2.0

### tepl_application_window_set_tab_group ()

    void
    tepl_application_window_set_tab_group (TeplApplicationWindow *tepl_window,
                                           TeplTabGroup *tab_group);

Sets the TeplTabGroup of `tepl_window` . This function can be called only once, it is not possible to change the TeplTabGroup afterwards (this restriction may be lifted in the future if there is a compelling use-case).

TeplApplicationWindow implements the TeplTabGroup interface by delegating the requests to `tab_group` .

#### Parameters

tepl_window | a TeplApplicationWindow. |
tab_group | a TeplTabGroup. |

Since: 3.0

## Types and Values

### TeplApplicationWindow

    typedef struct _TeplApplicationWindow TeplApplicationWindow;

## Property Details

### The `“application-window”` property

      “application-window”       GtkApplicationWindow *

The GtkApplicationWindow.

Flags: Read / Write / Construct Only

Since: 2.0