GatSidebarWindow

GatSidebarWindow — A window with an automatic sidebar

Functions

Properties

gchar * sidebar-title Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── GatGnomeAppWindow
                            ╰── GatSidebarWindow

Description

A GatSidebarWindow enables you to quickly build an application UI that contains a content area, and a sidebar area.

The application window is automatically split into two major parts, and enables separate "headers" (titles) for the sidebar area, and the main content area.

When adding content to the window, you should use gat_sidebar_window_get_content_area This returns a GtkBox in a vertical orientation, enabling you to add anything you wish.

When manipulating the sidebar area, you should use gat_sidebar_window_get_sidebar This returns a GtkRevealer which has its content hidden by default. This enables derived UIs to hide the sidebar when it is not required. Note no transition is enabled by default, this is left to the application developer to implement.

Functions

gat_sidebar_window_new ()

GtkWidget *
gat_sidebar_window_new (void);

Construct a new GatSidebarWindow

Returns

a new GatSidebarWindow.

[transfer full]


gat_sidebar_window_get_sidebar ()

GtkWidget *
gat_sidebar_window_get_sidebar (GatSidebarWindow *window);

This method returns the sidebar area of the GatSidebarWindow. By default this is a GtkRevealer, which is hidden. When adding to the sidebar area, do so as with any normal GtkContainer.

This uses the left-hand side of the UI, and will only use as much space as required by the widget. Notice that the sidebar header will match the size of the sidebar itself.

Parameters

window

A GatSidebarWindow

 

Returns

the sidebar.

[transfer none]


gat_sidebar_window_get_content_area ()

GtkWidget *
gat_sidebar_window_get_content_area (GatSidebarWindow *window);

This method returns the main content area of the GatSidebarWindow This is by default a vertical GtkBox, which is configured to use as much space as possible within the UI.

Parameters

window

A GatSidebarWindow

 

Returns

content area.

[transfer none]


gat_sidebar_window_set_sidebar_title ()

void
gat_sidebar_window_set_sidebar_title (GatSidebarWindow *window,
                                      const gchar *title);

Update the sidebar title of the GatSidebarWindow. This will be displayed in the header area above the sidebar itself. The UI will automatically adjust the allocation using a GtkSizeGroup

Parameters

window

A GatSidebarWindow

 

title

The new sidebar title

 

gat_sidebar_window_get_sidebar_title ()

const gchar *
gat_sidebar_window_get_sidebar_title (GatSidebarWindow *window);

Get the currently set sidebar title. Do not free this string, as GatSidebarWindow owns this reference.

Parameters

window

A GatSidebarWindow

 

Returns

Current sidebar title.

[transfer none]


gat_sidebar_window_get_headerbar ()

GtkWidget *
gat_sidebar_window_get_headerbar (GatSidebarWindow *window,
                                  GatHeaderbarPosition position);

Get a specific GtkHeaderBar widget for this GatSidebarWindow. This enables developers to add custom widgets to the headers to add their own forms of interaction.

Parameters

window

A GatSidebarWindow

 

position

Which header to return

 

Returns

Underlying GtkHeaderBar.

[transfer none]

Types and Values

enum GatHeaderbarPosition

Used to specify the positon of the headerbar widget being retrieved via gat_sidebar_window_get_headerbar

Members

GAT_HEADERBAR_POSITION_MIN

   

GAT_HEADERBAR_POSITION_SIDEBAR

Left (sidebar) header widget

 

GAT_HEADERBAR_POSITION_MAIN

Center (main) header widget

 

GAT_HEADERBAR_POSITION_MAX

   

Property Details

The “sidebar-title” property

  “sidebar-title”            gchar *

Title to display in sidebar header.

Flags: Read / Write

Default value: "Sidebar"