| Top |
| GtkWidget * | adw_view_switcher_new () |
| AdwViewSwitcherPolicy | adw_view_switcher_get_policy () |
| void | adw_view_switcher_set_policy () |
| PangoEllipsizeMode | adw_view_switcher_get_narrow_ellipsize () |
| void | adw_view_switcher_set_narrow_ellipsize () |
| GtkStack * | adw_view_switcher_get_stack () |
| void | adw_view_switcher_set_stack () |
| PangoEllipsizeMode | narrow-ellipsize | Read / Write |
| AdwViewSwitcherPolicy | policy | Read / Write |
| GtkStack * | stack | Read / Write |
AdwViewSwitcher implements GtkAccessible, GtkBuildable and GtkConstraintTarget.
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 AdwViewSwitcher requires to fill its full height. Contrary to GtkHeaderBar, AdwHeaderBar doesn't force a vertical alignment on its title widget, so we recommend it over GtkHeaderBar.
AdwViewSwitcher uses the GTK_ACCESSIBLE_ROLE_TAB_LIST role and uses the GTK_ACCESSIBLE_ROLE_TAB for its buttons.
GtkWidget *
adw_view_switcher_new (void);
Creates a new AdwViewSwitcher widget.
Since: 1.0
AdwViewSwitcherPolicy
adw_view_switcher_get_policy (AdwViewSwitcher *self);
Gets the policy of self
.
Since: 1.0
void adw_view_switcher_set_policy (AdwViewSwitcher *self,AdwViewSwitcherPolicy policy);
Sets the policy of self
.
Since: 1.0
PangoEllipsizeMode
adw_view_switcher_get_narrow_ellipsize
(AdwViewSwitcher *self);
Get the ellipsizing position of the narrow mode label. See
adw_view_switcher_set_narrow_ellipsize().
Since: 1.0
void adw_view_switcher_set_narrow_ellipsize (AdwViewSwitcher *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: 1.0
GtkStack *
adw_view_switcher_get_stack (AdwViewSwitcher *self);
Get the GtkStack being controlled by the AdwViewSwitcher.
See: adw_view_switcher_set_stack()
Since: 1.0
void adw_view_switcher_set_stack (AdwViewSwitcher *self,GtkStack *stack);
Sets the GtkStack to control.
Since: 1.0
“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: AdwViewSwitcher
Flags: Read / Write
Default value: PANGO_ELLIPSIZE_NONE
Since: 1.0
“policy” property“policy” AdwViewSwitcherPolicy
The AdwViewSwitcherPolicy the view switcher should use to determine which mode to use.
Owner: AdwViewSwitcher
Flags: Read / Write
Default value: ADW_VIEW_SWITCHER_POLICY_AUTO
Since: 1.0
“stack” property “stack” GtkStack *
The GtkStack the view switcher controls.
Owner: AdwViewSwitcher
Flags: Read / Write
Since: 1.0