Panel.Workspace

g Adw.ApplicationWindow Adw.ApplicationWindow Panel.Workspace Panel.Workspace Adw.ApplicationWindow->Panel.Workspace GObject.GInterface GObject.GInterface Gio.ActionGroup Gio.ActionGroup GObject.GInterface->Gio.ActionGroup Gio.ActionMap Gio.ActionMap GObject.GInterface->Gio.ActionMap Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget Gtk.Native Gtk.Native GObject.GInterface->Gtk.Native Gtk.Root Gtk.Root GObject.GInterface->Gtk.Root Gtk.ShortcutManager Gtk.ShortcutManager GObject.GInterface->Gtk.ShortcutManager GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.ApplicationWindow Gtk.ApplicationWindow Gio.ActionGroup->Gtk.ApplicationWindow Gio.ActionMap->Gtk.ApplicationWindow Gtk.Accessible->Gtk.Widget Gtk.ApplicationWindow->Adw.ApplicationWindow Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Window Gtk.Window Gtk.Native->Gtk.Window Gtk.Root->Gtk.Window Gtk.ShortcutManager->Gtk.Window Gtk.Widget->Gtk.Window Gtk.Window->Gtk.ApplicationWindow

Subclasses:

Panel.DocumentWorkspace

Methods

Inherited:

Adw.ApplicationWindow (7), Gtk.ApplicationWindow (6), Gtk.Window (62), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Native (6), Gtk.Root (3), Gio.ActionGroup (14), Gio.ActionMap (5)

Structs:

Panel.WorkspaceClass (2), Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

find_from_widget (widget)

class

install_action (action_name, parameter_type, activate)

class

install_property_action (action_name, property_name)

action_set_enabled (action_name, enabled)

get_id ()

get_workbench ()

inhibit (flags, reason)

set_id (id)

Virtual Methods

Inherited:

Gtk.Window (5), Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9), Gtk.ShortcutManager (2), Gio.ActionGroup (14), Gio.ActionMap (3)

Properties

Inherited:

Adw.ApplicationWindow (4), Gtk.ApplicationWindow (1), Gtk.Window (25), Gtk.Widget (34), Gtk.Accessible (1)

Name

Type

Flags

Short Description

id

str

r/w/en

Signals

Inherited:

Gtk.Window (5), Gtk.Widget (13), GObject.Object (1), Gio.ActionGroup (4)

Fields

Inherited:

Gtk.Window (5), Gtk.Widget (13), GObject.Object (1), Gio.ActionGroup (4)

Name

Type

Access

Description

parent_instance

Adw.ApplicationWindow

r

Class Details

class Panel.Workspace(*args, **kwargs)
Bases:

Adw.ApplicationWindow

Abstract:

No

Structure:

Panel.WorkspaceClass

classmethod find_from_widget(widget)
Parameters:

widget (Gtk.Widget) – a Gtk.Widget

Returns:

a Panel.Workspace or None

Return type:

Panel.Workspace or None

Finds the workspace that contains widget.

New in version 1.4.

classmethod install_action(action_name, parameter_type, activate)
Parameters:
  • action_name (str) – a prefixed action name, such as “project.open”

  • parameter_type (str or None) – the parameter type

  • activate (Panel.ActionActivateFunc) – callback to use when the action is activated

This should be called at class initialization time to specify actions to be added for all instances of this class.

Actions installed by this function are stateless. The only state they have is whether they are enabled or not.

classmethod install_property_action(action_name, property_name)
Parameters:
  • action_name (str) – name of the action

  • property_name (str) – name of the property in instances of self or any parent class.

Installs an action called action_name on self and binds its state to the value of the property_name property.

This function will perform a few santity checks on the property selected via property_name. Namely, the property must exist, must be readable, writable and must not be construct-only. There are also restrictions on the type of the given property, it must be boolean, int, unsigned int, double or string. If any of these conditions are not met, a critical warning will be printed and no action will be added.

The state type of the action matches the property type.

If the property is boolean, the action will have no parameter and toggle the property value. Otherwise, the action will have a parameter of the same type as the property.

New in version 1.4.

action_set_enabled(action_name, enabled)
Parameters:
  • action_name (str) –

  • enabled (bool) –

get_id()
Return type:

str

get_workbench()
Returns:

a Panel.Workbench, or None

Return type:

Panel.Workbench or None

Gets the Panel.Workbench self is a part of.

New in version 1.4.

inhibit(flags, reason)
Parameters:
Returns:

a Panel.Inhibitor or None

Return type:

Panel.Inhibitor or None

Inhibits one or more particular actions in the session.

When the resulting Panel.Inhibitor releases it’s last reference the inhibitor will be dismissed. Alternatively, you may force the release of the inhibit using Panel.Inhibitor.uninhibit().

New in version 1.4.

set_id(id)
Parameters:

id (str) –

Property Details

Panel.Workspace.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The “id” of the workspace.

This is generally used by applications to help destinguish between types of workspaces, particularly when saving session state.

New in version 1.4.