1 /*
2  * lingot, a musical instrument tuner.
3  *
4  * Copyright (C) 2004-2018  Iban Cereijo.
5  * Copyright (C) 2004-2008  Jairo Chapela.
6 
7  *
8  * This file is part of lingot.
9  *
10  * lingot is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * lingot is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with lingot; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23  */
24 
25 #ifndef __LINGOT_GUI_CONFIG_DIALOG_H__
26 #define __LINGOT_GUI_CONFIG_DIALOG_H__
27 
28 #include <gtk/gtk.h>
29 
30 #include "lingot-config.h"
31 
32 typedef struct _LingotConfigDialog LingotConfigDialog;
33 
34 struct _LingotConfigDialog {
35 
36 	// widgets that contains configuration information.
37 	GtkComboBoxText* input_system;
38 	GtkComboBoxText* input_dev;
39     GtkScale* calculation_rate;
40     GtkScale* visualization_rate;
41     GtkScale* noise_threshold;
42 	GtkComboBoxText* fft_size;
43 	GtkSpinButton* temporal_window;
44 	GtkSpinButton* root_frequency_error;
45 	GtkComboBoxText* minimum_frequency;
46 	GtkComboBoxText* maximum_frequency;
47 	GtkComboBoxText* octave;
48 	GtkCheckButton* optimize_check_button;
49 	GtkLabel* fft_size_label;
50 	GtkLabel* fft_size_units_label;
51 	GtkLabel* temporal_window_label;
52 	GtkLabel* temporal_window_units_label;
53 
54 	GtkNotebook* notebook;
55 
56 	GtkButton* button_scale_add;
57 	GtkButton* button_scale_del;
58 
59 	GtkEntry* scale_name;
60 	GtkTreeView* scale_treeview;
61 
62 	LingotConfig conf; // provisional configuration.
63 	LingotConfig conf_old; // restoration point for cancel.
64 
65 	LingotMainFrame* mainframe;
66 
67 	GtkWidget* win; // window
68 };
69 
70 void lingot_gui_config_dialog_destroy(LingotConfigDialog*);
71 void lingot_gui_config_dialog_show(LingotMainFrame* frame, LingotConfig* config);
72 
73 #endif // __LINGOT_GUI_CONFIG_DIALOG_H__
74