Tepl.Panel1

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Grid Gtk.Grid Gtk.Container->Gtk.Grid Tepl.Panel1 Tepl.Panel1 Gtk.Grid->Tepl.Panel1 Gtk.Orientable->Gtk.Grid Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Grid (21), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

class

new_for_left_side_panel ()

add_component (component, name, title, icon_name)

get_stack ()

provide_active_component_gsetting (settings, setting_key)

restore_state_from_gsettings ()

save_state_to_gsettings ()

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Grid (5), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Child Properties

Inherited:

Gtk.Grid (4)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent

Gtk.Grid

r

Class Details

class Tepl.Panel1(**kwargs)
Bases:

Gtk.Grid

Abstract:

No

Structure:

Tepl.Panel1Class

classmethod new()
Returns:

a new Tepl.Panel1.

Return type:

Tepl.Panel1

Creates a new Tepl.Panel1 containing only an empty Gtk.Stack that can be retrieved with Tepl.Panel1.get_stack().

New in version 5.0.

classmethod new_for_left_side_panel()
Returns:

a new left side Tepl.Panel1.

Return type:

Tepl.Panel1

Creates a new Tepl.Panel1 intended to be used as a side panel added on the left side inside a Gtk.Window.

It contains:

New in version 5.0.

add_component(component, name, title, icon_name)
Parameters:
  • component (Gtk.Widget) – the child Gtk.Widget to add to the Gtk.Stack of self.

  • name (str) – the name for component.

  • title (str) – a human-readable title for component.

  • icon_name (str or None) – the icon name for component, or None.

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

New in version 5.0.

get_stack()
Returns:

the Gtk.Stack widget of self (a direct child Gtk.Widget of self).

Return type:

Gtk.Stack

New in version 5.0.

provide_active_component_gsetting(settings, setting_key)
Parameters:

Provides a Gio.Settings key for saving and restoring the Gtk.Stack :visible-child-name property of the Gtk.Stack belonging to self.

This function just stores settings and setting_key for further use by Tepl.Panel1.restore_state_from_gsettings() and Tepl.Panel1.save_state_to_gsettings(). It doesn’t bind the Gio.Settings key to the property, because each main window containing a Tepl.Panel1 needs to be able to have a different state, and have more control over when that state is restored and saved. Once a Tepl.Panel1 is created and fully populated, the setting can be restored. The setting can be saved according to the current main window before creating a new main window, and of course on application exit.

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

New in version 5.0.

restore_state_from_gsettings()

Restores the state of self according to the provided Gio.Settings.

This function must be called when all components have been added to the Gtk.Stack of self.

New in version 5.0.

save_state_to_gsettings()

Saves the current state of self to the provided Gio.Settings.

New in version 5.0.