## BrowserPage BrowserPage — A "page" within a BrowserPerspective widget |

## Stability Level

Stable, unless otherwise indicated

## Synopsis

    #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);

## Description

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.

## Details

### BROWSER_PAGE_TYPE

    #define BROWSER_PAGE_TYPE            (browser_page_get_type())

### BROWSER_PAGE()

    #define BROWSER_PAGE(obj)            (G_TYPE_CHECK_INSTANCE_CAST (obj, BROWSER_PAGE_TYPE, BrowserPage))

### IS_BROWSER_PAGE()

    #define IS_BROWSER_PAGE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE (obj, BROWSER_PAGE_TYPE))

### BROWSER_PAGE_GET_CLASS()

    #define BROWSER_PAGE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BROWSER_PAGE_TYPE, BrowserPageIface))

### 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;

### browser_page_get_type ()

    GType               browser_page_get_type               (void);

### browser_page_get_actions_group ()

    GtkActionGroup *    browser_page_get_actions_group      (BrowserPage *page);

Get the GtkActionGroup from a `page` to represent its specific actions.

`page` : | an object implementing the BrowserPage interface
Returns : | a new GtkActionGroup

### browser_page_get_actions_ui ()

    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.

`page` : | an object implementing the BrowserPage interface
Returns : | a read-only string

### browser_page_get_perspective ()

    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.

`page` : | an object implementing the BrowserPage interface
Returns : | the BrowserPerspective

### browser_page_get_tab_label ()

    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.

`page` : | an object implementing the BrowserPage interface
`out_close_button` : | a place holder to hold a pointer to a close button
Returns : | a new GtkWidget, or `NULL`