Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
folder_channel.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2021-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __GUI_WIDGETS_FOLDER_CHANNEL_H__
11#define __GUI_WIDGETS_FOLDER_CHANNEL_H__
12
13#include "common/dsp/foldable_track.h"
14#include "common/utils/types.h"
15#include "gui/backend/gtk_widgets/gtk_wrapper.h"
16
17#define FOLDER_CHANNEL_WIDGET_TYPE (folder_channel_widget_get_type ())
18G_DECLARE_FINAL_TYPE (
19 FolderChannelWidget,
20 folder_channel_widget,
21 Z,
22 FOLDER_CHANNEL_WIDGET,
23 GtkWidget)
24
25class Track;
26TYPEDEF_STRUCT_UNDERSCORED (ColorAreaWidget);
27TYPEDEF_STRUCT_UNDERSCORED (FolderChannelSlotWidget);
28TYPEDEF_STRUCT_UNDERSCORED (EditableLabelWidget);
29TYPEDEF_STRUCT_UNDERSCORED (FaderButtonsWidget);
30
36
37using FolderChannelWidget = struct _FolderChannelWidget
38{
39 GtkWidget parent_instance;
40 GtkGrid * grid;
41 ColorAreaWidget * color_top;
42 ColorAreaWidget * color_left;
43 GtkBox * icon_and_name_event_box;
44 GtkLabel * name_lbl;
45
46 GtkImage * icon;
47
48 GtkToggleButton * fold_toggle;
49
51 GtkBox * highlight_left_box;
52 GtkBox * highlight_right_box;
53
55 FaderButtonsWidget * fader_buttons;
56
59 int n_press;
60
62 bool ctrl_held_at_start;
63
65 bool dragged;
66
70 bool selected_in_dnd;
71
73 FoldableTrack * track;
74
76 GtkGestureClick * mp;
77
78 GtkGestureClick * right_mouse_mp;
79
81 GtkGestureDrag * drag;
82
83 gulong fold_toggled_handler_id;
84
85 bool setup;
86
88 GtkPopoverMenu * popover_menu;
89};
90
94FolderChannelWidget *
95folder_channel_widget_new (FoldableTrack * track);
96
97void
98folder_channel_widget_tear_down (FolderChannelWidget * self);
99
106void
107folder_channel_widget_refresh (FolderChannelWidget * self);
108
112void
113folder_channel_widget_show (FolderChannelWidget * self);
114
118
119#endif
void folder_channel_widget_show(FolderChannelWidget *self)
Displays the widget.
FolderChannelWidget * folder_channel_widget_new(FoldableTrack *track)
Creates a folder_channel widget using the given folder_channel data.
void folder_channel_widget_refresh(FolderChannelWidget *self)
Updates everything on the widget.