Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
multi_selection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __GUI_WIDGETS_MULTI_SELECTION_H__
11#define __GUI_WIDGETS_MULTI_SELECTION_H__
12
13#include <stdbool.h>
14
15#include "utils/types.h"
16#include "utils/yaml.h"
17
18#include <gtk/gtk.h>
19
20#define MULTI_SELECTION_WIDGET_TYPE (multi_selection_widget_get_type ())
21G_DECLARE_FINAL_TYPE (
23 multi_selection_widget,
24 Z,
25 MULTI_SELECTION_WIDGET,
26 GtkWidget)
27
28
37typedef void (*MultiSelectionChangedCallback) (
38 MultiSelectionWidget * multi_selection,
39 const GArray * selection_indices,
40 void * object);
41
46typedef struct _MultiSelectionWidget
47{
48 GtkWidget parent_instance;
49
51 GArray * item_strings;
52
55 GArray * selections;
56
58 void * obj;
59
60 MultiSelectionChangedCallback sel_changed_cb;
61
62 GtkFlowBox * flow_box;
63
65
66void
67multi_selection_widget_setup (
69 const char ** strings,
70 const int num_items,
71 MultiSelectionChangedCallback sel_changed_cb,
72 const guint * selections,
73 const int num_selections,
74 void * object);
75
77multi_selection_widget_new (void);
78
83#endif
A menu button that allows selecting active hardware ports.
GArray * selections
Array of selected item indices from MultiSelectionWidget.item_strings.
void * obj
Object to call callbacks with.
GArray * item_strings
Array of items as string labels.
Custom types.
YAML utils.