Gnome::Gtk4::ActionBar
Table of Contents
Description§
Gnome::Gtk4::ActionBar is designed to present contextual actions.
UNKNOWN image§
=for image :class<inline> :src<asset_files/images/action-bar.png> :width<30\%>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.
The action bar as a buildable§
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§
actionbar
╰── revealer
╰── box
├── box.start
│ ╰── [start children]
├── [center widget]
╰── box.end
╰── [end children]
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.
Uml Diagram§
UNKNOWN image§
=for image :class<inline> :src<asset_files/images/plantuml/ActionBar.png> :width<70\%>Class initialization§
new§
:native-object§
Create an object using a native object from an object of the same type found 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.
About my projects, examples and tutorials