adw-view-switcher

adw-view-switcher

Functions

Properties

PangoEllipsizeMode narrow-ellipsize Read / Write
AdwViewSwitcherPolicy policy Read / Write
GtkStack * stack Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── AdwViewSwitcher

Implemented Interfaces

AdwViewSwitcher implements GtkAccessible, GtkBuildable and GtkConstraintTarget.

Description

Functions

adw_view_switcher_new ()

GtkWidget *
adw_view_switcher_new (void);

Creates a new AdwViewSwitcher widget.

Returns

a new AdwViewSwitcher

Since: 1.0


adw_view_switcher_get_policy ()

AdwViewSwitcherPolicy
adw_view_switcher_get_policy (AdwViewSwitcher *self);

Gets the policy of self .

Parameters

self

a AdwViewSwitcher

 

Returns

the policy of self

Since: 1.0


adw_view_switcher_set_policy ()

void
adw_view_switcher_set_policy (AdwViewSwitcher *self,
                              AdwViewSwitcherPolicy policy);

Sets the policy of self .

Parameters

self

a AdwViewSwitcher

 

policy

the new policy

 

Since: 1.0


adw_view_switcher_get_narrow_ellipsize ()

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().

Parameters

self

a AdwViewSwitcher

 

Returns

PangoEllipsizeMode

Since: 1.0


adw_view_switcher_set_narrow_ellipsize ()

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.

Parameters

self

a AdwViewSwitcher

 

mode

a PangoEllipsizeMode

 

Since: 1.0


adw_view_switcher_get_stack ()

GtkStack *
adw_view_switcher_get_stack (AdwViewSwitcher *self);

Get the GtkStack being controlled by the AdwViewSwitcher.

See: adw_view_switcher_set_stack()

Parameters

self

a AdwViewSwitcher

 

Returns

the GtkStack, or NULL if none has been set.

[nullable][transfer none]

Since: 1.0


adw_view_switcher_set_stack ()

void
adw_view_switcher_set_stack (AdwViewSwitcher *self,
                             GtkStack *stack);

Sets the GtkStack to control.

Parameters

self

a AdwViewSwitcher

 

stack

a GtkStack.

[nullable]

Since: 1.0

Types and Values

ADW_TYPE_VIEW_SWITCHER

#define ADW_TYPE_VIEW_SWITCHER (adw_view_switcher_get_type())

enum AdwViewSwitcherPolicy

Members

ADW_VIEW_SWITCHER_POLICY_AUTO

Automatically adapt to the best fitting mode

 

ADW_VIEW_SWITCHER_POLICY_NARROW

Force the narrow mode

 

ADW_VIEW_SWITCHER_POLICY_WIDE

Force the wide mode

 

AdwViewSwitcher

typedef struct _AdwViewSwitcher AdwViewSwitcher;

Property Details

The “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


The “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


The “stack” property

  “stack”                    GtkStack *

The GtkStack the view switcher controls.

Owner: AdwViewSwitcher

Flags: Read / Write

Since: 1.0