| GdaBrowser hacking manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
BrowserPageBrowserPage — A "page" within a BrowserPerspective widget |
#define BROWSER_PAGE_TYPE #define BROWSER_PAGE (obj) #define IS_BROWSER_PAGE (obj) #define BROWSER_PAGE_GET_CLASS (obj) BrowserPageIface; GType browser_page_get_type (void); GtkActionGroup * browser_page_get_actions_group (BrowserPage *page); const gchar * browser_page_get_actions_ui (BrowserPage *page); BrowserPerspective * browser_page_get_perspective (BrowserPage *page); GtkWidget * browser_page_get_tab_label (BrowserPage *page,GtkWidget **out_close_button);
Some widgets packed within a BrowserPerspective can implement the BrowserPage interface to specify their specific actions and menu and toolbar customizations. When they are packed in a notebook, they can also request some specific tab labels.
#define BROWSER_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, BROWSER_PAGE_TYPE, BrowserPage))
|
#define IS_BROWSER_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, BROWSER_PAGE_TYPE))
|
#define BROWSER_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BROWSER_PAGE_TYPE, BrowserPageIface))
|
typedef struct {
GTypeInterface g_iface;
/* virtual table */
GtkActionGroup *(* i_get_actions_group) (BrowserPage *page);
const gchar *(* i_get_actions_ui) (BrowserPage *page);
GtkWidget *(* i_get_tab_label) (BrowserPage *page, GtkWidget **out_close_button);
} BrowserPageIface;
GtkActionGroup * browser_page_get_actions_group (BrowserPage *page);
Get the GtkActionGroup from a page to represent its specific actions.
|
an object implementing the BrowserPage interface |
Returns : |
a new GtkActionGroup |
const gchar * browser_page_get_actions_ui (BrowserPage *page);
Get the UI definition from page to represent how its specific actions (obtained
using browser_page_get_actions_group()) are to be integrated in a BrowserWindow's menu
and toolbar.
|
an object implementing the BrowserPage interface |
Returns : |
a read-only string |
BrowserPerspective * browser_page_get_perspective (BrowserPage *page);
Finds the BrowserPerspective in which page is. Note that the BrowserPerspective may
have changed since a previous call as users are allowed to do some drag and drop between
browser's windows which contain different BrowserPerspective objects.
|
an object implementing the BrowserPage interface |
Returns : |
the BrowserPerspective |
GtkWidget * browser_page_get_tab_label (BrowserPage *page,GtkWidget **out_close_button);
Get a new widget to be packed in a notebook's tab label.
If out_close_button is not NULL, then the implementation may decide to add
a button to close the tab; if out_close_button is NULL, then it should not add
any close button.