GogEditor

## GogEditor GogEditor — Property editor build helper |

## Synopsis

                        GogEditor;
                        GogEditorPage;
    GogEditor*          gog_editor_new                      (void);
    void                gog_editor_free                     (GogEditor *editor);
    void                gog_editor_add_page                 (GogEditor *editor,
                                                             gpointer widget,
                                                             char const *label);
    void                gog_editor_set_store_page           (GogEditor *editor,
                                                             unsigned *store_page);
    GtkWidget*          gog_editor_get_notebook             (GogEditor *editor);
    GtkWidget*          gog_editor_get_registered_widget    (GogEditor *editor,
                                                             char const *name);
    void                gog_editor_register_widget          (GogEditor *editor,
                                                             GtkWidget *widget);

## Description

## Details

### GogEditor

    typedef struct {
    	unsigned	*store_page;		/* pointer to a place for storing last edited page */
    	GSList		*pages;			/* GogEditorPage */
    	GData		*registered_widgets;
    } GogEditor;

### GogEditorPage

    typedef struct {
    	char const	*label;		/* label for notebook page */
    	gpointer 	 widget;	/* GtkWidget* */
    } GogEditorPage;

### gog_editor_new ()

    GogEditor*          gog_editor_new                      (void);

Creates a new GogEditor object, which is used to store a collection of property edition widgets (pages). The returned object must be freed using `gog_editor_free`.

Returns : |

### gog_editor_free ()

    void                gog_editor_free                     (GogEditor *editor);

Frees a GogEditor object.

`editor` : | a GogEditor

### gog_editor_add_page ()

    void                gog_editor_add_page                 (GogEditor *editor,
                                                             gpointer widget,
                                                             char const *label);

Adds a page to `editor`.

`editor` : | a GogEditor
`widget` : | property edition widget
`label` : | a label identifying the widget

### gog_editor_set_store_page ()

    void                gog_editor_set_store_page           (GogEditor *editor,
                                                             unsigned *store_page);

Sets a placeholder for storing the last active editor page.

`editor` : | a GogEditor
`store_page` : | placeholder for the last selected page

### gog_editor_get_notebook ()

    GtkWidget*          gog_editor_get_notebook             (GogEditor *editor);

Buils a GtkNotebook from the widget collection stored in `editor`.

`editor` : | a GogEditor
Returns : |

### gog_editor_get_registered_widget ()

    GtkWidget*          gog_editor_get_registered_widget    (GogEditor *editor,
                                                             char const *name);

`editor` : | a GogEditor
`name` : | the name of the registered widget
Returns : | a widget previously registered using `gog_editor_register_widget`.

### gog_editor_register_widget ()

    void                gog_editor_register_widget          (GogEditor *editor,
                                                             GtkWidget *widget);

Registers a widget that then can be retrieved later using `gog_editor_get_registered_widget`. The main use of this function is to provide the ability to extend a page.

`editor` : | a GogEditor
`widget` : | a GtkWidget