<< GtkWaveView >>

GtkWaveView is the display widget for waveview data. Note that you probably don't want to instantiate this object by itself as it provides neither a ruler nor a scrollbar! If you want both a scrollbar and ruler, instantiate a GtkWave instead.

If you want only a scrollbar you may put a GtkWaveView in a GtkScrolledWindow. If you want neither a scrollbar or ruler, you may instantiate the widget and place it in any suitable container widget.

Signals:
marker_moved - The marker moved.
selection_changed - The selection changed.
Member functions:

GtkType    gtk_wave_view_get_type              (void);

Standard Gtk+ object function that returns the GtkType of the waveview class.


GtkWidget *gtk_wave_view_new                   (void);

Standard Gtk+ object function returns reference to new GtkWaveView widget.


GtkWaveBuffer *gtk_wave_view_get_buffer        (GtkWaveView *waveview);

Returns a pointer to the model object (GtkWaveBuffer). Does not perform any ref/unrefs.


void       gtk_wave_view_set_buffer            (GtkWaveView   *waveview,
                                                GtkWaveBuffer *wavebuffer);

Sets the object (GtkWaveBuffer) to display. Automatically ref/unref's the object. Passing a null pointer will disassociate the current object.


gdouble    gtk_wave_view_get_zoom              (GtkWaveView *waveview);

Get the zoom factor. Units are in frames per pixel.


void       gtk_wave_view_set_zoom              (GtkWaveView *waveview,
                                                gdouble     zoom);

Set the zoom factor. Units are in frames per pixel.


void       gtk_wave_view_set_zoom_all          (GtkWaveView *waveview);

Set the zoom factor to display the whole current data object.


void       gtk_wave_view_set_zoom_selection    (GtkWaveView *waveview);

Set the zoom factor to display the current selection, if there is one. If not, ignore function call.


void       gtk_wave_view_get_selection         (GtkWaveView *waveview,
                                                gint32      *start,
                                                gint32      *length);

Get the current selection. If none exists, then length will equal zero on return.


void       gtk_wave_view_set_selection         (GtkWaveView *waveview,
                                                gint32       start,
                                                gint32       length);

Set the current selection. If the selection is out of range, then it will be clipped as appropriate.


guint32     gtk_wave_view_get_select_channels  (GtkWaveView *waveview);

Get the bitmask of the channels that are selectable. Bit 0 = first channel, Bit 1 = second channel, etc. A 1 in a bit position means the channel can be selected.


void       gtk_wave_view_set_select_channels   (GtkWaveView *waveview,
                                                guint32      sel_mask);

Set the bitmask of the channels that are selectable. A selection mask of 0xffffffff means all channels will be included in the selection.


void       gtk_wave_view_set_cache_size        (GtkWaveView *waveview,
                                                guint32      size);

Set the size of the cache in number of pixel columns. The GtkWaveView widget keeps a direct-mapped cache with each element corresponding to an x coordinate inside the window. Therefore, for performance reasons, you shouldn't normally set the size to be less than the screen width.


gdouble    gtk_wave_view_get_amplitude_zoom    (GtkWaveView *waveview);

Return the current amplification value.


void       gtk_wave_view_set_amplitude_zoom    (GtkWaveView *waveview,
                                                gdouble      amplzoom);

Set the amplification of the wave data. Default is 1.0, larger numbers result in larger amplifications.


gint32     gtk_wave_view_get_marker            (GtkWaveView *waveview);

Returns the current location of the marker, or if it's hidden, returns a negative number.


void       gtk_wave_view_set_marker            (GtkWaveView *waveview,
                                                gint32       frame);

Set the marker's location in units of frames. The marker is like a cursor. It is usually used to represent the current location of a sound being played. To remove a marker, set it's frame to a negative number.


void       gtk_wave_view_set_marker_scrolling_boundaries
                                                (GtkWaveView *waveview,
                                                 gdouble      stop_threshold,
                                                 gdouble      start_offset);

Set the onscreen boundaries the marker must be in after a gtk_wave_view_set_marker_and_scroll function call. The stop_threshold parameter is a number 0.0 to 1.0 which represents the maximum boundary from the right side of the screen. The start_offset parameter is a number 0.0 to 1.0 representing the start boundary from the left side of the screen.

For example: stop_threshold = 0.1, start_offset = 0.6
If the marker is within 10% of the right side of the screen, automatically scroll the widget until the marker is at 60% from the left side of the screen.


void       gtk_wave_view_set_marker_and_scroll  (GtkWaveView *waveview,
                                                 gint32       frame);

Set the marker position and scroll if near an edge of the widget.


void       gtk_wave_view_enable_marker          (GtkWaveView *waveview,
                                                 gboolean     enabled);

Enable the display of the marker. If the marker is disabled, it's value is not changed, however it won't be displayed.


void       gtk_wave_view_enable_selection       (GtkWaveView *waveview,
                                                 gboolean     enabled);

Enable the display of the selection. If the selection is disabled, it's range is not modified but it won't be displayed.


gboolean   gtk_wave_view_marker_enabled         (GtkWaveView *waveview);

Return whether or not the marker is enabled.


gboolean   gtk_wave_view_selection_enabled      (GtkWaveView *waveview);

Return whether or not the selection is enabled.


void       gtk_wave_view_set_stride             (GtkWaveView *waveview,
                                                 gdouble      stride);

Set the distance between the vertical grid lines in pixels. The stride parameter is automatically lower bounded to 10.0 pixels.

GtkWaveView