IdeLayoutView: Builder SDK Reference

## IdeLayoutView IdeLayoutView |

## Functions

GtkWidget * | ide_layout_view_new ()
gboolean | ide_layout_view_get_can_split ()
void | ide_layout_view_set_can_split ()
IdeLayoutView * | ide_layout_view_create_split_view ()
const gchar * | ide_layout_view_get_icon_name ()
void | ide_layout_view_set_icon_name ()
GIcon * | ide_layout_view_get_icon ()
void | ide_layout_view_set_icon ()
gboolean | ide_layout_view_get_failed ()
void | ide_layout_view_set_failed ()
const gchar * | ide_layout_view_get_menu_id ()
void | ide_layout_view_set_menu_id ()
gboolean | ide_layout_view_get_modified ()
void | ide_layout_view_set_modified ()
const gchar * | ide_layout_view_get_title ()
void | ide_layout_view_set_title ()
const GdkRGBA * | ide_layout_view_get_primary_color_bg ()
void | ide_layout_view_set_primary_color_bg ()
const GdkRGBA * | ide_layout_view_get_primary_color_fg ()
void | ide_layout_view_set_primary_color_fg ()
void | ide_layout_view_agree_to_close_async ()
gboolean | ide_layout_view_agree_to_close_finish ()
void | ide_layout_view_report_error ()

## Properties

gboolean | can-split | Read / Write
gboolean | failed | Read / Write
GIcon * | icon | Read / Write
gchar * | icon-name | Read / Write
gchar * | menu-id | Read / Write
gboolean | modified | Read / Write
GdkRGBA * | primary-color-bg | Read / Write
GdkRGBA * | primary-color-fg | Read / Write
gchar * | title | Read / Write

## Signals

IdeLayoutView* | create-split-view | Run Last

## Types and Values

#define | IDE_TYPE_LAYOUT_VIEW
struct | IdeLayoutViewClass
| IdeLayoutView

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── IdeLayoutView
                            ╰── IdeEditorView

## Implemented Interfaces

IdeLayoutView implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Description

## Functions

### ide_layout_view_new ()

    GtkWidget *
    ide_layout_view_new (void);

### ide_layout_view_get_can_split ()

    gboolean
    ide_layout_view_get_can_split (IdeLayoutView *self);

### ide_layout_view_set_can_split ()

    void
    ide_layout_view_set_can_split (IdeLayoutView *self,
                                   gboolean can_split);

### ide_layout_view_create_split_view ()

    IdeLayoutView *
    ide_layout_view_create_split_view (IdeLayoutView *self);

This function requests that the IdeLayoutView create a split version of itself so that the user may view the document in multiple views.

The view should be added to an IdeLayoutStack where appropriate.

#### Parameters

self | an IdeLayoutView |

#### Returns

A newly created IdeLayoutView or `NULL`.

[nullable][transfer full]

Since: 3.26

### ide_layout_view_get_icon_name ()

    const gchar *
    ide_layout_view_get_icon_name (IdeLayoutView *self);

### ide_layout_view_set_icon_name ()

    void
    ide_layout_view_set_icon_name (IdeLayoutView *self,
                                   const gchar *icon_name);

### ide_layout_view_get_icon ()

    GIcon *
    ide_layout_view_get_icon (IdeLayoutView *self);

Gets the GIcon to represent the view.

#### Parameters

self | a IdeLayoutView |

#### Returns

A GIcon or `NULL`.

[transfer none][nullable]

Since: 3.30

### ide_layout_view_set_icon ()

    void
    ide_layout_view_set_icon (IdeLayoutView *self,
                              GIcon *icon);

### ide_layout_view_get_failed ()

    gboolean
    ide_layout_view_get_failed (IdeLayoutView *self);

### ide_layout_view_set_failed ()

    void
    ide_layout_view_set_failed (IdeLayoutView *self,
                                gboolean failed);

### ide_layout_view_get_menu_id ()

    const gchar *
    ide_layout_view_get_menu_id (IdeLayoutView *self);

### ide_layout_view_set_menu_id ()

    void
    ide_layout_view_set_menu_id (IdeLayoutView *self,
                                 const gchar *menu_id);

### ide_layout_view_get_modified ()

    gboolean
    ide_layout_view_get_modified (IdeLayoutView *self);

### ide_layout_view_set_modified ()

    void
    ide_layout_view_set_modified (IdeLayoutView *self,
                                  gboolean modified);

### ide_layout_view_get_title ()

    const gchar *
    ide_layout_view_get_title (IdeLayoutView *self);

### ide_layout_view_set_title ()

    void
    ide_layout_view_set_title (IdeLayoutView *self,
                               const gchar *title);

### ide_layout_view_get_primary_color_bg ()

    const GdkRGBA *
    ide_layout_view_get_primary_color_bg (IdeLayoutView *self);

