Panel.Frame

g GObject.GInterface GObject.GInterface 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.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Panel.Frame Panel.Frame Gtk.Orientable->Panel.Frame Gtk.Widget->Panel.Frame

Subclasses:

None

Methods

Inherited:

Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Orientable (2)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

add (panel)

add_before (panel, sibling)

get_closeable ()

get_empty ()

get_header ()

get_n_pages ()

get_page (n)

get_pages ()

get_placeholder ()

get_position ()

get_requested_size ()

get_visible_child ()

remove (panel)

set_child_pinned (child, pinned)

set_header (header)

set_placeholder (placeholder)

set_requested_size (requested_size)

set_visible_child (widget)

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)

do_adopt_widget (widget)

do_page_closed (widget)

Properties

Inherited:

Gtk.Widget (34), Gtk.Accessible (1), Gtk.Orientable (1)

Name

Type

Flags

Short Description

closeable

bool

r

If the frame may be closed

empty

bool

r

If there are any panels added

placeholder

Gtk.Widget

r/w/en

Placeholder

visible-child

Panel.Widget

r/w/en

Visible Child

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Name

Short Description

adopt-widget

This signal is emitted when the frame should decide if it can adopt a Panel.Widget dropped on the frame.

page-closed

This signal is emitted when the page widget will be closed.

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Widget

r

Class Details

class Panel.Frame(**kwargs)
Bases:

Gtk.Widget, Gtk.Orientable

Abstract:

No

Structure:

Panel.FrameClass

The Panel.Frame is a widget containing panels to display in an area. The widgets are added internally in an [class`Adw`.TabView] to display them one at a time like in a stack.

A Panel.Frame can also have a header widget that will be displayed above the panels.

classmethod new()
Returns:

a newly created Panel.Frame object.

Return type:

Gtk.Widget

Create a new Panel.Frame.

add(panel)
Parameters:

panel (Panel.Widget) – a Panel.Widget to add

Adds a widget to the frame.

add_before(panel, sibling)
Parameters:

Add panel before sibling in the Panel.Frame.

get_closeable()
Returns:

True if the panel frame is closeable.

Return type:

bool

Tells if the panel frame is closeable.

get_empty()
Returns:

True if the panel is empty.

Return type:

bool

Tells if the panel frame is empty.

get_header()
Returns:

a Panel.FrameHeader or None

Return type:

Panel.FrameHeader or None

Gets the header for the frame.

get_n_pages()
Returns:

The number of pages.

Return type:

int

Gets the number of pages in the panel frame.

get_page(n)
Parameters:

n (int) – the index of the page

Returns:

a Panel.Widget or None

Return type:

Panel.Widget or None

Gets the page with the given index, if any.

get_pages()
Returns:

a Gtk.SelectionModel

Return type:

Gtk.SelectionModel

Get the pages for the frame.

get_placeholder()
Returns:

a Gtk.Widget or None

Return type:

Gtk.Widget or None

Gets the placeholder widget, if any.

get_position()
Returns:

a Panel.Position

Return type:

Panel.Position

Gets the Panel.Position for the frame.

get_requested_size()
Returns:

the requested size.

Return type:

int

Gets the requested size for the panel frame.

get_visible_child()
Returns:

a Panel.Widget or None

Return type:

Panel.Widget or None

Gets the widget of the currently visible child.

remove(panel)
Parameters:

panel (Panel.Widget) – a Panel.Widget to remove.

Removes a widget from the frame.

set_child_pinned(child, pinned)
Parameters:

Set pinned state of child.

New in version 1.2.

set_header(header)
Parameters:

header (Panel.FrameHeader or None) – a Panel.FrameHeader

Sets the header for the frame, such as a Panel.FrameSwitcher.

set_placeholder(placeholder)
Parameters:

placeholder (Gtk.Widget or None) – a Gtk.Widget or None

Sets the placeholder widget for the frame.

The placeholder widget is displayed when there are no pages to display in the frame.

set_requested_size(requested_size)
Parameters:

requested_size (int) – the requested size.

Sets the requested size for the panel frame.

set_visible_child(widget)
Parameters:

widget (Panel.Widget) – a Panel.Widget

Sets the current page to the child specified in widget.

do_adopt_widget(widget) virtual
Parameters:

widget (Panel.Widget) –

Return type:

bool

do_page_closed(widget) virtual
Parameters:

widget (Panel.Widget) –

Signal Details

Panel.Frame.signals.adopt_widget(frame, widget)
Signal Name:

adopt-widget

Flags:

RUN_LAST

Parameters:
Returns:

Gdk.EVENT_STOP or Gdk.EVENT_PROPAGATE

Return type:

bool

This signal is emitted when the frame should decide if it can adopt a Panel.Widget dropped on the frame.

If Gdk.EVENT_STOP is returned, then the widget will not be adopted.

New in version 1.2.

Panel.Frame.signals.page_closed(frame, widget)
Signal Name:

page-closed

Flags:

RUN_LAST

Parameters:

This signal is emitted when the page widget will be closed.

New in version 1.2.

Property Details

Panel.Frame.props.closeable
Name:

closeable

Type:

bool

Default Value:

False

Flags:

READABLE

If the frame may be closed

Panel.Frame.props.empty
Name:

empty

Type:

bool

Default Value:

True

Flags:

READABLE

If there are any panels added

Panel.Frame.props.placeholder
Name:

placeholder

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Placeholder

Panel.Frame.props.visible_child
Name:

visible-child

Type:

Panel.Widget

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Visible Child