Class: Handy::HeaderBar

Inherits:
Gtk::Container
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initializeGtk::Widget

Creates a new HdyHeaderBar.

Instance Method Details

#centering_policyHandy::CenteringPolicy

The policy for aligning the center widget.

Returns:

#centering_policy=(centering_policy) ⇒ Handy::CenteringPolicy

The policy for aligning the center widget.

Parameters:

Returns:

#custom_titleGtk::Widget

Custom title widget to display.

Returns:

  • (Gtk::Widget)

    custom-title

#custom_title=(custom_title) ⇒ Gtk::Widget

Custom title widget to display.

Parameters:

  • custom_title (Gtk::Widget)

Returns:

  • (Gtk::Widget)

    custom-title

  • (Gtk::Widget)

    custom-title

#decoration_layoutString

The decoration layout for buttons.

If this property is not set, the [propertyGtk.Settings:gtk-decoration-layout] setting is used.

There can be valid reasons for overriding the setting, such as a header bar design that does not allow for buttons to take room on the right, or only offers room for a single close button. Split header bars are another example for overriding the setting.

The format of the string is button names, separated by commas. A colon separates the buttons that should appear on the start from those on the end. Recognized button names are minimize, maximize, close, icon (the window icon) and menu (a menu button for the fallback app menu).

For example, “menu:minimize,maximize,close” specifies a menu on the left, and minimize, maximize and close buttons on the right.

Returns:

  • (String)

    decoration-layout

#decoration_layout=(decoration_layout) ⇒ String

The decoration layout for buttons.

If this property is not set, the [propertyGtk.Settings:gtk-decoration-layout] setting is used.

There can be valid reasons for overriding the setting, such as a header bar design that does not allow for buttons to take room on the right, or only offers room for a single close button. Split header bars are another example for overriding the setting.

The format of the string is button names, separated by commas. A colon separates the buttons that should appear on the start from those on the end. Recognized button names are minimize, maximize, close, icon (the window icon) and menu (a menu button for the fallback app menu).

For example, “menu:minimize,maximize,close” specifies a menu on the left, and minimize, maximize and close buttons on the right.

Parameters:

  • decoration_layout (String)

Returns:

  • (String)

    decoration-layout

  • (String)

    decoration-layout

#decoration_layout_set=(decoration_layout_set) ⇒ Boolean

Whether [propertyHeaderBar:decoration-layout] is set.

Parameters:

  • decoration_layout_set (Boolean)

Returns:

  • (Boolean)

    decoration-layout-set

  • (Boolean)

    decoration-layout-set

#decoration_layout_set?Boolean

Whether [propertyHeaderBar:decoration-layout] is set.

Returns:

  • (Boolean)

    decoration-layout-set

#has_subtitleBoolean

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

Returns:

  • (Boolean)

    TRUE if the header bar reserves space for a subtitle

#has_subtitle=(has_subtitle) ⇒ Boolean

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

Parameters:

  • has_subtitle (Boolean)

Returns:

  • (Boolean)

    has-subtitle

  • (Boolean)

    has-subtitle

#has_subtitle?Boolean

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

Returns:

  • (Boolean)

    has-subtitle

#interpolate_sizeBoolean

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

Returns:

  • (Boolean)

    whether self interpolates its size on visible child change

#interpolate_size=(interpolate_size) ⇒ Boolean

Whether the size should smoothly change when changing between children.

If TRUE, the header bar will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if the orientation is horizontal, it will interpolate the its height.

Parameters:

  • interpolate_size (Boolean)

Returns:

  • (Boolean)

    interpolate-size

  • (Boolean)

    interpolate-size

#interpolate_size?Boolean

Whether the size should smoothly change when changing between children.

If TRUE, the header bar will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if the orientation is horizontal, it will interpolate the its height.

Returns:

  • (Boolean)

    interpolate-size

#pack_end(child) ⇒ nil

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

Parameters:

  • child (Gtk::Widget)

    the widget to be added to self

Returns:

  • (nil)

#pack_start(child) ⇒ nil

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

Parameters:

  • child (Gtk::Widget)

    the widget to be added to self

Returns:

  • (nil)

#show_close_buttonBoolean

Gets whether this header bar shows the standard window decorations.

Returns:

  • (Boolean)

    whether decorations are shown

#show_close_button=(show_close_button) ⇒ Boolean

Whether to show window decorations.

Which buttons are actually shown and where is determined by the [propertyHeaderBar:decoration-layout] property, and by the state of the window (e.g. a close button will not be shown if the window can't be closed).

Parameters:

  • show_close_button (Boolean)

Returns:

  • (Boolean)

    show-close-button

  • (Boolean)

    show-close-button

#show_close_button?Boolean

Whether to show window decorations.

Which buttons are actually shown and where is determined by the [propertyHeaderBar:decoration-layout] property, and by the state of the window (e.g. a close button will not be shown if the window can't be closed).

Returns:

  • (Boolean)

    show-close-button

#spacingInteger

The amount of space between children.

Returns:

  • (Integer)

    spacing

#spacing=(spacing) ⇒ Integer

The amount of space between children.

Parameters:

  • spacing (Integer)

Returns:

  • (Integer)

    spacing

  • (Integer)

    spacing

#subtitleString

The subtitle to display.

Returns:

  • (String)

    subtitle

#subtitle=(subtitle) ⇒ String

The subtitle to display.

Parameters:

  • subtitle (String)

Returns:

  • (String)

    subtitle

  • (String)

    subtitle

#titleString

The title to display.

Returns:

  • (String)

    title

#title=(title) ⇒ String

The title to display.

Parameters:

  • title (String)

Returns:

  • (String)

    title

  • (String)

    title

#transition_durationInteger

The transition duration, in milliseconds.

Returns:

  • (Integer)

    transition-duration

#transition_duration=(transition_duration) ⇒ Integer

The transition duration, in milliseconds.

Parameters:

  • transition_duration (Integer)

Returns:

  • (Integer)

    transition-duration

  • (Integer)

    transition-duration

#transition_runningBoolean

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

Returns:

  • (Boolean)

    whether the transition is currently running

#transition_running=(transition_running) ⇒ Boolean

Whether or not the transition is currently running.

Parameters:

  • transition_running (Boolean)

Returns:

  • (Boolean)

    transition-running

  • (Boolean)

    transition-running

#transition_running?Boolean

Whether or not the transition is currently running.

Returns:

  • (Boolean)

    transition-running