Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | hdy_view_switcher_new () |
HdyViewSwitcherPolicy | hdy_view_switcher_get_policy () |
void | hdy_view_switcher_set_policy () |
PangoEllipsizeMode | hdy_view_switcher_get_narrow_ellipsize () |
void | hdy_view_switcher_set_narrow_ellipsize () |
GtkStack * | hdy_view_switcher_get_stack () |
void | hdy_view_switcher_set_stack () |
PangoEllipsizeMode | narrow-ellipsize | Read / Write |
HdyViewSwitcherPolicy | policy | Read / Write |
GtkStack * | stack | Read / Write |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── HdyViewSwitcher
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.
GtkWidget *
hdy_view_switcher_new (void
);
Creates a new HdyViewSwitcher widget.
Since: 0.0.10
HdyViewSwitcherPolicy
hdy_view_switcher_get_policy (HdyViewSwitcher *self
);
Gets the policy of self
.
Since: 0.0.10
void hdy_view_switcher_set_policy (HdyViewSwitcher *self
,HdyViewSwitcherPolicy policy
);
Sets the policy of self
.
Since: 0.0.10
PangoEllipsizeMode
hdy_view_switcher_get_narrow_ellipsize
(HdyViewSwitcher *self
);
Get the ellipsizing position of the narrow mode label. See
hdy_view_switcher_set_narrow_ellipsize()
.
Since: 0.0.10
void hdy_view_switcher_set_narrow_ellipsize (HdyViewSwitcher *self
,PangoEllipsizeMode mode
);
Set the mode used to ellipsize the text in narrow mode if there is not enough space to render the entire string.
Since: 0.0.10
GtkStack *
hdy_view_switcher_get_stack (HdyViewSwitcher *self
);
Get the GtkStack being controlled by the HdyViewSwitcher.
See: hdy_view_switcher_set_stack()
Since: 0.0.10
void hdy_view_switcher_set_stack (HdyViewSwitcher *self
,GtkStack *stack
);
Sets the GtkStack to control.
Since: 0.0.10
“narrow-ellipsize”
property “narrow-ellipsize” PangoEllipsizeMode
The preferred place to ellipsize the string, if the narrow mode label does not have enough room to display the entire string, specified as a PangoEllipsizeMode.
Note that setting this property to a value other than PANGO_ELLIPSIZE_NONE
has the side-effect that the label requests only enough space to display
the ellipsis.
Owner: HdyViewSwitcher
Flags: Read / Write
Default value: PANGO_ELLIPSIZE_NONE
Since: 0.0.10
“policy”
property“policy” HdyViewSwitcherPolicy
The HdyViewSwitcherPolicy the view switcher should use to determine which mode to use.
Owner: HdyViewSwitcher
Flags: Read / Write
Default value: HDY_VIEW_SWITCHER_POLICY_AUTO
Since: 0.0.10