1.4 <GtkActionBar>

Class: <GtkActionBar>

It derives from <GtkWidget>.

Presents contextual actions.

<GtkActionBar> 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.

Properties

Property: action-bar:revealed self

Controls whether the action bar shows its contents.

Its value is a boolean.

Set it with (set! (action-bar:revealed self) value).

Procedures

Method: action-bar:get-center-widget self ⇒ %return
Method: get-center-widget self ⇒ %return

Retrieves the center bar widget of the bar.

self

Passed: a <GtkActionBar>.

an action bsar

%return

Returned: a <GtkWidget>, or #f.

the center widget

Method: action-bar:get-revealed? self ⇒ %return
Method: get-revealed? self ⇒ %return

Gets whether the contents of the action bar are revealed.

self

Passed: a <GtkActionBar>.

an action bar

%return

Returned: a boolean.

the current value of the action-bar:revealed property

Procedure: action-bar:new ⇒ %return

Creates a new action bar widget.

%return

Returned: a <GtkWidget>.

a new <GtkActionBar>

Method: action-bar:pack-end self child
Method: pack-end self child

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

self

Passed: a <GtkActionBar>.

an action bar

child

Passed: a <GtkWidget>.

the widget to be added

Method: action-bar:pack-start self child
Method: pack-start self child

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

self

Passed: a <GtkActionBar>.

an action bar

child

Passed: a <GtkWidget>.

the widget to be added

Method: action-bar:remove self child
Method: remove self child

Removes a child from the action bar.

self

Passed: a <GtkActionBar>.

an action bar

child

Passed: a <GtkWidget>.

the widget to be removed

Method: action-bar:set-center-widget self [center-widget]
Method: set-center-widget self [center-widget]

Sets the center widget for the action bar.

self

Passed: a <GtkActionBar>.

an action bar

center-widget

Passed, or left out: a <GtkWidget>, or #f.

a widget to use for the center

Method: action-bar:set-revealed self revealed
Method: set-revealed self revealed

Reveals or conceals the content of the action bar.

Note: this does not show or hide the action bar in the widget:visible sense, so revealing has no effect if the action bar is hidden.

self

Passed: a <GtkActionBar>.

an action bar

revealed

Passed: a boolean.

the new value for the property