Object Hierarchy:

Object hierarchy for OverlayBar


public class OverlayBar : EventBox

A floating status bar that displays a single line of text.

This widget is intended to be used as an overlay for a Gtk.Overlay and is placed in the bottom-right corner by default. You can change its position like you would do for any overlay widget used in a Gtk.Overlay.

The Overlay Bar displays a single line of text that can be changed using the "status" property.

This widget tries to avoid getting in front of the content being displayed inside the Gtk.Overlay by moving itself horizontally to the opposite side from the current one when the mouse pointer enters the widget.

For this widget to function correctly, the event Gdk.EventMask.ENTER_NOTIFY_MASK must be set for the parent Gtk.Overlay. Overlay Bar's constructor takes care of this automatically, if the parent is supplied as a parameter, but you have to be careful not to unset the event for the Gtk.Overlay at a later stage.


public class OverlayBarView : Gtk.Overlay {
construct {
var button = new Gtk.ToggleButton.with_label ("Show Spinner");

var grid = new Gtk.Grid ();
grid.halign = Gtk.Align.CENTER;
grid.valign = Gtk.Align.CENTER;
grid.add (button);

var overlaybar = new Granite.Widgets.OverlayBar (this);
overlaybar.label = "Hover the OverlayBar to change its position";

add (grid);

button.toggled.connect (() => {
overlaybar.active = button.active;

See also:


Namespace: Granite.Widgets
Package: granite



Creation methods:


Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor