aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/ui_hd24trackchannel.fl
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/ui_hd24trackchannel.fl')
-rw-r--r--src/frontend/ui_hd24trackchannel.fl322
1 files changed, 322 insertions, 0 deletions
diff --git a/src/frontend/ui_hd24trackchannel.fl b/src/frontend/ui_hd24trackchannel.fl
new file mode 100644
index 0000000..748313e
--- /dev/null
+++ b/src/frontend/ui_hd24trackchannel.fl
@@ -0,0 +1,322 @@
1# data file for the Fltk User Interface Designer (fluid)
2version 1.0107
3header_name {.h}
4code_name {.cxx}
5decl {\#include <config.h>} {public
6}
7
8decl {\#include <FL/FLTKstuff.H>} {public
9}
10
11decl {\#include <ui_hd24connect.h>} {public
12}
13
14class HD24TrackChannel {open : {public Fl_Group}
15} {
16 decl {\#define PEAKMODE_NOHOLD 0} {public
17 }
18 decl {\#define PEAKMODE_TEMPHOLD 1} {public
19 }
20 decl {\#define PEAKMODE_CONTHOLD 2} {public
21 }
22 decl {\#define PEAKMODE_MAXHOLD 33} {public
23 }
24 decl {int mode;} {}
25 decl {int maxledslit; /* for peak hold */} {public
26 }
27 decl {int holdtime;} {public
28 }
29 decl {RecorderUI* ui;} {selected
30 }
31 decl {Fl_Box* levelled[10];} {public
32 }
33 decl {Fl_Window* win;} {}
34 decl {unsigned int channel;} {}
35 Function {make_window()} {open
36 } {
37 Fl_Window ledchannel {open
38 xywh {20 74 20 120} type Double color 0 labelcolor 7
39 code0 {o->position(parent()->x(),parent()->y());}
40 class Fl_Group visible
41 } {
42 Fl_Box tracknum {
43 label 1
44 xywh {3 76 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 10 labelcolor 6 align 2
45 }
46 Fl_Box led1 {
47 xywh {3 76 12 6} box FLAT_BOX color 6 labelfont 1 labelsize 10 labelcolor 6 align 2 hide
48 code0 {levelled[0]=led1;}
49 }
50 Fl_Box recled {
51 xywh {3 96 12 6} box FLAT_BOX color 1 labelfont 1 labelsize 10 labelcolor 1 align 2 hide
52 }
53 Fl_Box inputled {
54 xywh {3 104 12 6} box FLAT_BOX color 6 labelfont 1 labelsize 10 labelcolor 6 align 2 hide
55 }
56 Fl_Box led2 {
57 xywh {3 68 12 6} box FLAT_BOX color 6 labelfont 1 labelsize 10 labelcolor 6 align 2 hide
58 code0 {levelled[1]=led2;}
59 }
60 Fl_Box led3 {
61 xywh {3 60 12 6} box FLAT_BOX color 6 labelfont 1 labelsize 10 labelcolor 6 align 2 hide
62 code0 {levelled[2]=led3;}
63 }
64 Fl_Box led4 {
65 xywh {3 52 12 6} box FLAT_BOX color 6 labelfont 1 labelsize 10 labelcolor 6 align 2 hide
66 code0 {levelled[3]=led4;}
67 }
68 Fl_Box led5 {
69 xywh {3 44 12 6} box FLAT_BOX color 6 labelfont 1 labelsize 10 labelcolor 6 align 2 hide
70 code0 {levelled[4]=led5;}
71 }
72 Fl_Box led6 {
73 xywh {3 36 12 6} box FLAT_BOX color 6 labelfont 1 labelsize 10 labelcolor 6 align 2 hide
74 code0 {levelled[5]=led6;}
75 }
76 Fl_Box led7 {
77 xywh {3 28 12 6} box FLAT_BOX color 93 labelfont 1 labelsize 10 labelcolor 93 align 2 hide
78 code0 {levelled[6]=led7;}
79 }
80 Fl_Box led8 {
81 xywh {3 20 12 6} box FLAT_BOX color 93 labelfont 1 labelsize 10 labelcolor 93 align 2 hide
82 code0 {levelled[7]=led8;}
83 }
84 Fl_Box led9 {
85 xywh {3 12 12 6} box FLAT_BOX color 93 labelfont 1 labelsize 10 labelcolor 93 align 2 hide
86 code0 {levelled[8]=led9;}
87 }
88 Fl_Box led10 {
89 xywh {3 4 12 6} box FLAT_BOX color 1 labelfont 1 labelsize 10 labelcolor 1 align 2 hide
90 code0 {levelled[9]=led10;}
91 }
92 }
93 }
94 Function {setval(float levelval)} {open
95 } {
96 code {int lednum=0;
97double myval=(double)levelval;
98
99// reset peaks if desired
100switch (mode) {
101 case PEAKMODE_NOHOLD: this->peakreset(); break;
102 case PEAKMODE_TEMPHOLD:
103 if (this->holdtime>PEAKMODE_MAXHOLD) {
104 peakreset();
105 } else {
106 this->holdtime++;
107 }
108 break;
109 case PEAKMODE_CONTHOLD:
110 break;
111 default:
112 this->mode=PEAKMODE_NOHOLD;
113 peakreset();
114 break;
115}
116
117int ledslit=0;
118
119if (myval>= ledlimit[lednum]) { ledslit=1; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
120if (myval>= ledlimit[lednum]) { ledslit=2; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
121if (myval>= ledlimit[lednum]) { ledslit=3; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
122if (myval>= ledlimit[lednum]) { ledslit=4; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
123if (myval>= ledlimit[lednum]) { ledslit=5; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
124if (myval>= ledlimit[lednum]) { ledslit=6; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
125if (myval>= ledlimit[lednum]) { ledslit=7; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
126if (myval>= ledlimit[lednum]) { ledslit=8; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
127if (myval>= ledlimit[lednum]) { ledslit=9; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
128if (myval>= ledlimit[lednum]) { ledslit=10; this->levelled[lednum++]->show(); } else { this->levelled[lednum++]->hide(); }
129
130if (ledslit >this->maxledslit ) {
131 this->maxledslit=ledslit;
132 this->holdtime=0;
133} else {
134 if ((this->maxledslit)>0) {
135 this->levelled[maxledslit-1]->show();
136 }
137}
138
139checkblink();} {}
140 }
141 Function {init_window()} {open return_type void
142 } {
143 code {this->mode=PEAKMODE_NOHOLD;
144this->win=(Fl_Window*)make_window();
145this->ui=NULL;
146this->channel=0;
147this->maxledslit=0;
148this->holdtime=0;
149this->ledlimit[0]=(double)pow(10,(double)((double)-30/(double)10)); // -30 dB
150this->ledlimit[1]=(double)pow(10,(double)((double)-24/(double)10)); // -24 dB
151this->ledlimit[2]=(double)pow(10,(double)((double)-18/(double)10));
152this->ledlimit[3]=(double)pow(10,(double)((double)-12/(double)10)); //...
153this->ledlimit[4]=(double)pow(10,(double)((double)-7.5/(double)10));
154this->ledlimit[5]=(double)pow(10,(double)((double)-4.5/(double)10));
155this->ledlimit[6]=(double)pow(10,(double)((double)-3/(double)10));
156this->ledlimit[7]=(double)pow(10,(double)((double)-1.5/(double)10));
157this->ledlimit[8]=(double)pow(10,(double)((double)-.5/(double)10));
158this->ledlimit[9]=(double)pow(10,(double)((double)0/(double)10)); // -0 dB
159
160this->setval(0);
161
162return;} {}
163 }
164 Function {HD24TrackChannel(int a,int b,int c,int d,const char* e):Fl_Group(a,b,c,d,e)} {open
165 } {
166 code {init_window();} {}
167 }
168 Function {HD24TrackChannel(int a,int b,int c,int d):Fl_Group(a,b,c,d,NULL)} {open
169 } {
170 code {init_window();} {}
171 }
172 Function {setchnum(__uint32 i)} {open
173 } {
174 code {/* As copy_label does not work on older versions of fltk,
175 the label now persists within the object but outside this
176 function. This solves the problem that is nowadays addressed
177 by copy_label, but without requiring an up-to-date version
178 of FLTK (1.1.6 or later). */
179channel=i;
180snprintf(&labeltext[0],8,"%ld",i);
181this->tracknum->label(labeltext);} {}
182 }
183 Function {setui(RecorderUI* p_ui)} {open
184 } {
185 code {this->ui=p_ui;} {}
186 }
187 Function {checkblink()} {open
188 } {
189 code {if (ui==NULL) return;
190/*
191TODO: Make available
192if (ui->currenthd24==NULL) return;
193*/
194if (channel==0) return;
195
196
197bool showinputled=false;
198/*
199if (ui->currenthd24->isallinput()) {
200 if (ui->control->song()==NULL) {
201 // no song, show all input leds
202 showinputled=true;
203 } else {
204 // song selected, only show as many
205 // input leds as channels in the song
206 if (channel<=ui->control->song()->logical_channels()) {
207 showinputled=ui->control->song()->istrackmonitoringinput(channel);
208 }
209 }
210} else {
211*/
212 if (ui->control->song()!=NULL) {
213 showinputled=ui->control->song()->istrackmonitoringinput(channel);
214 }
215/*
216}
217*/
218
219if (ui->control->song()!=NULL) {
220if (ui->control->song()->logical_channels()<channel) {
221 this->recled->hide();
222} else {
223 if (ui->control->song()->trackarmed(channel)) {
224 if (ui->blinkcounter<8) {
225 this->recled->hide();
226 } else {
227 this->recled->show();
228 }
229 } else {
230 this->recled->hide();
231 }
232}
233}
234if (showinputled) {
235 this->inputled->show();
236} else {
237 this->inputled->hide();
238}
239
240return;} {}
241 }
242 decl {double ledlimit[10];} {}
243 Function {peakreset()} {return_type void
244 } {
245 code {maxledslit=0;
246holdtime=0;} {}
247 }
248 Function {peakmode(int p_peakmode)} {return_type void
249 } {
250 code {this->mode=p_peakmode;
251peakreset();} {}
252 }
253 decl {char labeltext[10];} {}
254}
255
256class TrackInfo {: {public Fl_Group}
257} {
258 Function {make_window()} {} {
259 Fl_Window ledchannel {
260 xywh {5 69 20 120} type Double color 0 labelcolor 7 align 16 hide
261 code0 {o->position(parent()->x(),parent()->y());}
262 class Fl_Group
263 } {
264 Fl_Box led1 {
265 label {-60}
266 xywh {3 76 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 6 align 16
267 }
268 Fl_Box recled {
269 label REC
270 xywh {3 96 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 1 align 16
271 }
272 Fl_Box inputled {
273 label INP
274 xywh {3 104 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 6 align 16
275 }
276 Fl_Box led2 {
277 label {-48}
278 xywh {3 68 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 6 align 16
279 }
280 Fl_Box led3 {
281 label {-36}
282 xywh {3 60 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 6 align 16
283 }
284 Fl_Box led4 {
285 label {-24}
286 xywh {3 52 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 6 align 16
287 }
288 Fl_Box led5 {
289 label {-15}
290 xywh {3 44 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 1 align 16
291 }
292 Fl_Box led6 {
293 label {-9}
294 xywh {3 36 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 6 align 16
295 }
296 Fl_Box led7 {
297 label {-6}
298 xywh {3 28 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 93 align 16
299 }
300 Fl_Box led8 {
301 label {-3}
302 xywh {3 20 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 93 align 16
303 }
304 Fl_Box led9 {
305 label {-1}
306 xywh {3 12 12 6} box FLAT_BOX color 0 labelfont 1 labelsize 9 labelcolor 93 align 16
307 }
308 Fl_Box led10 {
309 label CLIP
310 xywh {0 4 22 6} box FLAT_BOX color 0 labelfont 1 labelsize 8 labelcolor 1 align 16
311 }
312 }
313 }
314 Function {TrackInfo(int a,int b,int c,int d,const char* e):Fl_Group(a,b,c,d,e)} {open
315 } {
316 code {make_window();} {}
317 }
318 Function {TrackInfo(int a,int b,int c,int d):Fl_Group(a,b,c,d,NULL)} {open
319 } {
320 code {make_window();} {}
321 }
322}