summaryrefslogtreecommitdiff
path: root/src/gd_config.h
blob: fa28b80f2c498ba47b1f6298e099a6123aaa959c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/* ---------------------------------------------------------------------
 *
 * Giada - Your Hardcore Loopmachine
 *
 * gd_config
 *
 * ---------------------------------------------------------------------
 *
 * Copyright (C) 2010-2015 Giovanni A. Zuliani | Monocasual
 *
 * This file is part of Giada - Your Hardcore Loopmachine.
 *
 * Giada - Your Hardcore Loopmachine is free software: you can
 * redistribute it and/or modify it under the terms of the GNU General
 * Public License as published by the Free Software Foundation, either
 * version 3 of the License, or (at your option) any later version.
 *
 * Giada - Your Hardcore Loopmachine is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Giada - Your Hardcore Loopmachine. If not, see
 * <http://www.gnu.org/licenses/>.
 *
 * ------------------------------------------------------------------ */

#ifndef GD_CONFIG_H
#define GD_CONFIG_H

#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Tabs.H>
#include "ge_window.h"


class gdConfig : public gWindow
{
private:
	static void cb_save_config        (Fl_Widget *w, void *p);
	static void cb_cancel             (Fl_Widget *w, void *p);
	inline void __cb_save_config();
	inline void __cb_cancel();

public:
	gdConfig(int w, int h);
	~gdConfig();

	class gTabAudio     *tabAudio;
	class gTabBehaviors *tabBehaviors;
	class gTabMidi      *tabMidi;
	class gTabMisc      *tabMisc;
	class gClick 	      *save;
	class gClick 	      *cancel;
};


/* ------------------------------------------------------------------ */


class gTabMidi : public Fl_Group
{
private:

	void fetchSystems();
	void fetchOutPorts();
	void fetchInPorts();
	void fetchMidiMaps();

	static void cb_changeSystem  (Fl_Widget *w, void *p);
	inline void __cb_changeSystem();

	int systemInitValue;

public:
	
	class gChoice *system;
	class gChoice *portOut;
	class gChoice *portIn;
	class gCheck  *noNoteOff;
	class gChoice *midiMap;
	class gChoice *sync;

	gTabMidi(int x, int y, int w, int h);

	void save();
};


/* ------------------------------------------------------------------ */


class gTabAudio : public Fl_Group
{
private:
	static void cb_deactivate_sounddev(Fl_Widget *w, void *p);
	static void cb_fetchInChans       (Fl_Widget *w, void *p);
	static void cb_fetchOutChans      (Fl_Widget *w, void *p);
	static void cb_showInputInfo      (Fl_Widget *w, void *p);
	static void cb_showOutputInfo     (Fl_Widget *w, void *p);
	inline void __cb_deactivate_sounddev();
	inline void __cb_fetchInChans();
	inline void __cb_fetchOutChans();
	inline void __cb_showInputInfo();
	inline void __cb_showOutputInfo();

	void fetchSoundDevs();
	void fetchInChans(int menuItem);
	void fetchOutChans(int menuItem);
	int  findMenuDevice(class gChoice *m, int device);

	int soundsysInitValue;

public:
	class gChoice *soundsys;
	class gChoice *samplerate;
	class gChoice *rsmpQuality;
	class gChoice *sounddevIn;
	class gClick  *devInInfo;
	class gChoice *channelsIn;
	class gChoice *sounddevOut;
	class gClick  *devOutInfo;
	class gChoice *channelsOut;
	class gCheck  *limitOutput;
	class gChoice *buffersize;
	class gInput  *delayComp;

	gTabAudio(int x, int y, int w, int h);

	void save();
};


/* ------------------------------------------------------------------ */


class gTabBehaviors : public Fl_Group
{
private:
	static void cb_radio_mutex  (Fl_Widget *w, void *p);
	inline void __cb_radio_mutex(Fl_Widget *w);

public:
	class gRadio *recsStopOnChanHalt_1;
	class gRadio *recsStopOnChanHalt_0;
	class gRadio *chansStopOnSeqHalt_1;
	class gRadio *chansStopOnSeqHalt_0;
	class gCheck *treatRecsAsLoops;

	gTabBehaviors(int x, int y, int w, int h);

	void save();
};


/* ------------------------------------------------------------------ */


class gTabMisc : public Fl_Group
{
public:
	class gChoice *debugMsg;

	gTabMisc(int x, int y, int w, int h);

	void save();
};


#endif