gui/backend/arranger_selections.h file

Common data structures and functions for *ArrangerSelections.

Contents

Functions

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