## GOComponent

GOComponent

## Synopsis

                        GOComponent;
    #define             GO_COMPONENT_TYPE
    #define             GO_COMPONENT                        (o)
    #define             IS_GO_COMPONENT                     (o)
    #define             GOC_PARAM_PERSISTENT
    GType               go_component_get_type               (void);
    GOComponent*        go_component_new_by_mime_type       (char const *mime_type);
    void                go_component_set_default_size       (GOComponent *component,
                                                             double width,
                                                             double ascent,
                                                             double descent);
    gboolean            go_component_needs_window           (GOComponent *component);
    void                go_component_set_window             (GOComponent *component,
                                                             GdkWindow *window);
    void                go_component_set_data               (GOComponent *component,
                                                             char const *data,
                                                             int length);
    gboolean            go_component_get_data               (GOComponent *component,
                                                             gpointer *data,
                                                             int *length,
                                                             void (clearfuncgpointer data) (),
                                                             gpointer *user_data);
    void                go_component_set_size               (GOComponent *component,
                                                             double width,
                                                             double height);
    gboolean            go_component_is_resizable           (GOComponent *component);
    gboolean            go_component_is_editable            (GOComponent *component);
    GtkWindow*          go_component_edit                   (GOComponent *component);
    void                go_component_emit_changed           (GOComponent *component);
    void                go_component_set_command_context    (GOCmdContext *cc);
    GOCmdContext*       go_component_get_command_context    (void);
    void                go_component_render                 (GOComponent *component,
                                                             cairo_t *cr,
                                                             double width,
                                                             double height);

## Object Hierarchy

      GObject
       +----GOComponent

## Properties

      "ascent"                   gdouble               : Read / Write
      "descent"                  gdouble               : Read / Write
      "height"                   gdouble               : Read
      "mime-type"                gchar*                : Read / Write
      "width"                    gdouble               : Read / Write

## Signals

      "changed"                                        : Run Last

## Description

## Details

### GOComponent

    typedef struct _GOComponent GOComponent;

### GO_COMPONENT_TYPE

    #define GO_COMPONENT_TYPE	(go_component_get_type ())

### GO_COMPONENT()

    #define GO_COMPONENT(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GO_COMPONENT_TYPE, GOComponent))

`o` : |

### IS_GO_COMPONENT()

    #define IS_GO_COMPONENT(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_COMPONENT_TYPE))

`o` : |

### GOC_PARAM_PERSISTENT

    #define GOC_PARAM_PERSISTENT	(1 << (G_PARAM_USER_SHIFT+0))

### go_component_get_type ()

    GType               go_component_get_type               (void);

Returns : |

### go_component_new_by_mime_type ()

    GOComponent*        go_component_new_by_mime_type       (char const *mime_type);

`mime_type` : |
Returns : |

### go_component_set_default_size ()

    void                go_component_set_default_size       (GOComponent *component,
                                                             double width,
                                                             double ascent,
                                                             double descent);

`component` : |
`width` : |
`ascent` : |
`descent` : |

### go_component_needs_window ()

    gboolean            go_component_needs_window           (GOComponent *component);

`component` : |
Returns : |

### go_component_set_window ()

    void                go_component_set_window             (GOComponent *component,
                                                             GdkWindow *window);

`component` : |
`window` : |

### go_component_set_data ()

    void                go_component_set_data               (GOComponent *component,
                                                             char const *data,
                                                             int length);

`component` : |
`data` : |
`length` : |

### go_component_get_data ()

    gboolean            go_component_get_data               (GOComponent *component,
                                                             gpointer *data,
                                                             int *length,
                                                             void (clearfuncgpointer data) (),
                                                             gpointer *user_data);

`component` : |
`data` : |
`length` : |
`clearfunc` : |
`user_data` : |
Returns : |

### go_component_set_size ()

    void                go_component_set_size               (GOComponent *component,
                                                             double width,
                                                             double height);

`component` : |
`width` : |
`height` : |

### go_component_is_resizable ()

    gboolean            go_component_is_resizable           (GOComponent *component);

`component` : |
Returns : |

### go_component_is_editable ()

    gboolean            go_component_is_editable            (GOComponent *component);

`component` : |
Returns : |

### go_component_edit ()

    GtkWindow*          go_component_edit                   (GOComponent *component);

`component` : |
Returns : |

### go_component_emit_changed ()

    void                go_component_emit_changed           (GOComponent *component);

`component` : |

### go_component_set_command_context ()

    void                go_component_set_command_context    (GOCmdContext *cc);

`cc` : |

### go_component_get_command_context ()

    GOCmdContext*       go_component_get_command_context    (void);

Returns : |

### go_component_render ()

    void                go_component_render                 (GOComponent *component,
                                                             cairo_t *cr,
                                                             double width,
                                                             double height);

`component` : |
`cr` : |
`width` : |
`height` : |

## Property Details

### The `"ascent"` property

      "ascent"                   gdouble               : Read / Write

Component ascent.

Allowed values: >= 0

Default value: 0

### The `"descent"` property

      "descent"                  gdouble               : Read / Write

Component descent.

Allowed values: >= 0

Default value: 0

### The `"height"` property

      "height"                   gdouble               : Read

Component height.

Allowed values: >= 0

Default value: 0

### The `"mime-type"` property

      "mime-type"                gchar*                : Read / Write

mime type of the content of the component.

Default value: NULL

### The `"width"` property

      "width"                    gdouble               : Read / Write

Component width.

Allowed values: >= 0

Default value: 0

## Signal Details

### The `"changed"` signal

    void                user_function                      (GOComponent *gocomponent,
                                                            gpointer     user_data)        : Run Last

`gocomponent` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.