gui/backend/arranger_selections.h file

Contents

Common data structures and functions for *ArrangerSelections.

Functions

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.
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, int 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.
auto arranger_selections_get_all_objects(ArrangerSelections* self, int* size) -> ArrangerObject**
Pastes the given selections to the given Position.
void arranger_selections_redraw(ArrangerSelections* self)
Redraws each object in the arranger selections.
void arranger_selections_add_ticks(ArrangerSelections* self, const double ticks)
Moves the selections by the given amount of ticks.
void arranger_selections_clear(ArrangerSelections* self)
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.
void arranger_selections_remove_object(ArrangerSelections* self, ArrangerObject* obj)
Removes the arranger object from the selections.