Top | ![]() |
![]() |
![]() |
![]() |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkWindow ╰── XAppPreferencesWindow
The XAppPreferencesWindow sets up a simple dialog window with a GtkStack, GtkSidebarSwitcher, and GtkActionBar. The stack switcher and action bar only show when needed.
XAppPreferencesWindow *
xapp_preferences_window_new (void
);
Creates a new XAppPreferencesWindow.
void xapp_preferences_window_add_page (XAppPreferencesWindow *window
,GtkWidget *widget
,const gchar *name
,const gchar *title
);
Adds a page to the window. The page is identified by name. The title will be used in the sidebar so should be short. The sidebar will show automatically once at least two pages are added.
window |
||
widget |
a GtkWidget to add |
|
name |
the name for the page |
|
title |
a human-readable title for the page |
void xapp_preferences_window_add_button (XAppPreferencesWindow *window
,GtkWidget *button
,GtkPackType pack_type
);
Adds a button to the bottom action bar of the window. Where the button is place will be determined by the GtkPackType. The action bar will show automatically once at least one button is added.
#define XAPP_TYPE_PREFERENCES_WINDOW (xapp_preferences_window_get_type ())
struct XAppPreferencesWindowClass { GtkWindowClass parent_class; /* Keybinding signals */ void (* close) (XAppPreferencesWindow *window); };
“close”
signalvoid user_function (XAppPreferencesWindow *xapppreferenceswindow, gpointer user_data)
Flags: Action