Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
inspector_port.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2021 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __GUI_WIDGETS_INSPECTOR_PORT_H__
11#define __GUI_WIDGETS_INSPECTOR_PORT_H__
12
13#include "utils/resources.h"
14
15#include <gtk/gtk.h>
16
17#define INSPECTOR_PORT_WIDGET_TYPE (inspector_port_widget_get_type ())
18G_DECLARE_FINAL_TYPE (
20 inspector_port_widget,
21 Z,
22 INSPECTOR_PORT_WIDGET,
23 GtkWidget)
24
25typedef struct _BarSliderWidget BarSliderWidget;
26typedef struct _PortConnectionsPopoverWidget PortConnectionsPopoverWidget;
27typedef struct Meter Meter;
28
38typedef struct _InspectorPortWidget
39{
40 GtkWidget parent_instance;
41
42 GtkOverlay * overlay;
43
46
49
57
59 float minf;
60 float maxf;
61 float zerof;
62
65
67 char port_str[400];
68
71
82 float last_normalized_val;
83 bool last_port_val_set;
84
87
89 GtkToggleButton * jack;
90
92 GtkToggleButton * midi;
93
95 GtkGestureClick * double_click_gesture;
96
98 GtkGestureClick * right_click_gesture;
99
100 char hex_color[40];
101
105
107 GtkPopoverMenu * popover_menu;
108
109 PortConnectionsPopoverWidget * connections_popover;
111
112void
113inspector_port_widget_refresh (InspectorPortWidget * self);
114
120
125#endif
InspectorPortWidget * inspector_port_widget_new(Port *port)
Creates a new widget.
Helpers for loading and using resources such as icons.
Draggable slider to adjust an amount (such as a percentage).
Definition bar_slider.h:55
A Port to show in the inspector for Plugin's.
BarSliderWidget * bar_slider
The bar slider.
gint64 last_tooltip_change
Last time the tooltip changed.
Meter * meter
Meter for this widget.
int last_num_connections
Cache of port's last drawn number of connetions (srcs or dests).
GtkGestureClick * double_click_gesture
Multipress guesture for double click.
gint64 last_midi_trigger_time
Last MIDI event trigger time, for MIDI ports.
GtkToggleButton * jack
Jack button to expose port to jack.
float last_real_val
Caches of last real value and its corresponding normalized value.
float minf
Caches from the port.
GtkToggleButton * midi
MIDI button to select MIDI CC sources.
Port * port
Port this is for.
GtkPopoverMenu * popover_menu
Popover to be reused for context menus.
GtkGestureClick * right_click_gesture
Multipress guesture for right click.
float normalized_init_port_val
Normalized value at the start of an action.
A Meter used by a single GUI element.
Definition meter.h:48
Must ONLY be created via port_new()
Definition port.h:139