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

Class MarkerBox

source code

Instance Methods [hide private]
 
get_selected_marker()
Gets the index of the currently selected marker in a marker box.
source code
 
set_selected_marker(i)
Selects a marker in a marker box.
source code
 
get_marker_position(i)
Gets the position of a marker in a marker box.
source code
 
set_marker_position(i, pos)
Moves a marker in a marker box.
source code
 
add_marker(i, pos)
Adds a marker to a marker box.
source code
 
remove_marker(i)
Removes a marker from a marker box.
source code
 
get_nmarkers()
Gets the number of markers in a marker box.
source code
 
get_markers()
Gets all markers in a marker box.
source code
 
set_markers(n, markers)
Sets positions of all markers in a marker box.
source code
 
set_flipped(flipped)
Sets whether a marker box is drawn upside down.
source code
 
get_flipped()
Returns whether a marker box is drawn upside down.
source code
 
set_highlight_selected(highlight)
Sets whether a marker box highlights selected marker.
source code
 
get_highlight_selected()
Returns whether a marker box highlights selected marker.
source code
 
UNIMPLEMENTED_set_validator(validate)
Sets marker box marker validation function.
source code
 
UNIMPLEMENTED_get_validator()
Gets the marker validation function currently in use.
source code
Method Details [hide private]

get_selected_marker()

source code 

Gets the index of the currently selected marker in a marker box.

Returns:
The index of currently selected marker, -1 when none is selected.

set_selected_marker(i)

source code 

Selects a marker in a marker box.

Parameters:
  • i - The index of marker to select. Pass -1 to unselect. (int)

get_marker_position(i)

source code 

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].

set_marker_position(i, pos)

source code 

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.

add_marker(i, pos)

source code 

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.

remove_marker(i)

source code 

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.

get_nmarkers()

source code 

Gets the number of markers in a marker box.

Returns:
The number of markers.

get_markers()

source code 

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.

set_markers(n, markers)

source code 

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_flipped(flipped)

source code 

Sets whether a marker box is drawn upside down.

Parameters:
  • flipped - True to draw markers upside down. (bool)

get_flipped()

source code 

Returns whether a marker box is drawn upside down.

Returns:
True if markers are drawn upside down.

set_highlight_selected(highlight)

source code 

Sets whether a marker box highlights selected marker.

Parameters:
  • highlight - True to visually differentiate selected marker, False to draw markers uniformly. (bool)

get_highlight_selected()

source code 

Returns whether a marker box highlights selected marker.

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

UNIMPLEMENTED_set_validator(validate)

source code 

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)

UNIMPLEMENTED_get_validator()

source code 

Gets the marker validation function currently in use.

Returns:
The marker validation function.