Class ActionBar

All Implemented Interfaces:
PointerInterface

public class ActionBar extends Widget
`GtkActionBar` is designed to present contextual actions.

![An example GtkActionBar](action-bar.png)

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 `GtkActionBar` implementation of the `GtkBuildable` 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 `GtkActionBar`'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.

https://docs.gtk.org/gtk4/class.ActionBar.html

  • Constructor Details

    • ActionBar

      public ActionBar(PointerContainer pointer)
    • ActionBar

      public ActionBar()
      Creates a new `GtkActionBar` widget.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getCenterWidget

      public Widget getCenterWidget()
      Retrieves the center bar widget of the bar.
      Returns:
      the center `GtkWidget`
    • getRevealed

      public boolean getRevealed()
      Gets whether the contents of the action bar are revealed.
      Returns:
      the current value of the [property@Gtk.ActionBar:revealed] property
    • packEnd

      public void packEnd(@Nonnull Widget child)
      Adds @child to @action_bar, packed with reference to the
      end of the @action_bar.
      Parameters:
      child - the `GtkWidget` to be added to @action_bar
    • packStart

      public void packStart(@Nonnull Widget child)
      Adds @child to @action_bar, packed with reference to the
      start of the @action_bar.
      Parameters:
      child - the `GtkWidget` to be added to @action_bar
    • remove

      public void remove(@Nonnull Widget child)
      Removes a child from @action_bar.
      Parameters:
      child - the `GtkWidget` to be removed
    • setCenterWidget

      public void setCenterWidget(@Nullable Widget center_widget)
      Sets the center widget for the `GtkActionBar`.
      Parameters:
      center_widget - a widget to use for the center
    • setRevealed

      public void setRevealed(boolean revealed)
      Reveals or conceals the content of the action bar.

      Note: this does not show or hide @action_bar in the
      [property@Gtk.Widget:visible] sense, so revealing has
      no effect if the action bar is hidden.
      Parameters:
      revealed - The new value of the property
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class Widget
      Returns:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class Widget
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class Widget
      Returns:
      ConstraintTarget
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()