Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
string_entry_dialog.h
1// SPDX-FileCopyrightText: © 2019-2020, 2023-2024 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#ifndef __GUI_WIDGETS_STRING_ENTRY_DIALOG_H__
5#define __GUI_WIDGETS_STRING_ENTRY_DIALOG_H__
6
7#include "common/utils/types.h"
8#include "gui/backend/gtk_widgets/libadwaita_wrapper.h"
9
10#define STRING_ENTRY_DIALOG_WIDGET_TYPE (string_entry_dialog_widget_get_type ())
11G_DECLARE_FINAL_TYPE (
13 string_entry_dialog_widget,
14 Z,
15 STRING_ENTRY_DIALOG_WIDGET,
16 AdwMessageDialog)
17
18typedef struct _MarkerWidget MarkerWidget;
19class Marker;
20
26
30using StringEntryDialogWidget = struct _StringEntryDialogWidget
31{
32 AdwMessageDialog parent_instance;
33
34 GtkEntry * entry;
35 GtkButton * ok;
36
39};
40
46 const std::string &label,
48 GenericStringSetter setter);
49
53
54#endif
std::function< std::string()> GenericStringGetter
Getter prototype for strings.
Definition types.h:102
std::function< void(const std::string &)> GenericStringSetter
Setter prototype for float values.
Definition types.h:107
struct _StringEntryDialogWidget { AdwMessageDialog parent_instance; GtkEntry * entry; GtkButton *ok; GenericStringGetter getter; GenericStringSetter setter;} StringEntryDialogWidget
A dialog to edit a string.
StringEntryDialogWidget * string_entry_dialog_widget_new(const std::string &label, GenericStringGetter getter, GenericStringSetter setter)
Creates the dialog.