swamigui Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
void (*SwamiguiSpectrumDestroyNotify) (double *spectrum
,guint size
); SwamiguiSpectrumCanvas; void swamigui_spectrum_canvas_set_data (SwamiguiSpectrumCanvas *canvas
,double *spectrum
,guint size
,SwamiguiSpectrumDestroyNotify notify
); int swamigui_spectrum_canvas_pos_to_spectrum (SwamiguiSpectrumCanvas *canvas
,int xpos
); int swamigui_spectrum_canvas_spectrum_to_pos (SwamiguiSpectrumCanvas *canvas
,int index
);
GObject +----GInitiallyUnowned +----GtkObject +----GnomeCanvasItem +----SwamiguiSpectrumCanvas
"adjustment" GtkAdjustment* : Read / Write "height" gint : Read / Write "start" guint : Read / Write "width" gint : Read / Write "x" gint : Read / Write "y" gint : Read / Write "zoom" gdouble : Read / Write "zoom-ampl" gdouble : Read / Write
void (*SwamiguiSpectrumDestroyNotify) (double *spectrum
,guint size
);
This is a function type that gets called when a spectrum canvas item
is destroyed. This function is responsible for freeing spectrum
.
|
The spectrum data pointer as passed to
swamigui_spectrum_canvas_set_data() .
|
|
The number of values in the spectrum array
|
void swamigui_spectrum_canvas_set_data (SwamiguiSpectrumCanvas *canvas
,double *spectrum
,guint size
,SwamiguiSpectrumDestroyNotify notify
);
Set the spectrum data of a spectrum canvas item.
|
Spectrum data canvas item |
|
Spectrum data pointer |
|
Size of spectrum data (in values, not bytes)
|
|
Function callback for freeing spectrum data when spectrum
canvas doesn't need it anymore.
|
int swamigui_spectrum_canvas_pos_to_spectrum (SwamiguiSpectrumCanvas *canvas
,int xpos
);
Convert an X pixel position to spectrum index.
|
Spectrum canvas item |
|
X pixel position |
Returns : |
Spectrum index or -1 if out of range. |
int swamigui_spectrum_canvas_spectrum_to_pos (SwamiguiSpectrumCanvas *canvas
,int index
);
Convert a spectrum index to x pixel position.
|
Spectrum canvas item |
|
Spectrum index |
Returns : |
X position, or -1 if out of view. |
"adjustment"
property"adjustment" GtkAdjustment* : Read / Write
Adjustment control for scrolling.
"height"
property"height" gint : Read / Write
Height in pixels.
Allowed values: >= 0
Default value: 1
"width"
property"width" gint : Read / Write
Width in pixels.
Allowed values: >= 0
Default value: 1
"x"
property"x" gint : Read / Write
X position in pixels.
Allowed values: >= 0
Default value: 0
"y"
property"y" gint : Read / Write
Y position in pixels.
Allowed values: >= 0
Default value: 0
"zoom"
property"zoom" gdouble : Read / Write
Zoom factor in indexes per pixel.
Allowed values: >= 0
Default value: 1
"zoom-ampl"
property"zoom-ampl" gdouble : Read / Write
Amplitude zoom factor.
Allowed values: >= 0
Default value: 1