gui/backend/arranger_selections.h file


Common data structures and functions for *ArrangerSelections.


void arranger_selections_init_loaded(ArrangerSelections* self, bool project)
Inits the selections after loading a project.
void arranger_selections_init(ArrangerSelections* self, ArrangerSelectionsType type)
Initializes the selections.
auto arranger_selections_verify(ArrangerSelections* self) -> bool
Verify that the objects are not invalid.
void arranger_selections_add_object(ArrangerSelections* self, ArrangerObject* obj)
Appends the given object to the selections.
void arranger_selections_set_from_selections(ArrangerSelections* dest, ArrangerSelections* src)
Sets the values of each object in the dest selections to the values in the src selections.
void arranger_selections_sort_by_indices(ArrangerSelections* sel, int desc)
Sorts the selections by their indices (eg, for regions, their track indices, then the lane indices, then the index in the lane).
auto arranger_selections_clone(ArrangerSelections* self) -> ArrangerSelections*
Clone the struct for copying, undoing, etc.
auto arranger_selections_has_any(ArrangerSelections* self) -> int
Returns if there are any selections.
void arranger_selections_get_start_pos(ArrangerSelections* self, Position* pos, bool global)
Returns the position of the leftmost object.
void arranger_selections_get_end_pos(ArrangerSelections* self, Position* pos, int global)
Returns the end position of the rightmost object.
auto arranger_selections_get_num_objects(ArrangerSelections* self) -> int
Returns the number of selected objects.
auto arranger_selections_get_first_object(ArrangerSelections* self) -> ArrangerObject*
Gets first object.
auto arranger_selections_get_last_object(ArrangerSelections* self) -> ArrangerObject*
Gets last object.
void arranger_selections_paste_to_pos(ArrangerSelections* self, Position* pos, bool undoable)
Pastes the given selections to the given Position.
auto arranger_selections_get_all_objects(ArrangerSelections* self, int* size) -> ArrangerObject**
Returns all objects in the selections in a newly allocated array that should be free'd.
void arranger_selections_redraw(ArrangerSelections* self)
Redraws each object in the arranger selections.
void arranger_selections_add_to_region(ArrangerSelections* self, ZRegion* region)
Adds each object in the selection to the given region (if applicable).
void arranger_selections_add_ticks(ArrangerSelections* self, const double ticks)
Moves the selections by the given amount of ticks.
auto arranger_selections_all_on_same_lane(ArrangerSelections* self) -> bool
Returns whether all the selections are on the same lane (track lane or automation lane).
void arranger_selections_clear(ArrangerSelections* self, bool free, bool fire_events)
Clears selections.
void arranger_selections_post_deserialize(ArrangerSelections* self)
Code to run after deserializing.
void arranger_selections_free(ArrangerSelections* self)
Frees the selections but not the objects.
void arranger_selections_free_full(ArrangerSelections* self)
Frees all the objects as well.
auto arranger_selections_contains_object(ArrangerSelections* self, ArrangerObject* obj) -> int
Returns if the arranger object is in the selections or not.
auto arranger_selections_contains_undeletable_object(ArrangerSelections* self) -> bool
Returns if the selections contain an undeletable object (such as the start marker).
void arranger_selections_remove_object(ArrangerSelections* self, ArrangerObject* obj)
Removes the arranger object from the selections.
void arranger_selections_merge(ArrangerSelections* self)
Merges the given selections into one region.
auto arranger_selections_can_be_pasted(ArrangerSelections* self) -> bool
Returns if the selections can be pasted.