HdyViewSwitcherBar

HdyViewSwitcherBar — An view switcher action bar.

Functions

Properties

gint icon-size Read / Write
HdyViewSwitcherPolicy policy Read / Write
gboolean reveal Read / Write
GtkStack * stack Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── HdyViewSwitcherBar

Implemented Interfaces

HdyViewSwitcherBar implements AtkImplementorIface and GtkBuildable.

Description

An action bar letting you switch between multiple views offered by a GtkStack, via an HdyViewSwitcher. It is designed to be put at the bottom of a window and to be revealed only on really narrow windows e.g. on mobile phones.

Functions

hdy_view_switcher_bar_new ()

HdyViewSwitcherBar *
hdy_view_switcher_bar_new (void);

Creates a new HdyViewSwitcherBar widget.

Returns

a new HdyViewSwitcherBar

Since: 0.0.10


hdy_view_switcher_bar_get_policy ()

HdyViewSwitcherPolicy
hdy_view_switcher_bar_get_policy (HdyViewSwitcherBar *self);

Gets the policy of self .

Parameters

self

a HdyViewSwitcherBar

 

Returns

the policy of self

Since: 0.0.10


hdy_view_switcher_bar_set_policy ()

void
hdy_view_switcher_bar_set_policy (HdyViewSwitcherBar *self,
                                  HdyViewSwitcherPolicy policy);

Sets the policy of self .

Parameters

self

a HdyViewSwitcherBar

 

policy

the new policy

 

Since: 0.0.10


hdy_view_switcher_bar_get_icon_size ()

GtkIconSize
hdy_view_switcher_bar_get_icon_size (HdyViewSwitcherBar *self);

Get the icon size of the images used in the HdyViewSwitcher.

Parameters

self

a HdyViewSwitcherBar

 

Returns

the icon size of the images

Since: 0.0.10


hdy_view_switcher_bar_set_icon_size ()

void
hdy_view_switcher_bar_set_icon_size (HdyViewSwitcherBar *self,
                                     GtkIconSize icon_size);

Change the icon size hint for the icons in a HdyViewSwitcher.

Parameters

self

a HdyViewSwitcherBar

 

icon_size

the new icon size

 

Since: 0.0.10


hdy_view_switcher_bar_get_stack ()

GtkStack *
hdy_view_switcher_bar_get_stack (HdyViewSwitcherBar *self);

Get the GtkStack being controlled by the HdyViewSwitcher.

Parameters

self

a HdyViewSwitcherBar

 

Returns

the GtkStack, or NULL if none has been set.

[nullable][transfer none]

Since: 0.0.10


hdy_view_switcher_bar_set_stack ()

void
hdy_view_switcher_bar_set_stack (HdyViewSwitcherBar *self,
                                 GtkStack *stack);

Sets the GtkStack to control.

Parameters

self

a HdyViewSwitcherBar

 

stack

a GtkStack.

[nullable]

Since: 0.0.10


hdy_view_switcher_bar_get_reveal ()

gboolean
hdy_view_switcher_bar_get_reveal (HdyViewSwitcherBar *self);

Gets whether self should be revealed or not.

Parameters

self

a HdyViewSwitcherBar

 

Returns

TRUE if self is revealed, FALSE if not.

Since: 0.0.10


hdy_view_switcher_bar_set_reveal ()

void
hdy_view_switcher_bar_set_reveal (HdyViewSwitcherBar *self,
                                  gboolean reveal);

Sets whether self should be revealed or not.

Parameters

self

a HdyViewSwitcherBar

 

reveal

TRUE to reveal self

 

Since: 0.0.10

Types and Values

HDY_TYPE_VIEW_SWITCHER_BAR

#define HDY_TYPE_VIEW_SWITCHER_BAR (hdy_view_switcher_bar_get_type())

HdyViewSwitcherBarClass

typedef struct {
  GtkBinClass parent_class;
} HdyViewSwitcherBarClass;

HdyViewSwitcherBar

typedef struct _HdyViewSwitcherBar HdyViewSwitcherBar;

Property Details

The “icon-size” property

  “icon-size”                gint

Use the "icon-size" property to hint the icons to use, you almost certainly want to leave this as GTK_ICON_SIZE_BUTTON.

Flags: Read / Write

Allowed values: >= 0

Default value: 4

Since: 0.0.10


The “policy” property

  “policy”                   HdyViewSwitcherPolicy

The HdyViewSwitcherPolicy the HdyViewSwitcher should use to determine which mode to use.

Flags: Read / Write

Default value: HDY_VIEW_SWITCHER_POLICY_NARROW

Since: 0.0.10


The “reveal” property

  “reveal”                   gboolean

Whether the bar should be revealed or hidden.

Flags: Read / Write

Default value: FALSE

Since: 0.0.10


The “stack” property

  “stack”                    GtkStack *

The GtkStack the HdyViewSwitcher controls.

Flags: Read / Write

Since: 0.0.10