CtkStackSwitcher: CTK+ 3 Reference Manual

## CtkStackSwitcher CtkStackSwitcher — A controller for CtkStack |

## Functions

CtkWidget * | ctk_stack_switcher_new ()
void | ctk_stack_switcher_set_stack ()
CtkStack * | ctk_stack_switcher_get_stack ()

## Properties

int | icon-size | Read / Write
CtkStack * | stack | Read / Write / Construct

## Types and Values

struct | CtkStackSwitcher

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── CtkWidget
                ╰── CtkContainer
                    ╰── CtkBox
                        ╰── CtkStackSwitcher

## Implemented Interfaces

CtkStackSwitcher implements AtkImplementorIface, CtkBuildable and CtkOrientable.

## Includes

    #include <ctk/ctk.h>

## Description

The CtkStackSwitcher widget acts as a controller for a CtkStack; it shows a row of buttons to switch between the various pages of the associated stack widget.

All the content for the buttons comes from the child properties of the CtkStack; the button visibility in a CtkStackSwitcher widget is controlled by the visibility of the child in the CtkStack.

It is possible to associate multiple CtkStackSwitcher widgets with the same CtkStack widget.

The CtkStackSwitcher widget was added in 3.10.

### CSS nodes

CtkStackSwitcher has a single CSS node named stackswitcher and style class .stack-switcher.

When circumstances require it, CtkStackSwitcher adds the .needs-attention style class to the widgets representing the stack pages.

## Functions

### ctk_stack_switcher_new ()

    CtkWidget *
    ctk_stack_switcher_new (void);

Create a new CtkStackSwitcher.

#### Returns

a new CtkStackSwitcher.

Since: 3.10

### ctk_stack_switcher_set_stack ()

    void
    ctk_stack_switcher_set_stack (CtkStackSwitcher *switcher,
                                  CtkStack *stack);

Sets the stack to control.

#### Parameters

switcher | a CtkStackSwitcher |
stack | a CtkStack. | [allow-none]

Since: 3.10

### ctk_stack_switcher_get_stack ()

    CtkStack *
    ctk_stack_switcher_get_stack (CtkStackSwitcher *switcher);

Retrieves the stack. See `ctk_stack_switcher_set_stack()`.

#### Parameters

switcher | a CtkStackSwitcher |

#### Returns

the stack, or `NULL` if none has been set explicitly.

[nullable][transfer none]

Since: 3.10

## Types and Values

### struct CtkStackSwitcher

    struct CtkStackSwitcher;

## Property Details

### The `“icon-size”` property

      “icon-size”                int

Use the "icon-size" property to change the size of the image displayed when a CtkStackSwitcher is displaying icons.

Owner: CtkStackSwitcher

Flags: Read / Write

Allowed values: >= 0

Default value: 1

Since: 3.20

### The `“stack”` property

      “stack”                    CtkStack *

Stack.

Owner: CtkStackSwitcher

Flags: Read / Write / Construct

## See Also

CtkStack