Module gwy :: Class MarkerBox
[show private | hide private]
[frames | no frames]

Class MarkerBox


The ::markers-set signal is emitted when markers are explicitly set with MarkerBox.set_markers().
Method Summary
  add_marker(i, pos)
Adds a marker to a marker box.
  get_flipped()
Returns: True if markers are drawn upside down.
  get_highlight_selected()
Returns: True if selected marker is visually differentiated, False if
  get_marker_position(i)
Gets the position of a marker in a marker box.
  get_markers()
Gets all markers in a marker box.
  get_nmarkers()
Gets the number of markers in a marker box.
  get_selected_marker()
Gets the index of the currently selected marker in a marker box.
  remove_marker(i)
Removes a marker from a marker box.
  set_flipped(flipped)
Sets whether a marker box is drawn upside down.
  set_highlight_selected(highlight)
Sets whether a marker box highlights selected marker.
  set_marker_position(i, pos)
Moves a marker in a marker box.
  set_markers(n, markers)
Sets positions of all markers in a marker box.
  set_selected_marker(i)
Selects a marker in a marker box.
  UNIMPLEMENTED_get_validator()
Gets the marker validation function currently in use.
  UNIMPLEMENTED_set_validator(validate)
Sets marker box marker validation function.

Method Details

add_marker(i, pos)

Adds a marker to a marker box.
Parameters:
i - Index to insert marker at. (int)
pos - Position to insert marker to, in the range [0.0, 1.0]. (float)
Returns:
On success, the index the marker was added at. If the insertion does not validate, -1 is returned and no marker is added.

get_flipped()

Returns: True if markers are drawn upside down.
Returns:
True if markers are drawn upside down.

get_highlight_selected()

Returns: True if selected marker is visually differentiated, False if
Returns:
True if selected marker is visually differentiated, False if markers are drawn uniformly.

get_marker_position(i)

Gets the position of a marker in a marker box.
Parameters:
i - The index of marker to get position of. (int)
Returns:
The marker position, in the range [0.0, 1.0].

get_markers()

Gets all markers in a marker box.
Returns:
The markers as an array of positions, owned by mbox. It must not be modified nor freed by caller and it's valid only until next marker change.

get_nmarkers()

Gets the number of markers in a marker box.
Returns:
The number of markers.

get_selected_marker()

Gets the index of the currently selected marker in a marker box.
Returns:
The index of currently selected marker, -1 when none is selected.

remove_marker(i)

Removes a marker from a marker box.
Parameters:
i - Index of marker to remove. (int)
Returns:
True on success. If the removal does not validate, False is returned and the marker is kept.

set_flipped(flipped)

Sets whether a marker box is drawn upside down.
Parameters:
flipped - True to draw markers upside down. (bool)

set_highlight_selected(highlight)

Sets whether a marker box highlights selected marker.
Parameters:
highlight - True to visually differentiate selected marker, False to draw markers uniformly. (bool)

set_marker_position(i, pos)

Moves a marker in a marker box.
Parameters:
i - Index of marker to move. (int)
pos - The new marker position, in the range [0.0, 1.0]. (float)
Returns:
True on success. If the move does not validate, False is returned and the marker position does not change.

set_markers(n, markers)

Sets positions of all markers in a marker box.

No validation is performed, even if validator is set. It's up to caller to set markers that do not logically conflict with the validator.
Parameters:
n - The number of markers to set. If it is zero, markers can be NULL. (int)
markers - Markers position. (const-gdouble*)

set_selected_marker(i)

Selects a marker in a marker box.
Parameters:
i - The index of marker to select. Pass -1 to unselect. (int)

UNIMPLEMENTED_get_validator()

Gets the marker validation function currently in use.
Returns:
The marker validation function.

UNIMPLEMENTED_set_validator(validate)

Sets marker box marker validation function.

It is used the next time an attempt to change markers is made, no revalidation is done immediately. It's up to caller to set a validator that do not logically conflict with the distribution of markers.
Parameters:
validate - Marker validation function. Pass NULL to disable validation. (MarkerValidateFunc)

Generated by Epydoc 2.1 on Tue Dec 30 04:01:42 2008 http://epydoc.sf.net