CtkStackSidebar: CTK+ 3 Reference Manual

## CtkStackSidebar CtkStackSidebar — An automatic sidebar widget |

## Functions

CtkWidget * | ctk_stack_sidebar_new ()
void | ctk_stack_sidebar_set_stack ()
CtkStack * | ctk_stack_sidebar_get_stack ()

## Properties

CtkStack * | stack | Read / Write

## Types and Values

struct | CtkStackSidebar
struct | CtkStackSidebarClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── CtkWidget
                ╰── CtkContainer
                    ╰── CtkBin
                        ╰── CtkStackSidebar

## Implemented Interfaces

CtkStackSidebar implements AtkImplementorIface and CtkBuildable.

## Includes

    #include <ctk/ctk.h>

## Description

A CtkStackSidebar enables you to quickly and easily provide a consistent "sidebar" object for your user interface.

In order to use a CtkStackSidebar, you simply use a CtkStack to organize your UI flow, and add the sidebar to your sidebar area. You can use `ctk_stack_sidebar_set_stack()` to connect the CtkStackSidebar to the CtkStack.

### CSS nodes

CtkStackSidebar has a single CSS node with name stacksidebar and style class .sidebar.

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

## Functions

### ctk_stack_sidebar_new ()

    CtkWidget *
    ctk_stack_sidebar_new (void);

Creates a new sidebar.

#### Returns

the new CtkStackSidebar

Since: 3.16

### ctk_stack_sidebar_set_stack ()

    void
    ctk_stack_sidebar_set_stack (CtkStackSidebar *sidebar,
                                 CtkStack *stack);

Set the CtkStack associated with this CtkStackSidebar.

The sidebar widget will automatically update according to the order (packing) and items within the given CtkStack.

#### Parameters

sidebar | a CtkStackSidebar |
stack | a CtkStack |

Since: 3.16

### ctk_stack_sidebar_get_stack ()

    CtkStack *
    ctk_stack_sidebar_get_stack (CtkStackSidebar *sidebar);

Retrieves the stack. See `ctk_stack_sidebar_set_stack()`.

#### Parameters

sidebar | a CtkStackSidebar |

#### Returns

the associated CtkStack or `NULL` if none has been set explicitly.

[nullable][transfer none]

Since: 3.16

## Types and Values

### struct CtkStackSidebar

    struct CtkStackSidebar;

### struct CtkStackSidebarClass

    struct CtkStackSidebarClass {
      CtkBinClass parent_class;
    };

#### Members

## Property Details

### The `“stack”` property

      “stack”                    CtkStack *

Associated stack for this CtkStackSidebar.

Owner: CtkStackSidebar

Flags: Read / Write