1 /*
2  * Copyright (C) 2018-2021 Alexandros Theodotou <alex at zrythm dot org>
3  *
4  * This file is part of Zrythm
5  *
6  * Zrythm is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Affero General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Zrythm is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU Affero General Public License for more details.
15  *
16  * You should have received a copy of the GNU Affero General Public License
17  * along with Zrythm.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 /**
21  * \file
22  *
23  * Export dialog.
24  */
25 
26 #ifndef __GUI_WIDGETS_EXPORT_DIALOG_H__
27 #define __GUI_WIDGETS_EXPORT_DIALOG_H__
28 
29 #include <gtk/gtk.h>
30 
31 #define EXPORT_DIALOG_WIDGET_TYPE \
32   (export_dialog_widget_get_type ())
33 G_DECLARE_FINAL_TYPE (
34   ExportDialogWidget,
35   export_dialog_widget,
36   Z, EXPORT_DIALOG_WIDGET,
37   GtkDialog)
38 
39 /**
40  * @addtogroup widgets
41  *
42  * @{
43  */
44 
45 typedef enum ExportFilenamePattern
46 {
47   EFP_APPEND_FORMAT,
48   EFP_PREPEND_DATE_APPEND_FORMAT,
49 } ExportFilenamePattern;
50 
51 /**
52  * The export dialog.
53  */
54 typedef struct _ExportDialogWidget
55 {
56   GtkDialog            parent_instance;
57   GtkButton *          cancel_button;
58   GtkButton *          export_button;
59   GtkEntry *           export_artist;
60   GtkEntry *           export_title;
61   GtkEntry *           export_genre;
62   GtkComboBox *        filename_pattern;
63   GtkToggleButton *    time_range_song;
64   GtkToggleButton *    time_range_loop;
65   GtkToggleButton *    time_range_custom;
66   GtkComboBox *        format;
67   GtkComboBox *        bit_depth;
68   GtkToggleButton *    dither;
69   GtkLabel *           output_label;
70 
71   GtkTreeView *        tracks_treeview;
72   GtkTreeModel *       tracks_model;
73 
74   /** Underlying model of @ref
75    * ExportDialogWidget.tracks_model. */
76   GtkTreeStore *       tracks_store;
77 
78   GtkToggleButton *    mixdown_toggle;
79   GtkToggleButton *    stems_toggle;
80 } ExportDialogWidget;
81 
82 /**
83  * Creates an export dialog widget and displays it.
84  */
85 ExportDialogWidget *
86 export_dialog_widget_new (void);
87 
88 /**
89  * @}
90  */
91 
92 #endif
93