Zrythm v2.0.0-DEV
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
9
10#ifndef __GUI_WIDGETS_MULTI_SELECTION_H__
11#define __GUI_WIDGETS_MULTI_SELECTION_H__
12
13#include "common/utils/types.h"
14#include "common/utils/yaml.h"
15#include "gui/backend/gtk_widgets/gtk_wrapper.h"
16
17#define MULTI_SELECTION_WIDGET_TYPE (multi_selection_widget_get_type ())
18G_DECLARE_FINAL_TYPE (
20 multi_selection_widget,
21 Z,
22 MULTI_SELECTION_WIDGET,
23 GtkWidget)
24
25
30
31
34typedef void (*MultiSelectionChangedCallback) (
35 MultiSelectionWidget * multi_selection,
36 const GArray * selection_indices,
37 void * object);
38
43typedef struct _MultiSelectionWidget
44{
45 GtkWidget parent_instance;
46
48 GArray * item_strings;
49
52 GArray * selections;
53
55 void * obj;
56
57 MultiSelectionChangedCallback sel_changed_cb;
58
59 GtkFlowBox * flow_box;
60
62
63void
64multi_selection_widget_setup (
66 const char ** strings,
67 const int num_items,
68 MultiSelectionChangedCallback sel_changed_cb,
69 const guint * selections,
70 const int num_selections,
71 void * object);
72
74multi_selection_widget_new (void);
75
79
80#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.