# gtkspectrumviewer.h File Reference

`#include <goffice/graph/gog-graph.h>`
`#include <gtk/gtkwidget.h>`

Go to the source code of this file.

## Defines

#define | GTK_TYPE_SPECTRUM_VIEWER (gtk_spectrum_viewer_get_type ())
#define | GTK_SPECTRUM_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SPECTRUM_VIEWER, GtkSpectrumViewer))
#define | GTK_SPECTRUM_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SPECTRUM_VIEWER, GtkSpectrumViewerClass
#define | GTK_IS_SPECTRUM_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SPECTRUM_VIEWER))
#define | GTK_IS_SPECTRUM_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SPECTRUM_VIEWER))
#define | GTK_SPECTRUM_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SPECTRUM_VIEWER, GtkSpectrumViewerClass))

## Typedefs

typedef struct _GtkSpectrumViewer | GtkSpectrumViewer
typedef struct _GtkSpectrumViewerClass | GtkSpectrumViewerClass

## Functions

GtkWidget * | gtk_spectrum_viewer_new (const gchar *uri)
void | gtk_spectrum_viewer_set_uri (GtkSpectrumViewer *viewer, const gchar *uri)
GogGraph * | gtk_spectrum_viewer_get_graph (GtkSpectrumViewer *viewer)

## Detailed Description

Declaration of the GtkSpectrumViewer widget.

Definition in file gtkspectrumviewer.h.

## Define Documentation

#define GTK_IS_SPECTRUM_VIEWER | ( | obj |  | ) | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SPECTRUM_VIEWER))

Returns:
  TRUE if obj points to a GtkSpectrumViewer widget, FALSE otherwise.

Definition at line 51 of file gtkspectrumviewer.h.

#define GTK_IS_SPECTRUM_VIEWER_CLASS | ( | klass |  | ) | (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SPECTRUM_VIEWER))

Returns:
  TRUE if klass points to a GtkSpectrumViewerClass, FALSE otherwise.

Definition at line 55 of file gtkspectrumviewer.h.

#define GTK_SPECTRUM_VIEWER | ( | obj |  | ) | (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SPECTRUM_VIEWER, GtkSpectrumViewer))

Casts obj to a GtkSpectrumViewer * pointer.

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

Definition at line 42 of file gtkspectrumviewer.h.

#define GTK_SPECTRUM_VIEWER_CLASS | ( | klass |  | ) | (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SPECTRUM_VIEWER, GtkSpectrumViewerClass

Casts klass to a GtkSpectrumViewerClass * pointer.

Returns:
  a pointer to the GtkSpectrumViewerClass * or NULL if obj not point to a GtkSpectrumViewerClass

Definition at line 47 of file gtkspectrumviewer.h.

#define GTK_SPECTRUM_VIEWER_GET_CLASS | ( | obj |  | ) | (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SPECTRUM_VIEWER, GtkSpectrumViewerClass))

Returns:
  the GtkSpectrumViewerClass * associated to obj if obj points to a GtkSpectrumViewer widget, NULL otherwise.

Definition at line 60 of file gtkspectrumviewer.h.

#define GTK_TYPE_SPECTRUM_VIEWER (gtk_spectrum_viewer_get_type ())

Returns:
  the GType associated to GtkSpectrumViewer

Definition at line 36 of file gtkspectrumviewer.h.

## Typedef Documentation

typedef struct _GtkSpectrumViewer GtkSpectrumViewer

The GtkSpectrumViewer widget.

Definition at line 70 of file gtkspectrumviewer.h.

typedef struct _GtkSpectrumViewerClass GtkSpectrumViewerClass

The GtkSpectrumViewer widget object class.

Definition at line 72 of file gtkspectrumviewer.h.

## Function Documentation

GogGraph* gtk_spectrum_viewer_get_graph | ( | GtkSpectrumViewer * | viewer | ) |

Parameters:

  | viewer | a pointer to GtkSectrumViewer widget.

Returns:
  the graph displayed by the widget.

GtkWidget* gtk_spectrum_viewer_new | ( | const gchar * | uri | ) |

Parameters:

  | uri | the URI of the file containing the spectrum to display

Creates a GtkSpectrumViewer widget and fills it with the data from uri. If uri is NULL, the widget will display an empty chart.

void gtk_spectrum_viewer_set_uri | ( | GtkSpectrumViewer * | viewer,
|  | const gchar * | uri |
| ) |  |  |

Parameters:

  | viewer | a pointer to GtkSectrumViewer widget.
  | uri | the URI of the file containing the spectrum to display.

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