Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
channel.h
1// SPDX-FileCopyrightText: © 2018-2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#ifndef __GUI_WIDGETS_CHANNEL_H__
5#define __GUI_WIDGETS_CHANNEL_H__
6
7#include "dsp/channel.h"
8#include "gui/widgets/meter.h"
9
10#include <gtk/gtk.h>
11
12typedef struct _PluginStripExpanderWidget PluginStripExpanderWidget;
13
14#define CHANNEL_WIDGET_TYPE (channel_widget_get_type ())
15G_DECLARE_FINAL_TYPE (ChannelWidget, channel_widget, Z, CHANNEL_WIDGET, GtkWidget)
16
17typedef struct _ColorAreaWidget ColorAreaWidget;
18typedef struct _KnobWidget KnobWidget;
19typedef struct _FaderWidget FaderWidget;
20typedef struct Channel Channel;
21typedef struct _ChannelSlotWidget ChannelSlotWidget;
22typedef struct _RouteTargetSelectorWidget RouteTargetSelectorWidget;
23typedef struct _BalanceControlWidget BalanceControlWidget;
24typedef struct _EditableLabelWidget EditableLabelWidget;
25typedef struct _FaderButtonsWidget FaderButtonsWidget;
26typedef struct _ChannelSendsExpanderWidget ChannelSendsExpanderWidget;
27
28typedef struct _ChannelWidget
29{
30 GtkWidget parent_instance;
31 GtkBox * box;
32 GtkBox * color_box;
33 GtkGrid * grid;
35 ColorAreaWidget * color;
36 GtkBox * icon_and_name_event_box;
37 EditableLabelWidget * name;
38 GtkToggleButton * instrument_ui_toggle;
39
42
43 GtkBox * phase_controls;
44 GtkButton * phase_invert;
45 GtkLabel * phase_reading;
46 KnobWidget * phase_knob;
47
50 ChannelSlotWidget * instrument_slot;
51
52 /* ----- mid box ------ */
53
54 GtkBox * mid_box;
57
60
61 /* -------- end mid box --------- */
62
63 FaderButtonsWidget * fader_buttons;
64
66 GtkBox * meter_area;
67 GtkBox * balance_control_box;
68 BalanceControlWidget * balance_control;
69 FaderWidget * fader;
70 MeterWidget * meter_l;
71 MeterWidget * meter_r;
72 GtkLabel * meter_reading;
73 GtkImage * icon;
74
77
80 GtkBox * highlight_right_box;
81
85
87 GtkToggleButton * mono_compat_btn;
88
92
95
98
103
106
114
118
120 GtkGestureClick * mp;
121
122 GtkGestureClick * right_mouse_mp;
123
125 GtkGestureDrag * drag;
126
127 bool setup;
128
130 GtkPopoverMenu * popover_menu;
131 FaderButtonsWidget * fader_buttons_for_popover;
133
137void
138channel_widget_update_midi_fx_and_inserts (ChannelWidget * self);
139
140void
141channel_widget_redraw_fader (ChannelWidget * self);
142
147channel_widget_new (Channel * channel);
148
149void
150channel_widget_tear_down (ChannelWidget * self);
151
158void
159channel_widget_refresh (ChannelWidget * self);
160
161void
162channel_widget_refresh_buttons (ChannelWidget * self);
163
164void
165channel_widget_refresh_instrument_ui_toggle (ChannelWidget * self);
166
171GMenu *
172channel_widget_generate_context_menu_for_track (Track * track);
173
177void
178channel_widget_show (ChannelWidget * self);
179
180#endif
API for Channel, representing a channel strip on the mixer.
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
GtkPopoverMenu * popover_menu
Popover to be reused for context menus.
Definition channel.h:130
gulong instrument_ui_toggled_id
Handler ID.
Definition channel.h:41
GtkBox * instrument_box
Instrument slot.
Definition channel.h:49
int ctrl_held_at_start
Control held down on drag begin.
Definition channel.h:94
ChannelSendsExpanderWidget * sends
Sends.
Definition channel.h:59
double meter_reading_val
Cache.
Definition channel.h:76
GtkBox * highlight_left_box
Used for highlighting.
Definition channel.h:79
GtkBox * meter_area
Meter area including reading.
Definition channel.h:66
GtkToggleButton * mono_compat_btn
Mono compatibility button.
Definition channel.h:87
int dragged
If drag update was called at least once.
Definition channel.h:97
GtkGestureDrag * drag
Drag on the icon and name event box.
Definition channel.h:125
GtkBox * aux_buttons_box
Box for auxiliary buttons near the top of the widget.
Definition channel.h:84
gint64 last_midi_trigger_time
Last MIDI event trigger time, for MIDI output.
Definition channel.h:117
int n_press
Number of clicks, used when selecting/moving/ dragging channels.
Definition channel.h:91
Channel * channel
Pointer to owner Channel.
Definition channel.h:105
int selected_in_dnd
The track selection processing was done in the dnd callbacks, so no need to do it in drag_end.
Definition channel.h:102
gint64 last_plugin_press
Last time a plugin was pressed.
Definition channel.h:113
GtkGestureClick * mp
Whole channel press.
Definition channel.h:120
A Channel is part of a Track (excluding Tracks that don't have Channels) and contains information rel...
Definition channel.h:61
A FaderWidget reflects a Fader object's state.
Definition fader.h:29
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
Dropdown to select the direct output of a track.
Track to be inserted into the Project's Tracklist.
Definition track.h:177