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.Panel1
containing only an emptyGtk.Stack
that 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.Panel1
intended to be used as a side panel added on the left side inside aGtk.Window
.It contains:
A close button that hides the
Tepl.Panel1
when clicked.A
Gtk.Stack
that 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.Widget
to add to theGtk.Stack
of self.name (
str
) – the name for component.title (
str
) – a human-readable title for component.icon_name (
str
orNone
) – the icon name for component, orNone
.
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 childGtk.Widget
of self).- Return type:
New in version 5.0.
- provide_active_component_gsetting(settings, setting_key)¶
- Parameters:
settings (
Gio.Settings
) – aGio.Settings
object.setting_key (
str
) – aGio.Settings
key of type string.
Provides a
Gio.Settings
key for saving and restoring theGtk.Stack
:visible-child-name
property of theGtk.Stack
belonging 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.Settings
key to the property, because each main window containing aTepl.Panel1
needs to be able to have a different state, and have more control over when that state is restored and saved. Once aTepl.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.