Class

HandyHeaderBar

Description [src]

class Handy.HeaderBar : Gtk.Container {
  parent_instance: GtkContainer
}

A title bar widget.

HdyHeaderBar is similar to GtkHeaderBar but is designed to fix some of its shortcomings for adaptive applications.

HdyHeaderBar doesn’t force the custom title widget to be vertically centered, hence allowing it to fill up the whole height, which is e.g. needed for HdyViewSwitcher.

When used in a mobile dialog, HdyHeaderBar will replace its window decorations by a back button allowing to close it. It doesn’t have to be its direct child and you can use any complex contraption you like as the dialog’s titlebar.

HdyHeaderBar can be used in window’s content area rather than titlebar, and will still be draggable and will handle right click, middle click and double click as expected from a titlebar. This is particularly useful with HdyWindow or HdyApplicationWindow.

CSS nodes

HdyHeaderBar has a single CSS node with name headerbar.

Available since:1.0

Ancestors

  • GtkContainer
  • GtkWidget
  • GInitiallyUnowned
  • GObject

Implements

  • AtkImplementorIface
  • GtkBuildable

Constructors

hdy_header_bar_new

Creates a new HdyHeaderBar.

Available since: 1.0

Instance methods

hdy_header_bar_get_centering_policy

Gets the policy self follows to horizontally align its center widget.

Available since: 1.0

hdy_header_bar_get_custom_title

Retrieves the custom title widget of the header.

Available since: 1.0

hdy_header_bar_get_decoration_layout

Gets the decoration layout.

Available since: 1.0

hdy_header_bar_get_has_subtitle

Gets whether space is reserved for a subtitle, regardless if one is currently set or not.

Available since: 1.0

hdy_header_bar_get_interpolate_size

Gets whether self should interpolate its size on visible child change.

Available since: 1.0

hdy_header_bar_get_show_close_button

Gets whether this header bar shows the standard window decorations.

Available since: 1.0

hdy_header_bar_get_subtitle

Gets the subtitle of the header.

Available since: 1.0

hdy_header_bar_get_title

Retrieves the title of the header.

Available since: 1.0

hdy_header_bar_get_transition_duration

Gets the amount of time that transitions between pages will take.

Available since: 1.0

hdy_header_bar_get_transition_running

Gets whether the self is currently in a transition from one page to another.

Available since: 1.0

hdy_header_bar_pack_end

Adds child to self, packed with reference to the end of the self.

Available since: 1.0

hdy_header_bar_pack_start

Adds child to self, packed with reference to the start of the self.

Available since: 1.0

hdy_header_bar_set_centering_policy

Sets the policy self must follow to horizontally align its center widget.

Available since: 1.0

hdy_header_bar_set_custom_title

Sets a custom title for the header bar.

Available since: 1.0

hdy_header_bar_set_decoration_layout

Sets the decoration layout for this header bar.

Available since: 1.0

hdy_header_bar_set_has_subtitle

Sets whether space is reserved for a subtitle, even if none is currently set.

Available since: 1.0

hdy_header_bar_set_interpolate_size

Sets whether self should interpolate its size on visible child change.

Available since: 1.0

hdy_header_bar_set_show_close_button

Sets whether this header bar shows the standard window decorations.

Available since: 1.0

hdy_header_bar_set_subtitle

Sets the subtitle of the header bar.

Available since: 1.0

hdy_header_bar_set_title

Sets the title of the HdyHeaderBar.

Available since: 1.0

hdy_header_bar_set_transition_duration

Sets the duration that transitions between pages will take.

Available since: 1.0

Properties

Handy.HeaderBar:centering-policy

The policy for aligning the center widget.

Available since: 1.0

Handy.HeaderBar:custom-title

Custom title widget to display.

Available since: 1.0

Handy.HeaderBar:decoration-layout

The decoration layout for buttons.

Available since: 1.0

Handy.HeaderBar:decoration-layout-set

Whether HdyHeaderBar:decoration-layout is set.

Available since: 1.0

Handy.HeaderBar:has-subtitle

Whether to reserve space for a subtitle, even if none is currently set.

Available since: 1.0

Handy.HeaderBar:interpolate-size

Whether the size should smoothly change when changing between children.

Available since: 1.0

Handy.HeaderBar:show-close-button

Whether to show window decorations.

Available since: 1.0

Handy.HeaderBar:spacing

The amount of space between children.

Available since: 1.0

Handy.HeaderBar:subtitle

The subtitle to display.

Available since: 1.0

Handy.HeaderBar:title

The title to display.

Available since: 1.0

Handy.HeaderBar:transition-duration

The transition duration, in milliseconds.

Available since: 1.0

Handy.HeaderBar:transition-running

Whether or not the transition is currently running.

Available since: 1.0

Class structure

struct HandyHeaderBarClass {
  GtkContainerClass parent_class;
  
}
Class members
parent_class
GtkContainerClass
 

The parent class.