Panel.OmniBar

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Actionable Gtk.Actionable GObject.GInterface->Gtk.Actionable Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Panel.OmniBar Panel.OmniBar Gtk.Actionable->Panel.OmniBar Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Widget->Panel.OmniBar

Subclasses:

None

Methods

Inherited:

Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Actionable (5)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

add_prefix (priority, widget)

add_suffix (priority, widget)

get_popover ()

get_progress ()

remove (widget)

set_popover (popover)

set_progress (progress)

start_pulsing ()

stop_pulsing ()

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9), Gtk.Actionable (4)

Properties

Inherited:

Gtk.Widget (34), Gtk.Accessible (1), Gtk.Actionable (2)

Name

Type

Flags

Short Description

action-tooltip

str

r/w

icon-name

str

r/w

Icon Name

menu-model

Gio.MenuModel

r/w

Menu Model

popover

Gtk.Popover

r/w/en

Popover

progress

float

r/w

Progress bar fraction

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Widget

r

Class Details

class Panel.OmniBar(**kwargs)
Bases:

Gtk.Widget, Gtk.Actionable

Abstract:

No

Structure:

Panel.OmniBarClass

A multi-use widget for user interaction in the window header bar. You can add widgets, a popover to provide action items, an icon, updates on progress and pulse the main widget.

There is also a prefix and suffix area that can contain more widgets.

<picture> <source srcset=”omni-bar-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”omni-bar.png” alt=”omni-bar”> </picture>

classmethod new()
Returns:

a newly created Panel.OmniBar

Return type:

Gtk.Widget

Create a new Panel.OmniBar.

add_prefix(priority, widget)
Parameters:
  • priority (int) – the priority

  • widget (Gtk.Widget) – the widget to add at the start.

Add a widget at the start of the container, ordered by priority. The highest the priority, the closest to the start.

add_suffix(priority, widget)
Parameters:
  • priority (int) – the priority

  • widget (Gtk.Widget) – the widget to add toward the end.

Add a widget towards the end of the container, ordered by priority. The highest the priority, the closest to the start.

get_popover()
Returns:

a Gtk.Popover or None

Return type:

Gtk.Popover or None

Gets the current popover or None if none is setup.

get_progress()
Returns:

the progress value.

Return type:

float

Gets the progress value displayed in the omni bar.

remove(widget)
Parameters:

widget (Gtk.Widget) – The widget to remove.

Removes a widget from the omni bar. Currently only prefix or suffix widgets are supported.

set_popover(popover)
Parameters:

popover (Gtk.Popover or None) – a Gtk.Popover or None

Sets the omnibar popover, that will appear when clicking on the omni bar.

set_progress(progress)
Parameters:

progress (float) – the progress value

Sets the progress value displayed in the omni bar.

start_pulsing()

Starts pulsing the omni bar. Use panel_omni_bar_stop_pulsing to stop.

stop_pulsing()

Stops pulsing the omni bar, that was started with panel_omni_bar_start_pulsing.

Property Details

Panel.OmniBar.props.action_tooltip
Name:

action-tooltip

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The tooltip for the action.

Panel.OmniBar.props.icon_name
Name:

icon-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The name of the icon to use.

Panel.OmniBar.props.menu_model
Name:

menu-model

Type:

Gio.MenuModel

Default Value:

None

Flags:

READABLE, WRITABLE

The menu model of the omni bar menu.

Panel.OmniBar.props.popover
Name:

popover

Type:

Gtk.Popover

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The popover to show.

Panel.OmniBar.props.progress
Name:

progress

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The current progress value.