Gets the “primary-color-bg” property if it has been set.

The primary-color-bg can be used to alter the color of the layout stack header to match the document contents.

#### Parameters

self | a IdeLayoutView |

#### Returns

a GdkRGBA or `NULL`.

[transfer none][nullable]

Since: 3.26

### ide_layout_view_set_primary_color_bg ()

    void
    ide_layout_view_set_primary_color_bg (IdeLayoutView *self,
                                          const GdkRGBA *primary_color_bg);

Sets the “primary-color-bg” property. If `primary_color_bg` is `NULL`, the property is unset.

#### Parameters

self | a IdeLayoutView |
primary_color_bg | a GdkRGBA or `NULL`. | [nullable]

Since: 3.26

### ide_layout_view_get_primary_color_fg ()

    const GdkRGBA *
    ide_layout_view_get_primary_color_fg (IdeLayoutView *self);

Gets the “primary-color-fg” property if it has been set.

The primary-color-fg can be used to alter the foreground color of the layout stack header to match the document contents.

#### Parameters

self | a IdeLayoutView |

#### Returns

a GdkRGBA or `NULL`.

[transfer none][nullable]

Since: 3.26

### ide_layout_view_set_primary_color_fg ()

    void
    ide_layout_view_set_primary_color_fg (IdeLayoutView *self,
                                          const GdkRGBA *primary_color_fg);

Sets the “primary-color-fg” property. If `primary_color_fg` is `NULL`, the property is unset.

#### Parameters

self | a IdeLayoutView |
primary_color_fg | a GdkRGBA or `NULL`. | [nullable]

Since: 3.26

### ide_layout_view_agree_to_close_async ()

    void
    ide_layout_view_agree_to_close_async (IdeLayoutView *self,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

### ide_layout_view_agree_to_close_finish ()

    gboolean
    ide_layout_view_agree_to_close_finish (IdeLayoutView *self,
                                           GAsyncResult *result,
                                           GError **error);

### ide_layout_view_report_error ()

    void
    ide_layout_view_report_error (IdeLayoutView *self,
                                  const gchar *format,
                                  ...);

This function reports an error to the user in the layout view.

`format` should be a printf-style format string followed by the arguments for the format.

#### Parameters

self | a IdeLayoutView |
format | a printf-style format string |

Since: 3.26

## Types and Values

### IDE_TYPE_LAYOUT_VIEW

    #define IDE_TYPE_LAYOUT_VIEW (ide_layout_view_get_type())

### struct IdeLayoutViewClass

    struct IdeLayoutViewClass {
      GtkBoxClass parent_class;

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

### IdeLayoutView

    typedef struct _IdeLayoutView IdeLayoutView;

## Property Details

### The `“can-split”` property

      “can-split”                gboolean

If the view can be split into a second view.

Flags: Read / Write

Default value: FALSE

### The `“failed”` property

      “failed”                   gboolean

If the view has failed or crashed.

Flags: Read / Write

Default value: FALSE

### The `“icon”` property

      “icon”                     GIcon *

A GIcon for the view.

Flags: Read / Write

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

      “icon-name”                gchar *

The icon-name describing the view content.

Flags: Read / Write

Default value: "text-x-generic-symbolic"

### The `“menu-id”` property

      “menu-id”                  gchar *

The identifier of the GMenu to use in the document popover.

Flags: Read / Write

Default value: NULL

### The `“modified”` property

      “modified”                 gboolean

If the view has been modified from the saved content.

Flags: Read / Write

Default value: FALSE

### The `“primary-color-bg”` property

      “primary-color-bg”         GdkRGBA *

The "primary-color-bg" property should describe the primary color of the content of the view (if any).

This can be used by the layout stack to alter the color of the header to match that of the content.

Flags: Read / Write

Since: 3.26

### The `“primary-color-fg”` property

      “primary-color-fg”         GdkRGBA *

The "primary-color-fg" property should describe the foreground to use for content above primary-color-bg.

This can be used by the layout stack to alter the color of the foreground to match that of the content.

Flags: Read / Write

Since: 3.26

### The `“title”` property

      “title”                    gchar *

The title of the document or view.

Flags: Read / Write

Default value: NULL

## Signal Details

### The `“create-split-view”` signal

    IdeLayoutView*
    user_function (IdeLayoutView *Returns,
                   gpointer       user_data)

This signal is emitted when the view is requested to make a split version of itself. This happens when the user requests that a second version of the file to be displayed, often side-by-side.

This signal will only be emitted when “can-split” is set to `TRUE`. The default is `FALSE`.

#### Parameters

user_data | user data set when the signal handler was connected. |

#### Returns

A newly created IdeLayoutView.

[transfer full]

Flags: Run Last