Tepl.Panel1¶
- 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 |
|
class |
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.Grid (5), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class Tepl.Panel1(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
Tepl.Panel1.- Return type:
Creates a new
Tepl.Panel1containing only an emptyGtk.Stackthat can be retrieved withTepl.Panel1.get_stack().New in version 5.0.
- classmethod new_for_left_side_panel()¶
- Returns:
a new left side
Tepl.Panel1.- Return type:
Creates a new
Tepl.Panel1intended to be used as a side panel added on the left side inside aGtk.Window.It contains:
A close button that hides the
Tepl.Panel1when clicked.A
Gtk.Stackthat can be retrieved withTepl.Panel1.get_stack().
New in version 5.0.
- add_component(component, name, title, icon_name)¶
- Parameters:
component (
Gtk.Widget) – the childGtk.Widgetto add to theGtk.Stackof self.name (
str) – the name for component.title (
str) – a human-readable title for component.icon_name (
strorNone) – the icon name for component, orNone.
The equivalent of
Gtk.Stack.add_titled(), with an optional icon_name to set the “icon-name”Gtk.Stackchild property.New in version 5.0.
- get_stack()¶
- Returns:
the
Gtk.Stackwidget of self (a direct childGtk.Widgetof self).- Return type:
New in version 5.0.
- provide_active_component_gsetting(settings, setting_key)¶
- Parameters:
settings (
Gio.Settings) – aGio.Settingsobject.setting_key (
str) – aGio.Settingskey of type string.
Provides a
Gio.Settingskey for saving and restoring theGtk.Stack:visible-child-nameproperty of theGtk.Stackbelonging to self.This function just stores settings and setting_key for further use by
Tepl.Panel1.restore_state_from_gsettings() andTepl.Panel1.save_state_to_gsettings(). It doesn’t bind theGio.Settingskey to the property, because each main window containing aTepl.Panel1needs to be able to have a different state, and have more control over when that state is restored and saved. Once aTepl.Panel1is 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.Stackof 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.