Gtk.ActionBar¶
Example¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.ActionBar(**kwargs)¶
- Bases:
- Abstract:
No
GtkActionBar
is designed to present contextual actions.An example
Gtk.ActionBar
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
GtkActionBar
implementation of theGtkBuildable
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 calledactionbar
. It contains arevealer
subnode, which contains abox
subnode, which contains twobox
subnodes at the start and end of the action bar, withstart
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.
- classmethod new()[source]¶
- Returns:
a new
GtkActionBar
- Return type:
Creates a new
GtkActionBar
widget.
- get_center_widget()[source]¶
- Returns:
the center
GtkWidget
- Return type:
Gtk.Widget
orNone
Retrieves the center bar widget of the bar.
- get_revealed()[source]¶
- Returns:
the current value of the [property`Gtk`.ActionBar:revealed] property
- Return type:
Gets whether the contents of the action bar are revealed.
- pack_end(child)[source]¶
- Parameters:
child (
Gtk.Widget
) – theGtkWidget
to be added to self
Adds child to self, packed with reference to the end of the self.
- pack_start(child)[source]¶
- Parameters:
child (
Gtk.Widget
) – theGtkWidget
to be added to self
Adds child to self, packed with reference to the start of the self.
- remove(child)[source]¶
- Parameters:
child (
Gtk.Widget
) – theGtkWidget
to be removed
Removes a child from self.
- set_center_widget(center_widget)[source]¶
- Parameters:
center_widget (
Gtk.Widget
orNone
) – a widget to use for the center
Sets the center widget for the
GtkActionBar
.