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 "utils/types.h"
14#include "utils/yaml.h"
15
16#include "gtk_wrapper.h"
17
18#define MULTI_SELECTION_WIDGET_TYPE (multi_selection_widget_get_type ())
19G_DECLARE_FINAL_TYPE (
21 multi_selection_widget,
22 Z,
23 MULTI_SELECTION_WIDGET,
24 GtkWidget)
25
26
35typedef void (*MultiSelectionChangedCallback) (
36 MultiSelectionWidget * multi_selection,
37 const GArray * selection_indices,
38 void * object);
39
44typedef struct _MultiSelectionWidget
45{
46 GtkWidget parent_instance;
47
49 GArray * item_strings;
50
53 GArray * selections;
54
56 void * obj;
57
58 MultiSelectionChangedCallback sel_changed_cb;
59
60 GtkFlowBox * flow_box;
61
63
64void
65multi_selection_widget_setup (
67 const char ** strings,
68 const int num_items,
69 MultiSelectionChangedCallback sel_changed_cb,
70 const guint * selections,
71 const int num_selections,
72 void * object);
73
75multi_selection_widget_new (void);
76
81#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.