The Gnome Chemistry Utils  0.14.0
Macros | Typedefs | Functions
gcuchem3dviewer.h File Reference
#include <gtk/gtk.h>

Go to the source code of this file.

Macros

#define GCU_DISPLAY_3D   (gcu_display3d_get_type ())
#define GCU_TYPE_CHEM3D_VIEWER   (gcu_chem3d_viewer_get_type ())
#define GCU_CHEM3D_VIEWER(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCU_TYPE_CHEM3D_VIEWER, GcuChem3DViewer))
#define GCU_CHEM3D_VIEWER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GCU_TYPE_CHEM3D_VIEWER, GcuChem3DViewerClass))
#define GCU_IS_CHEM3D_VIEWER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCU_TYPE_CHEM3D_VIEWER))
#define GCU_IS_CHEM3D_VIEWER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GCU_TYPE_CHEM3D_VIEWER))
#define GCU_CHEM3D_VIEWER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CHEM3D_VIEWER, GcuChem3DViewerClass))

Typedefs

typedef struct _GcuChem3DViewer GcuChem3DViewer
typedef struct
_GcuChem3DViewerClass 
GcuChem3DViewerClass

Functions

GtkWidget * gcu_chem3d_viewer_new (const gchar *uri)
void gcu_chem3d_viewer_set_uri_with_mime_type (GcuChem3DViewer *viewer, const gchar *uri, const gchar *mime_type)
void gcu_chem3d_viewer_set_uri (GcuChem3DViewer *viewer, const gchar *uri)
void gcu_chem3d_viewer_set_data (GcuChem3DViewer *viewer, const gchar *data, const gchar *mime_type, size_t size)
GdkPixbuf * gcu_chem3d_viewer_new_pixbuf (GcuChem3DViewer *viewer, guint width, guint height, gboolean use_bg)

Detailed Description

Declaration of the GcuChem3DViewer widget.

Definition in file gcuchem3dviewer.h.

Macro Definition Documentation

#define GCU_CHEM3D_VIEWER (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCU_TYPE_CHEM3D_VIEWER, GcuChem3DViewer))

Casts obj to a GcuChem3DViewer * pointer.

Returns
a pointer to the GcuChem3DViewer * or NULL if obj does not point to a GcuChem3DViewer widget.

Definition at line 48 of file gcuchem3dviewer.h.

#define GCU_CHEM3D_VIEWER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GCU_TYPE_CHEM3D_VIEWER, GcuChem3DViewerClass))

Casts klass to a GcuChem3DViewerClass * pointer.

Returns
a pointer to the GcuChem3DViewerClass * or NULL if obj not point to a GcuChem3DViewerClass.

Definition at line 53 of file gcuchem3dviewer.h.

#define GCU_CHEM3D_VIEWER_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CHEM3D_VIEWER, GcuChem3DViewerClass))
Returns
the GcuChem3DViewerClass * associated to obj if obj points to a GcuChem3DViewer widget, NULL otherwise.

Definition at line 66 of file gcuchem3dviewer.h.

#define GCU_DISPLAY_3D   (gcu_display3d_get_type ())
Returns
the GType associated to the Display3D enum.

Definition at line 39 of file gcuchem3dviewer.h.

#define GCU_IS_CHEM3D_VIEWER (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCU_TYPE_CHEM3D_VIEWER))
Returns
TRUE if obj points to a GcuChem3DViewer widget, FALSE otherwise.

Definition at line 57 of file gcuchem3dviewer.h.

#define GCU_IS_CHEM3D_VIEWER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GCU_TYPE_CHEM3D_VIEWER))
Returns
TRUE if klass points to a GcuChem3DViewerClass, FALSE otherwise.

Definition at line 61 of file gcuchem3dviewer.h.

#define GCU_TYPE_CHEM3D_VIEWER   (gcu_chem3d_viewer_get_type ())
Returns
the GType associated to GcuChem3DViewer

Definition at line 42 of file gcuchem3dviewer.h.

Typedef Documentation

typedef struct _GcuChem3DViewer GcuChem3DViewer

The GcuChem3DViewer widget.

Definition at line 91 of file gcuchem3dviewer.h.

typedef struct _GcuChem3DViewerClass GcuChem3DViewerClass

The GcuChem3DViewer widget object class.

Definition at line 93 of file gcuchem3dviewer.h.

Function Documentation

GtkWidget* gcu_chem3d_viewer_new ( const gchar *  uri)
Parameters
uri,:the URI of the file containing the molecular structure to display. Any file supported by OpenBabel may be used.

Creates a GcuChem3DViewer widget and fills it with the data from uri. If uri is NULL, the widget will be empty.

Referenced by main().

GdkPixbuf* gcu_chem3d_viewer_new_pixbuf ( GcuChem3DViewer viewer,
guint  width,
guint  height,
gboolean  use_bg 
)
Parameters
viewera pointer to a GcuChem3DViewer widget.
widththe width of the new pixbuf.
heightthe height of the new pixbuf.
use_bgwhether to use the window background or a transparent background.

Renders the scene to a newly allocated pixbuf.

Returns
the new GdkPixbuf*.
void gcu_chem3d_viewer_set_data ( GcuChem3DViewer viewer,
const gchar *  data,
const gchar *  mime_type,
size_t  size 
)
Parameters
viewera pointer to GcuChem3DViewer widget.
dataa pointer to the raw data representing a serialized version of molecule to display
mime_typethe mime_type of the data. Any type supported by OpenBabel may be used.
sizethe data size.

Changes the molecule displayed by the one described in the data. Nothing happens if data or mime-type is NULL.

void gcu_chem3d_viewer_set_uri ( GcuChem3DViewer viewer,
const gchar *  uri 
)
Parameters
viewera pointer to GcuChem3DViewer widget.
urithe URI of the file containing the molecular structure to display. OpenBabel may be used.

Changes the molecule displayed by the one described in the uri. Nothing happens if uri is NULL.

void gcu_chem3d_viewer_set_uri_with_mime_type ( GcuChem3DViewer viewer,
const gchar *  uri,
const gchar *  mime_type 
)
Parameters
viewera pointer to GcuChem3DViewer widget.
urithe URI of the file containing the molecular structure to display. Any file supported by
mime_type,:the mime_type of the data. Any type supported by OpenBabel may be used.

Changes the molecule displayed by the one described in the uri. Nothing happens if uri is NULL.