About all my projects
Gnome::Gtk4::ActionBar

Gnome::Gtk4::ActionBar

Description

Gnome::Gtk4::ActionBar is designed to present contextual actions.

No caption

It is expected to be displayed below the content and expand horizontally to fill the area.

It allows placing children at the start or the end. In addition, it contains an internal centered box which is centered with respect to the full width of the box, even if the children at either side take up different amounts of space.

GtkActionBar as GtkBuildable

The Gnome::Gtk4::ActionBar implementation of the Gnome::Gtk4::R-Buildable interface supports adding children at the start or end sides by specifying “start” or “end” as the “type” attribute of a `<child>` element, or setting the center widget by specifying “center” value.

CSS nodes

A Gnome::Gtk4::ActionBar's CSS node is called actionbar. It contains a revealer subnode, which contains a box subnode, which contains two box subnodes at the start and end of the action bar, with start and end style classes respectively, as well as a center node that represents the center child.

Each of the boxes contains children packed for that side.

Class initialization

new

:native-object

Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object :$native-object! )

new-actionbar

Creates a new Gnome::Gtk4::ActionBar widget.

method new-actionbar ( --> Gnome::Gtk4::ActionBar \)

Methods

get-center-widget

Retrieves the center bar widget of the bar.

method get-center-widget (--> N-Object )

Return value; the center Gnome::Gtk4::Widget.

get-revealed

Gets whether the contents of the action bar are revealed.

method get-revealed (--> Bool )

Return value; the current value of the revealed property.

pack-end

Adds $child to $action-bar, packed with reference to the end of the $action-bar.

method pack-end ( N-Object() $child )
  • $child; the Gnome::Gtk4::Widget to be added to $action-bar.

pack-start

Adds $child to $action-bar, packed with reference to the start of the $action-bar.

method pack-start ( N-Object() $child )
  • $child; the Gnome::Gtk4::Widget to be added to $action-bar.

remove

Removes a child from $action-bar.

method remove ( N-Object() $child )
  • $child; the Gnome::Gtk4::Widget to be removed.

set-center-widget

Sets the center widget for the Gnome::Gtk4::ActionBar.

method set-center-widget ( N-Object() $center-widget )
  • $center-widget; a widget to use for the center.

set-revealed

Reveals or conceals the content of the action bar.

Note: this does not show or hide $action-bar in the visible defined in Gnome::Gtk4::Widget sense, so revealing has no effect if the action bar is hidden.

method set-revealed ( Bool() $revealed )
  • $revealed; The new value of the property.