Class

HandyViewSwitcher

Description [src]

final class Handy.ViewSwitcher : Gtk.Bin {
  /* No available fields */
}

An adaptive view switcher.

An adaptive view switcher, designed to switch between multiple views in a similar fashion than a GtkStackSwitcher.

Depending on the available width, the view switcher can adapt from a wide mode showing the view’s icon and title side by side, to a narrow mode showing the view’s icon and title one on top of the other, in a more compact way. This can be controlled via the policy property.

To look good in a header bar, an HdyViewSwitcher requires to fill its full height. Contrary to GtkHeaderBar, HdyHeaderBar doesn’t force a vertical alignment on its title widget, so we recommend it over GtkHeaderBar.

CSS nodes

HdyViewSwitcher has a single CSS node with name viewswitcher.

Available since:1.0

Ancestors

  • GtkBin
  • GtkContainer
  • GtkWidget
  • GInitiallyUnowned
  • GObject

Implements

  • AtkImplementorIface
  • GtkBuildable

Constructors

hdy_view_switcher_new

Creates a new HdyViewSwitcher.

Available since: 1.0

Instance methods

hdy_view_switcher_get_narrow_ellipsize

Get the ellipsizing position of the narrow mode label.

Available since: 1.0

hdy_view_switcher_get_policy

Gets the policy of self.

Available since: 1.0

hdy_view_switcher_get_stack

Gets the stack controlled by self.

Available since: 1.0

hdy_view_switcher_set_narrow_ellipsize

Sets the mode used to ellipsize the text in narrow mode.

Available since: 1.0

hdy_view_switcher_set_policy

Sets the policy of self.

Available since: 1.0

hdy_view_switcher_set_stack

Sets the GtkStack to control.

Available since: 1.0

Properties

Handy.ViewSwitcher:narrow-ellipsize

The preferred place to ellipsize the string.

Available since: 1.0

Handy.ViewSwitcher:policy

The policy to determine which mode to use.

Available since: 1.0

Handy.ViewSwitcher:stack

The GtkStack the view switcher controls.

Available since: 1.0

Class structure

struct HandyViewSwitcherClass {
  GtkBinClass parent_class;
  
}
Class members
parent_class
GtkBinClass
  No description available.