GOComponent

GOComponent

Functions

Properties

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

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GOComponent

Description

Functions

go_component_new_by_mime_type ()

GOComponent *
go_component_new_by_mime_type (char const *mime_type);


go_component_set_default_size ()

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


go_component_needs_window ()

gboolean
go_component_needs_window (GOComponent *component);

Parameters

component

GOComponent

 

Returns

TRUE if the component uses its own GtkWindow.


go_component_set_window ()

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


go_component_set_data ()

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


go_component_get_data ()

gboolean
go_component_get_data (GOComponent *component,
                       gpointer *data,
                       int *length,
                       GDestroyNotify *clearfunc,
                       gpointer *user_data);


go_component_set_size ()

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


go_component_is_resizable ()

gboolean
go_component_is_resizable (GOComponent *component);


go_component_is_editable ()

gboolean
go_component_is_editable (GOComponent *component);


go_component_edit ()

GtkWindow *
go_component_edit (GOComponent *component);


go_component_emit_changed ()

void
go_component_emit_changed (GOComponent *component);


go_component_set_command_context ()

void
go_component_set_command_context (GOCmdContext *cc);


go_component_get_command_context ()

GOCmdContext *
go_component_get_command_context (void);


go_component_render ()

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

Types and Values

GOComponent

typedef struct _GOComponent GOComponent;


GOComponentClass

typedef struct {
	GObjectClass parent_class;

	GtkWindow* (*edit) (GOComponent *component);
	gboolean (*get_data) (GOComponent *component, gpointer *data, int *length,
			      GDestroyNotify *clearfunc, gpointer *user_data);
	void (*mime_type_set) (GOComponent* component);
	void (*set_data) (GOComponent *component);
	void (*set_default_size) (GOComponent* component);
	void (*set_size) (GOComponent *component);
	void (*set_window) (GOComponent *component);
	void (*render) (GOComponent *component, cairo_t *cr,
			    double width, double height);

	/* signals */
	void (*changed) (GOComponent* component);
} GOComponentClass;

The component base object class.

Members

edit ()

callback for component edition.

 

get_data ()

returns the data embedded in the component.

 

mime_type_set ()

sets the mime type.

 

set_data ()

sets the data embedded in the component.

 

set_default_size ()

sets the default size for the component.

 

set_size ()

sets the requested size.

 

set_window ()

sets the window if the component uses a GdkWindow. The new window is stored in the window field of GOComponent.

 

render ()

displays the contents.

 

changed ()

callback called when the component contents changed.

 

Property Details

The “ascent” property

  “ascent”                   gdouble

Component ascent.

Flags: Read / Write

Allowed values: >= 0

Default value: 0


The “descent” property

  “descent”                  gdouble

Component descent.

Flags: Read / Write

Allowed values: >= 0

Default value: 0


The “height” property

  “height”                   gdouble

Component height.

Flags: Read

Allowed values: >= 0

Default value: 0


The “mime-type” property

  “mime-type”                gchar *

mime type of the content of the component.

Flags: Read / Write

Default value: NULL


The “width” property

  “width”                    gdouble

Component width.

Flags: Read / Write

Allowed values: >= 0

Default value: 0

Signal Details

The “changed” signal

void
user_function (GOComponent *gocomponent,
               gpointer     user_data)

Parameters

gocomponent

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last