GtkSidebar

GtkSidebar — An automatic sidebar widget

Functions

Properties

GtkStack * stack Read / Write

Types and Values

struct GtkSidebar
struct GtkSidebarClass

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkSidebar

Implemented Interfaces

GtkSidebar implements AtkImplementorIface and GtkBuildable.

Includes

#include <gtk/gtk.h>

Description

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

In order to use a GtkSidebar, you simply use a GtkStack to organize your UI flow, and add the sidebar to your sidebar area. You can use gtk_sidebar_set_stack() to connect the GtkSidebar to the GtkStack.

Functions

gtk_sidebar_new ()

GtkWidget *
gtk_sidebar_new (void);

Creates a new sidebar.

Returns

the new GtkSidebar

Since 3.16


gtk_sidebar_set_stack ()

void
gtk_sidebar_set_stack (GtkSidebar *sidebar,
                       GtkStack *stack);

Set the GtkStack associated with this GtkSidebar.

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

Parameters

sidebar

a GtkSidebar

 

stack

a GtkStack

 

Since 3.16


gtk_sidebar_get_stack ()

GtkStack *
gtk_sidebar_get_stack (GtkSidebar *sidebar);

Retrieves the stack. See gtk_sidebar_set_stack().

Parameters

sidebar

a GtkSidebar

 

Returns

the associated GtkStack or NULL if none has been set explicitly.

[transfer full]

Since 3.16

Types and Values

struct GtkSidebar

struct GtkSidebar;

struct GtkSidebarClass

struct GtkSidebarClass {
  GtkBinClass parent_class;

  /* Padding for future expansion */
  void (*_gtk_reserved1) (void);
  void (*_gtk_reserved2) (void);
  void (*_gtk_reserved3) (void);
  void (*_gtk_reserved4) (void);
};

Property Details

The “stack” property

  “stack”                    GtkStack *

Associated stack for this GtkSidebar.

Flags: Read / Write