Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | gat_sidebar_window_new () |
GtkWidget * | gat_sidebar_window_get_sidebar () |
GtkWidget * | gat_sidebar_window_get_content_area () |
void | gat_sidebar_window_set_sidebar_title () |
const gchar * | gat_sidebar_window_get_sidebar_title () |
GtkWidget * | gat_sidebar_window_get_headerbar () |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkWindow ╰── GatGnomeAppWindow ╰── GatSidebarWindow
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.
GtkWidget *
gat_sidebar_window_new (void
);
Construct a new GatSidebarWindow
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.
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.
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
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.
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.
Used to specify the positon of the headerbar widget being retrieved via gat_sidebar_window_get_headerbar