BrowserPerspective: GdaBrowser hacking manual

## BrowserPerspective BrowserPerspective — A "perspective" in a BrowserWindow window |

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | BROWSER_PERSPECTIVE()
#define | IS_BROWSER_PERSPECTIVE()
#define | BROWSER_PERSPECTIVE_GET_CLASS()
GType | browser_perspective_get_type ()
BrowserWindow * | browser_perspective_get_window ()
GtkActionGroup * | browser_perspective_get_actions_group ()
const gchar * | browser_perspective_get_actions_ui ()
void | browser_perspective_get_current_customization ()
void | browser_perspective_page_tab_label_change ()
void | browser_perspective_declare_notebook ()

## Types and Values

#define | BROWSER_PERSPECTIVE_TYPE
| BrowserPerspective

## Object Hierarchy

        GInterface
        ╰── BrowserPerspective

## Prerequisites

BrowserPerspective requires GtkWidget.

## Known Implementations

BrowserPerspective is implemented by DataManagerPerspective, QueryExecPerspective and SchemaBrowserPerspective.

## Description

BrowserPerspective is an interface used by the BrowserWindow object to switch between the activities ("perspectives"); it requires the GtkWidget.

## Functions

### BROWSER_PERSPECTIVE()

    #define BROWSER_PERSPECTIVE(obj)            (G_TYPE_CHECK_INSTANCE_CAST (obj, BROWSER_PERSPECTIVE_TYPE, BrowserPerspective))

### IS_BROWSER_PERSPECTIVE()

    #define IS_BROWSER_PERSPECTIVE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE (obj, BROWSER_PERSPECTIVE_TYPE))

### BROWSER_PERSPECTIVE_GET_CLASS()

    #define BROWSER_PERSPECTIVE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BROWSER_PERSPECTIVE_TYPE, BrowserPerspectiveIface))

### browser_perspective_get_type ()

    GType
    browser_perspective_get_type (void);

### browser_perspective_get_window ()

    BrowserWindow *
    browser_perspective_get_window (BrowserPerspective *perspective);

#### Parameters

pers | an object implementing the BrowserPerspective interface |

#### Returns

the BrowserWindow `perspective` is in.

[transfer none]

### browser_perspective_get_actions_group ()

    GtkActionGroup *
    browser_perspective_get_actions_group (BrowserPerspective *perspective);

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

#### Parameters

pers | an object implementing the BrowserPerspective interface |

#### Returns

a new GtkActionGroup

### browser_perspective_get_actions_ui ()

    const gchar *
    browser_perspective_get_actions_ui (BrowserPerspective *perspective);

Get the UI definition from a perspective to represent how its specific actions (obtained using `browser_perspective_get_actions_group()`) are to be integrated in a BrowserWindow's menu and toolbar.

#### Parameters

pers | an object implementing the BrowserPerspective interface |

#### Returns

a read-only string

### browser_perspective_get_current_customization ()

    void
    browser_perspective_get_current_customization
                                   (BrowserPerspective *perspective,
                                    GtkActionGroup **out_agroup,
                                    const gchar **out_ui);

Rem: *`out_agroup` is a new object and should be unref'ed when not needed anymore

#### Parameters

pers | an object implementing the BrowserPerspective interface |
out_agroup | a place to store the returned GtkActionGroup, not `NULL`. | [transfer full]
out_ui | a place to store the returned UI string, not `NULL`. | [transfer none]

### browser_perspective_page_tab_label_change ()

    void
    browser_perspective_page_tab_label_change
                                   (BrowserPerspective *perspective,
                                    BrowserPage *page);

When `pers` organizes its contents as pages in a notebook, each page may request that the tab's label may be changed, and the purpose of this method is to request that `pers` update the tab's label associated to `page` .

#### Parameters

pers | an object implementing the BrowserPerspective interface |
page | an object implementing the BrowserPage interface |

### browser_perspective_declare_notebook ()

    void
    browser_perspective_declare_notebook (BrowserPerspective *perspective,
                                          GtkNotebook *nb);

Internally used by browser's perspectives to declare they internally use a notebook which state is modified when switching to and from fullscreen

#### Parameters

pers | an object implementing the BrowserPerspective interface |
nb | a GtkNotebook |

## Types and Values

### BROWSER_PERSPECTIVE_TYPE

    #define BROWSER_PERSPECTIVE_TYPE            (browser_perspective_get_type())

### BrowserPerspective

    typedef struct _BrowserPerspective BrowserPerspective;