Zrythm
a highly automated and intuitive digital audio workstation
|
Arranger base widget. More...
#include "dsp/position.h"
#include "dsp/transport.h"
#include "gui/widgets/main_window.h"
#include "utils/ui.h"
#include "gtk_wrapper.h"
Go to the source code of this file.
Data Structures | |
struct | ArrangerWidget |
The arranger widget is a canvas that draws all the arranger objects it contains. More... | |
Macros | |
#define | ARRANGER_WIDGET_TYPE (arranger_widget_get_type ()) |
#define | ARRANGER_WIDGET_GET_ACTION(arr, actn) (arr->action == UI_OVERLAY_ACTION_##actn) |
#define | arranger_widget_print_action(self) g_debug ("action: %s", ui_overlay_strings[self->action]) |
Typedefs | |
typedef struct _ArrangerBgWidget | ArrangerBgWidget |
typedef struct _GtkEventControllerMotion | GtkEventControllerMotion |
typedef struct _RulerWidget | RulerWidget |
typedef void(* | ArrangerWidgetForeachFunc) (ArrangerWidget *arranger) |
Enumerations | |
enum class | ArrangerCursor { ArrangerCursor::ARRANGER_CURSOR_NONE , ARRANGER_CURSOR_SELECT , ARRANGER_CURSOR_SELECT_STRETCH , ARRANGER_CURSOR_EDIT , ARRANGER_CURSOR_AUTOFILL , ARRANGER_CURSOR_CUT , ARRANGER_CURSOR_ERASER , ARRANGER_CURSOR_AUDITION , ARRANGER_CURSOR_RAMP , ARRANGER_CURSOR_GRAB , ARRANGER_CURSOR_GRABBING , ARRANGER_CURSOR_RESIZING_L , ARRANGER_CURSOR_RESIZING_L_FADE , ARRANGER_CURSOR_STRETCHING_L , ARRANGER_CURSOR_RESIZING_L_LOOP , ARRANGER_CURSOR_RESIZING_R , ARRANGER_CURSOR_RESIZING_R_FADE , ARRANGER_CURSOR_STRETCHING_R , ARRANGER_CURSOR_RESIZING_R_LOOP , ARRANGER_CURSOR_RESIZING_UP , ARRANGER_CURSOR_RESIZING_UP_FADE_IN , ARRANGER_CURSOR_RESIZING_UP_FADE_OUT , ARRANGER_CURSOR_GRABBING_COPY , ARRANGER_CURSOR_GRABBING_LINK , ARRANGER_CURSOR_RANGE , ARRANGER_CURSOR_FADE_IN , ARRANGER_CURSOR_FADE_OUT , ARRANGER_CURSOR_RENAME , ARRANGER_CURSOR_PANNING } |
enum class | ArrangerWidgetType { ARRANGER_WIDGET_TYPE_TIMELINE , ARRANGER_WIDGET_TYPE_MIDI , ARRANGER_WIDGET_TYPE_MIDI_MODIFIER , ARRANGER_WIDGET_TYPE_AUDIO , ARRANGER_WIDGET_TYPE_CHORD , ARRANGER_WIDGET_TYPE_AUTOMATION } |
Type of arranger. More... | |
Functions | |
const char * | arranger_widget_get_type_str (ArrangerWidgetType type) |
bool | arranger_widget_can_scroll_vertically (ArrangerWidget *self) |
Returns if the arranger can scroll vertically. | |
void | arranger_widget_setup (ArrangerWidget *self, ArrangerWidgetType type, SnapGrid *snap_grid) |
Creates a timeline widget using the given timeline data. | |
void | arranger_widget_set_cursor (ArrangerWidget *self, ArrangerCursor cursor) |
Sets the cursor on the arranger and all of its children. | |
int | arranger_widget_pos_to_px (ArrangerWidget *self, Position *pos, int use_padding) |
Wrapper of the UI functions based on the arranger type. | |
ArrangerCursor | arranger_widget_get_cursor (ArrangerWidget *self) |
Gets the cursor based on the current hover position. | |
void | arranger_widget_refresh_cursor (ArrangerWidget *self) |
Figures out which cursor should be used based on the current state and then sets it. | |
void | arranger_widget_get_all_objects (ArrangerWidget *self, GPtrArray *objs_arr) |
Get all objects currently present in the arranger. | |
void | arranger_widget_px_to_pos (ArrangerWidget *self, double px, Position *pos, bool has_padding) |
Wrapper for ui_px_to_pos depending on the arranger type. | |
void | arranger_widget_get_visible_rect (ArrangerWidget *self, GdkRectangle *rect) |
Returns the current visible rectangle. | |
void | arranger_widget_get_hit_objects_at_point (ArrangerWidget *self, ArrangerObjectType type, double x, double y, GPtrArray *arr) |
Fills in the given array with the ArrangerObject's of the given type that appear in the given ranger. | |
void | arranger_widget_get_hit_objects_in_rect (ArrangerWidget *self, ArrangerObjectType type, GdkRectangle *rect, GPtrArray *arr) |
Fills in the given array with the ArrangerObject's of the given type that appear in the given ranger. | |
ArrangerObject * | arranger_widget_get_hit_arranger_object (ArrangerWidget *self, ArrangerObjectType type, const double x, const double y) |
Returns the ArrangerObject of the given type at (x,y). | |
void | arranger_widget_select_all (ArrangerWidget *self, bool select, bool fire_events) |
NONNULL bool | arranger_widget_is_in_moving_operation (ArrangerWidget *self) |
Returns if the arranger is in a moving-related operation or starting a moving-related operation. | |
RETURNS_NONNULL ArrangerSelections * | arranger_widget_get_selections (ArrangerWidget *self) |
Returns the ArrangerSelections for this ArrangerWidget. | |
void | arranger_widget_redraw_playhead (ArrangerWidget *self) |
Only redraws the playhead part. | |
SnapGrid * | arranger_widget_get_snap_grid (ArrangerWidget *self) |
gboolean | arranger_widget_on_key_press (GtkEventControllerKey *key_controller, guint keyval, guint keycode, GdkModifierType state, ArrangerWidget *self) |
Called from MainWindowWidget because some events don't reach here. | |
void | arranger_widget_on_key_release (GtkEventControllerKey *key_controller, guint keyval, guint keycode, GdkModifierType state, ArrangerWidget *self) |
NONNULL void | arranger_widget_scroll_until_obj (ArrangerWidget *self, ArrangerObject *obj, int horizontal, int up, int left, int padding) |
Scroll until the given object is visible. | |
void | arranger_widget_toggle_selections_muted (ArrangerWidget *self, ArrangerObject *clicked_object) |
Toggles the mute status of the selection, based on the mute status of the selected object. | |
void | arranger_widget_get_min_possible_position (ArrangerWidget *self, Position *pos) |
Returns the earliest possible position allowed in this arranger (eg, 1.1.0.0 for timeline). | |
void | arranger_widget_set_highlight_rect (ArrangerWidget *self, GdkRectangle *rect) |
Sets the highlight rectangle. | |
EditorSettings * | arranger_widget_get_editor_settings (ArrangerWidget *self) |
Returns the EditorSettings corresponding to the given arranger. | |
EditorSettings | arranger_widget_get_editor_setting_values (ArrangerWidget *self) |
Get just the values, adjusted properly for special cases (like pinned timeline). | |
bool | arranger_widget_is_playhead_visible (ArrangerWidget *self) |
NONNULL void | arranger_widget_handle_playhead_auto_scroll (ArrangerWidget *self, bool force) |
NONNULL void | arranger_widget_foreach (ArrangerWidgetForeachFunc func) |
Runs the given function for each arranger. | |
NONNULL RulerWidget * | arranger_widget_get_ruler (ArrangerWidget *self) |
bool | arranger_widget_any_doing_action (void) |
Returns whether any arranger is in the middle of an action. | |
int | arranger_widget_get_playhead_px (ArrangerWidget *self) |
Returns the playhead's x coordinate in absolute coordinates. | |
bool | arranger_widget_get_drum_mode_enabled (ArrangerWidget *self) |
Returns true if MIDI arranger and track mode is enabled. | |
NONNULL void | arranger_widget_create_item (ArrangerWidget *self, double start_x, double start_y, bool autofilling) |
Called when an item needs to be created at the given position. | |
NONNULL bool | arranger_widget_finish_creating_item_from_action (ArrangerWidget *self, double x, double y) |
To be called after using arranger_widget_create_item() in an action (ie, not from click + drag interaction with the arranger) to finish the action. | |
int | arranger_widget_get_total_height (ArrangerWidget *self) |
Returns the total height (including off-screen). | |
Arranger base widget.
Definition in file arranger.h.
#define ARRANGER_WIDGET_TYPE (arranger_widget_get_type ()) |
Definition at line 20 of file arranger.h.
typedef struct _ArrangerBgWidget ArrangerBgWidget |
Definition at line 23 of file arranger.h.
typedef struct _GtkEventControllerMotion GtkEventControllerMotion |
Definition at line 28 of file arranger.h.
typedef struct _RulerWidget RulerWidget |
Definition at line 33 of file arranger.h.