adw-view-switcher-title

adw-view-switcher-title

Functions

Properties

AdwViewSwitcherPolicy policy Read / Write
GtkStack * stack Read / Write
char * subtitle Read / Write
char * title Read / Write
gboolean title-visible Read
gboolean view-switcher-enabled Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── AdwViewSwitcherTitle

Implemented Interfaces

AdwViewSwitcherTitle implements GtkAccessible, GtkBuildable and GtkConstraintTarget.

Description

Functions

adw_view_switcher_title_new ()

GtkWidget *
adw_view_switcher_title_new (void);

Creates a new AdwViewSwitcherTitle widget.

Returns

a new AdwViewSwitcherTitle

Since: 1.0


adw_view_switcher_title_get_policy ()

AdwViewSwitcherPolicy
adw_view_switcher_title_get_policy (AdwViewSwitcherTitle *self);

Gets the policy of self .

Parameters

Returns

the policy of self

Since: 1.0


adw_view_switcher_title_set_policy ()

void
adw_view_switcher_title_set_policy (AdwViewSwitcherTitle *self,
                                    AdwViewSwitcherPolicy policy);

Sets the policy of self .

Parameters

self

a AdwViewSwitcherTitle

 

policy

the new policy

 

Since: 1.0


adw_view_switcher_title_get_stack ()

GtkStack *
adw_view_switcher_title_get_stack (AdwViewSwitcherTitle *self);

Get the GtkStack being controlled by the AdwViewSwitcher.

Parameters

Returns

the GtkStack, or NULL if none has been set.

[nullable][transfer none]

Since: 1.0


adw_view_switcher_title_set_stack ()

void
adw_view_switcher_title_set_stack (AdwViewSwitcherTitle *self,
                                   GtkStack *stack);

Sets the GtkStack to control.

Parameters

self

a AdwViewSwitcherTitle

 

stack

a GtkStack.

[nullable]

Since: 1.0


adw_view_switcher_title_get_title ()

const char *
adw_view_switcher_title_get_title (AdwViewSwitcherTitle *self);

Gets the title of self . See adw_view_switcher_title_set_title().

Parameters

Returns

the title of self , or NULL.

[transfer none][nullable]

Since: 1.0


adw_view_switcher_title_set_title ()

void
adw_view_switcher_title_set_title (AdwViewSwitcherTitle *self,
                                   const char *title);

Sets the title of self . The title should give a user additional details. A good title should not include the application name.

Parameters

self

a AdwViewSwitcherTitle

 

title

a title, or NULL.

[nullable]

Since: 1.0


adw_view_switcher_title_get_subtitle ()

const char *
adw_view_switcher_title_get_subtitle (AdwViewSwitcherTitle *self);

Gets the subtitle of self . See adw_view_switcher_title_set_subtitle().

Parameters

Returns

the subtitle of self , or NULL.

[transfer none][nullable]

Since: 1.0


adw_view_switcher_title_set_subtitle ()

void
adw_view_switcher_title_set_subtitle (AdwViewSwitcherTitle *self,
                                      const char *subtitle);

Sets the subtitle of self . The subtitle should give a user additional details.

Parameters

self

a AdwViewSwitcherTitle

 

subtitle

a subtitle, or NULL.

[nullable]

Since: 1.0


adw_view_switcher_title_get_view_switcher_enabled ()

gboolean
adw_view_switcher_title_get_view_switcher_enabled
                               (AdwViewSwitcherTitle *self);

Gets whether self 's view switcher is enabled.

See adw_view_switcher_title_set_view_switcher_enabled().

Parameters

Returns

TRUE if the view switcher is enabled, FALSE otherwise.

Since: 1.0


adw_view_switcher_title_set_view_switcher_enabled ()

void
adw_view_switcher_title_set_view_switcher_enabled
                               (AdwViewSwitcherTitle *self,
                                gboolean enabled);

Make self enable or disable its view switcher. If it is disabled, the title will be displayed instead. This allows to programmatically and prematurely hide the view switcher of self even if it fits in the available space.

This can be used e.g. to ensure the view switcher is hidden below a certain window width, or any other constraint you find suitable.

Parameters

self

a AdwViewSwitcherTitle

 

enabled

TRUE to enable the view switcher, FALSE to disable it

 

Since: 1.0


adw_view_switcher_title_get_title_visible ()

gboolean
adw_view_switcher_title_get_title_visible
                               (AdwViewSwitcherTitle *self);

Get whether the title label of self is visible.

Parameters

Returns

TRUE if the title label of self is visible, FALSE if not.

Since: 1.0

Types and Values

ADW_TYPE_VIEW_SWITCHER_TITLE

#define ADW_TYPE_VIEW_SWITCHER_TITLE (adw_view_switcher_title_get_type())

AdwViewSwitcherTitle

typedef struct _AdwViewSwitcherTitle AdwViewSwitcherTitle;

Property Details

The “policy” property

  “policy”                   AdwViewSwitcherPolicy

The AdwViewSwitcherPolicy the AdwViewSwitcher should use to determine which mode to use.

Owner: AdwViewSwitcherTitle

Flags: Read / Write

Default value: ADW_VIEW_SWITCHER_POLICY_AUTO

Since: 1.0


The “stack” property

  “stack”                    GtkStack *

The GtkStack the AdwViewSwitcher controls.

Owner: AdwViewSwitcherTitle

Flags: Read / Write

Since: 1.0


The “subtitle” property

  “subtitle”                 char *

The subtitle of the AdwViewSwitcher.

Owner: AdwViewSwitcherTitle

Flags: Read / Write

Default value: NULL

Since: 1.0


The “title” property

  “title”                    char *

The title of the AdwViewSwitcher.

Owner: AdwViewSwitcherTitle

Flags: Read / Write

Default value: NULL

Since: 1.0


The “title-visible” property

  “title-visible”            gboolean

Whether the bar should be revealed or hidden.

Owner: AdwViewSwitcherTitle

Flags: Read

Default value: TRUE

Since: 1.0


The “view-switcher-enabled” property

  “view-switcher-enabled”    gboolean

Whether the bar should be revealed or hidden.

Owner: AdwViewSwitcherTitle

Flags: Read / Write

Default value: TRUE

Since: 1.0