IdeLayoutStack: Builder SDK Reference

## IdeLayoutStack IdeLayoutStack — A stack of IdeLayoutView |

## Functions

GtkWidget * | ide_layout_stack_new ()
GtkWidget * | ide_layout_stack_get_titlebar ()
IdeLayoutView * | ide_layout_stack_get_visible_child ()
void | ide_layout_stack_set_visible_child ()
gboolean | ide_layout_stack_get_has_view ()
void | ide_layout_stack_agree_to_close_async ()
gboolean | ide_layout_stack_agree_to_close_finish ()
void | ide_layout_stack_foreach_view ()
void | ide_layout_stack_add_with_depth ()

## Properties

gboolean | has-view | Read
IdeLayoutView * | visible-child | Read / Write

## Signals

void | change-current-page | Action

## Types and Values

#define | IDE_TYPE_LAYOUT_STACK
struct | IdeLayoutStackClass
| IdeLayoutStack

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── IdeLayoutStack

## Implemented Interfaces

IdeLayoutStack implements AtkImplementorIface, GtkBuildable, GtkOrientable and GListModel.

## Description

This widget is used to represent a stack of IdeLayoutView widgets. it includes an IdeLayoutStackHeader at the top, and then a stack of views below.

If there are no IdeLayoutView visibile, then an empty state widget is displayed with some common information for the user.

To simplify integration with other systems, IdeLayoutStack implements the GListModel interface for each of the IdeLayoutView.

## Functions

### ide_layout_stack_new ()

    GtkWidget *
    ide_layout_stack_new (void);

### ide_layout_stack_get_titlebar ()

    GtkWidget *
    ide_layout_stack_get_titlebar (IdeLayoutStack *self);

Gets the IdeLayoutStackHeader header that is at the top of the stack.

#### Parameters

self | a IdeLayoutStack |

#### Returns

The layout stack header.

[transfer none][type Ide.LayoutStackHeader]

Since: 3.26

### ide_layout_stack_get_visible_child ()

    IdeLayoutView *
    ide_layout_stack_get_visible_child (IdeLayoutStack *self);

Gets the visible IdeLayoutView if there is one; otherwise `NULL`.

#### Parameters

self | a IdeLayoutStack |

#### Returns

An IdeLayoutView or `NULL`.

[nullable][transfer none]

Since: 3.26

### ide_layout_stack_set_visible_child ()

    void
    ide_layout_stack_set_visible_child (IdeLayoutStack *self,
                                        IdeLayoutView *view);

Sets the current view for the stack.

#### Parameters

self | a IdeLayoutStack |

Since: 3.26

### ide_layout_stack_get_has_view ()

    gboolean
    ide_layout_stack_get_has_view (IdeLayoutStack *self);

Gets the "has-view" property.

This property is a convenience to allow widgets to easily bind properties based on whether or not a view is visible in the stack.

#### Parameters

self | an IdeLayoutStack |

#### Returns

`TRUE` if the stack has a view

Since: 3.26

### ide_layout_stack_agree_to_close_async ()

    void
    ide_layout_stack_agree_to_close_async (IdeLayoutStack *self,
                                           GCancellable *cancellable,
                                           GAsyncReadyCallback callback,
                                           gpointer user_data);

### ide_layout_stack_agree_to_close_finish ()

    gboolean
    ide_layout_stack_agree_to_close_finish
                                   (IdeLayoutStack *self,
                                    GAsyncResult *result,
                                    GError **error);

### ide_layout_stack_foreach_view ()

    void
    ide_layout_stack_foreach_view (IdeLayoutStack *self,
                                   GtkCallback callback,
                                   gpointer user_data);

This function will call `callback` for every view found in `self` .

#### Parameters

self | a IdeLayoutStack |
callback | A callback for each view. | [scope call][closure user_data]
user_data | user data for `callback` |

Since: 3.26

### ide_layout_stack_add_with_depth ()

    void
    ide_layout_stack_add_with_depth (IdeLayoutStack *self,
                                     GtkWidget *widget,
                                     guint position);

## Types and Values

### IDE_TYPE_LAYOUT_STACK

    #define IDE_TYPE_LAYOUT_STACK (ide_layout_stack_get_type())

### struct IdeLayoutStackClass

    struct IdeLayoutStackClass {
      GtkBoxClass parent_class;

      void     (*agree_to_close_async)  (IdeLayoutStack       *stack,
                                         GCancellable         *cancellable,
                                         GAsyncReadyCallback   callback,
                                         gpointer              user_data);
      gboolean (*agree_to_close_finish) (IdeLayoutStack       *stack,
                                         GAsyncResult         *result,
                                         GError              **error);
    };

### IdeLayoutStack

    typedef struct _IdeLayoutStack IdeLayoutStack;

## Property Details

### The `“has-view”` property

      “has-view”                 gboolean

Flags: Read

Default value: FALSE

### The `“visible-child”` property

      “visible-child”            IdeLayoutView *

The current view to be displayed.

Flags: Read / Write

## Signal Details

### The `“change-current-page”` signal

    void
    user_function (IdeLayoutStack *idelayoutstack,
                   gint            arg1,
                   gpointer        user_data)

Flags: Action