Handy.TabPage

g GObject.Object GObject.Object Handy.TabPage Handy.TabPage GObject.Object->Handy.TabPage

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_child ()

get_icon ()

get_indicator_activatable ()

get_indicator_icon ()

get_loading ()

get_needs_attention ()

get_parent ()

get_pinned ()

get_selected ()

get_title ()

get_tooltip ()

set_icon (icon)

set_indicator_activatable (activatable)

set_indicator_icon (indicator_icon)

set_loading (loading)

set_needs_attention (needs_attention)

set_title (title)

set_tooltip (tooltip)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

child

Gtk.Widget

r/w/co

The child of the page

icon

Gio.Icon

r/w/en

The icon of the page

indicator-activatable

bool

r/w/en

Whether the indicator icon is activatable

indicator-icon

Gio.Icon

r/w/en

An indicator icon for the page

loading

bool

r/w/en

Whether the page is loading

needs-attention

bool

r/w/en

Whether the page needs attention

parent

Handy.TabPage

r/w/co/en

The parent page of the page

pinned

bool

r/en

Whether the page is pinned

selected

bool

r/en

Whether the page is selected

title

str

r/w/en

The title of the page

tooltip

str

r/w/en

The tooltip of the page

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Handy.TabPage(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Handy.TabPageClass

An auxiliary class used by [class`TabView`].

New in version 1.2.

get_child()
Returns:

the child of self

Return type:

Gtk.Widget

Gets the child of self.

New in version 1.2.

get_icon()
Returns:

the icon of self

Return type:

Gio.Icon or None

Gets the icon of self.

New in version 1.2.

get_indicator_activatable()
Returns:

whether the indicator is activatable

Return type:

bool

Gets whether the indicator of self is activatable.

New in version 1.2.

get_indicator_icon()
Returns:

the indicator icon of self

Return type:

Gio.Icon or None

Gets the indicator icon of self.

New in version 1.2.

get_loading()
Returns:

whether self is loading

Return type:

bool

Gets whether self is loading.

New in version 1.2.

get_needs_attention()
Returns:

whether self needs attention

Return type:

bool

Gets whether self needs attention.

New in version 1.2.

get_parent()
Returns:

the parent page of self

Return type:

Handy.TabPage or None

Gets the parent page of self.

New in version 1.2.

get_pinned()
Returns:

whether self is pinned

Return type:

bool

Gets whether self is pinned.

New in version 1.2.

get_selected()
Returns:

whether self is selected

Return type:

bool

Gets whether self is selected.

New in version 1.2.

get_title()
Returns:

the title of self

Return type:

str or None

Gets the title of self.

New in version 1.2.

get_tooltip()
Returns:

the tooltip of self

Return type:

str or None

Gets the tooltip of self.

New in version 1.2.

set_icon(icon)
Parameters:

icon (Gio.Icon or None) – the icon of self

Sets the icon of self.

New in version 1.2.

set_indicator_activatable(activatable)
Parameters:

activatable (bool) – whether the indicator is activatable

Sets whether the indicator of self is activatable.

New in version 1.2.

set_indicator_icon(indicator_icon)
Parameters:

indicator_icon (Gio.Icon or None) – the indicator icon of self

Sets the indicator icon of self.

New in version 1.2.

set_loading(loading)
Parameters:

loading (bool) – whether self is loading

Sets whether self is loading.

New in version 1.2.

set_needs_attention(needs_attention)
Parameters:

needs_attention (bool) – whether self needs attention

Sets whether self needs attention.

New in version 1.2.

set_title(title)
Parameters:

title (str or None) – the title of self

Sets the title of self.

New in version 1.2.

set_tooltip(tooltip)
Parameters:

tooltip (str or None) – the tooltip of self

Sets the tooltip of self.

New in version 1.2.

Property Details

Handy.TabPage.props.child
Name:

child

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The child of the page.

New in version 1.2.

Handy.TabPage.props.icon
Name:

icon

Type:

Gio.Icon

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The icon of the page.

[class`TabBar`] displays the icon next to the title.

It will not show the icon if [property`TabPage`:py:data::loading<Handy.TabPage.props.loading>] is set to TRUE, or if the page is pinned and [propertyTabPage:indicator-icon] is set.

New in version 1.2.

Handy.TabPage.props.indicator_activatable
Name:

indicator-activatable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the indicator icon is activatable.

If set to TRUE, [signal`TabView`:py:func:::indicator-activated<Handy.TabPage.signals.indicator_activated>] will be emitted when the indicator icon is clicked.

If [property`TabPage`:py:data::indicator-icon<Handy.TabPage.props.indicator_icon>] is not set, does nothing.

New in version 1.2.

Handy.TabPage.props.indicator_icon
Name:

indicator-icon

Type:

Gio.Icon

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

An indicator icon for the page.

A common use case is an audio or camera indicator in a web browser.

[class`TabPage`] will show it at the beginning of the tab, alongside icon representing [property`TabPage`:py:data::icon<Handy.TabPage.props.icon>] or loading spinner.

If the page is pinned, the indicator will be shown instead of icon or spinner.

If [property`TabPage`:py:data::indicator-activatable<Handy.TabPage.props.indicator_activatable>] is set to TRUE, the indicator icon can act as a button.

New in version 1.2.

Handy.TabPage.props.loading
Name:

loading

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the page is loading.

If set to TRUE, [class`TabBar`] will display a spinner in place of icon.

If the page is pinned and [property`TabPage`:py:data::indicator-icon<Handy.TabPage.props.indicator_icon>] is set, the loading status will not be visible.

New in version 1.2.

Handy.TabPage.props.needs_attention
Name:

needs-attention

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the page needs attention.

[class`TabBar`] will display a glow under the tab representing the page if set to TRUE. If the tab is not visible, the corresponding edge of the tab bar will be highlighted.

New in version 1.2.

Handy.TabPage.props.parent
Name:

parent

Type:

Handy.TabPage

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

The parent page of the page.

See [method`TabView`.add_page] and [method`TabView`.close_page].

New in version 1.2.

Handy.TabPage.props.pinned
Name:

pinned

Type:

bool

Default Value:

False

Flags:

READABLE, EXPLICIT_NOTIFY

Whether the page is pinned.

See [method`TabView`.set_page_pinned].

New in version 1.2.

Handy.TabPage.props.selected
Name:

selected

Type:

bool

Default Value:

False

Flags:

READABLE, EXPLICIT_NOTIFY

Whether the page is selected.

New in version 1.2.

Handy.TabPage.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The title of the page.

[class`TabBar`] will display it in the center of the tab unless it’s pinned, and will use it as a tooltip unless [property`TabPage`:py:data::tooltip<Handy.TabPage.props.tooltip>] is set.

New in version 1.2.

Handy.TabPage.props.tooltip
Name:

tooltip

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The tooltip of the page.

The tooltip can be marked up with the Pango text markup language.

If not set, [class`TabBar`] will use [property`TabPage`:py:data::title<Handy.TabPage.props.title>] as a tooltip instead.

New in version 1.2.