swamigui Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
SwamiguiSampleCanvas; void swamigui_sample_canvas_set_sample (SwamiguiSampleCanvas *canvas
,IpatchSampleData *sample
); int swamigui_sample_canvas_xpos_to_sample (SwamiguiSampleCanvas *canvas
,int xpos
,int *onsample
); int swamigui_sample_canvas_sample_to_xpos (SwamiguiSampleCanvas *canvas
,int index
,int *inview
);
GObject +----GInitiallyUnowned +----GtkObject +----GnomeCanvasItem +----SwamiguiSampleCanvas
"adjustment" GtkAdjustment* : Read / Write "height" gint : Read / Write "line-color" guint : Read / Write "loop-end" guint : Read / Write "loop-end-color" guint : Read / Write "loop-mode" gboolean : Read / Write "loop-start" guint : Read / Write "loop-start-color" guint : Read / Write "peak-line-color" guint : Read / Write "point-color" guint : Read / Write "right-chan" gboolean : Read / Write "sample" IpatchSampleData* : Read / Write "start" guint : Read / Write "update-adj" gboolean : Read / Write "width" gint : Read / Write "x" gint : Read / Write "y" gint : Read / Write "zoom" gdouble : Read / Write "zoom-ampl" gdouble : Read / Write
void swamigui_sample_canvas_set_sample (SwamiguiSampleCanvas *canvas
,IpatchSampleData *sample
);
Set the sample data source of a sample canvas item.
|
Sample data canvas item |
|
Sample data to assign to the canvas |
int swamigui_sample_canvas_xpos_to_sample (SwamiguiSampleCanvas *canvas
,int xpos
,int *onsample
);
Convert an X pixel position to sample index.
|
Sample canvas item |
|
X pixel position |
|
Output: Pointer to store value indicating if given xpos is
within sample (0 if within sample, -1 if less than 0 or no active sample,
1 if off the end, 2 if last value after sample - useful for loop end
which is valid up to the position following the data), NULL to ignore
|
Returns : |
Sample index, index may be out of range of sample, use onsample
parameter to determine that.
|
int swamigui_sample_canvas_sample_to_xpos (SwamiguiSampleCanvas *canvas
,int index
,int *inview
);
Convert a sample index to x pixel position.
|
Sample canvas item |
|
Sample index |
|
Output: Pointer to store value indicating if given sample index
is in view (0 if in view, -1 if too low, 1 if too high).
|
Returns : |
X position. Note that values outside of current view may be
returned (including negative numbers), inview can be used to determine
if value is in view or not.
|
"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
"line-color"
property"line-color" guint : Read / Write
Color of sample connecting lines.
Default value: 1061552127
"loop-end-color"
property"loop-end-color" guint : Read / Write
Color of loop end sample points.
Default value: 4278190335
"loop-mode"
property"loop-mode" gboolean : Read / Write
Enable/disable loop mode.
Default value: FALSE
"loop-start"
property"loop-start" guint : Read / Write
Start of loop in samples.
Default value: 0
"loop-start-color"
property"loop-start-color" guint : Read / Write
Color of loop start sample points.
Default value: 16711935
"peak-line-color"
property"peak-line-color" guint : Read / Write
Color of peak sample lines.
Default value: 1061552127
"point-color"
property"point-color" guint : Read / Write
Color of sample points.
Default value: 2863333375
"right-chan"
property"right-chan" gboolean : Read / Write
Use right channel of stereo samples.
Default value: FALSE
"update-adj"
property"update-adj" gboolean : Read / Write
Update adjustment object.
Default value: FALSE
"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 samples 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