|
@@ -62,6 +62,7 @@
|
62
|
62
|
#include "cmGrFltk.h"
|
63
|
63
|
#include "gvHashFunc.h"
|
64
|
64
|
#include "cmGrTksbFltk.h"
|
|
65
|
+#include "cmGr2dFltk.h"
|
65
|
66
|
|
66
|
67
|
|
67
|
68
|
#define TIMER_PERIOD (1.0/20.0) // 50ms
|
|
@@ -1395,6 +1396,55 @@ void kcApp::_setTksrValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp
|
1395
|
1396
|
}
|
1396
|
1397
|
}
|
1397
|
1398
|
|
|
1399
|
+void kcApp::_createTwod( const cmDspUiHdr_t* m )
|
|
1400
|
+{
|
|
1401
|
+ int x,y,w=0,h=0;
|
|
1402
|
+
|
|
1403
|
+ page_t* pg = _createPage("2-D");
|
|
1404
|
+
|
|
1405
|
+ ctl_t* cp = _createCtl(m, kTwodTypeId, x,y,w,h, true );
|
|
1406
|
+
|
|
1407
|
+ w = pg->grp->w();
|
|
1408
|
+ h = pg->grp->h();
|
|
1409
|
+
|
|
1410
|
+ // currently we only support one Take sequence builder control because
|
|
1411
|
+ // we have not yet implmenented a method of providing
|
|
1412
|
+ // timer callbacks to a list of UI controls
|
|
1413
|
+ if( _tlCtl != NULL )
|
|
1414
|
+ cp->u.twod.tlctl = _tlCtl;
|
|
1415
|
+ else
|
|
1416
|
+ {
|
|
1417
|
+ _tlCtl = new tlCtl(_ctx,this,_menu,this);
|
|
1418
|
+
|
|
1419
|
+ cp->u.twod.tlctl = _tlCtl;
|
|
1420
|
+ }
|
|
1421
|
+
|
|
1422
|
+ Fl_Widget* wdgt = cp->u.twod.tlctl->init2dCtlr(x,y,w,h);
|
|
1423
|
+
|
|
1424
|
+ _insertNewCtl(cp,m,wdgt,cp->u.twod.varIdArray,kTwodVarCnt);
|
|
1425
|
+
|
|
1426
|
+}
|
|
1427
|
+
|
|
1428
|
+void kcApp::_setTwodValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp )
|
|
1429
|
+{
|
|
1430
|
+ unsigned i;
|
|
1431
|
+
|
|
1432
|
+ for(i=0; i<kTwodVarCnt; ++i)
|
|
1433
|
+ if( cp->u.twod.varIdArray[i] == instVarId )
|
|
1434
|
+ {
|
|
1435
|
+ switch(i)
|
|
1436
|
+ {
|
|
1437
|
+ case kTwodXArgIdx:
|
|
1438
|
+ case kTwodYArgIdx:
|
|
1439
|
+ case kTwodAngleArgIdx:
|
|
1440
|
+ case kTwodRadiusArgIdx:
|
|
1441
|
+ break;
|
|
1442
|
+
|
|
1443
|
+ default:
|
|
1444
|
+ { assert(0); }
|
|
1445
|
+ }
|
|
1446
|
+ }
|
|
1447
|
+}
|
1398
|
1448
|
|
1399
|
1449
|
void kcApp::_newColumn( const cmDspUiHdr_t* m )
|
1400
|
1450
|
{
|
|
@@ -1809,6 +1859,10 @@ void kcApp::_onRecvValue( const cmDspUiHdr_t* m )
|
1809
|
1859
|
_setTksrValue(cp, m->instVarId, &m->value);
|
1810
|
1860
|
break;
|
1811
|
1861
|
|
|
1862
|
+ case kTwodTypeId:
|
|
1863
|
+ _setTwodValue(cp, m->instVarId, &m->value);
|
|
1864
|
+ break;
|
|
1865
|
+
|
1812
|
1866
|
default:
|
1813
|
1867
|
assert(0);
|
1814
|
1868
|
}
|
|
@@ -1874,6 +1928,10 @@ void kcApp::_handleUiMsg( const cmDspUiHdr_t* m )
|
1874
|
1928
|
_createTksr(m);
|
1875
|
1929
|
break;
|
1876
|
1930
|
|
|
1931
|
+ case kTwodDuiId:
|
|
1932
|
+ _createTwod(m);
|
|
1933
|
+ break;
|
|
1934
|
+
|
1877
|
1935
|
case kValueDuiId:
|
1878
|
1936
|
_onRecvValue(m);
|
1879
|
1937
|
break;
|
|
@@ -2301,6 +2359,40 @@ void kcApp::_ctl_cb(ctl_t* cp)
|
2301
|
2359
|
|
2302
|
2360
|
case kTksrTypeId:
|
2303
|
2361
|
{
|
|
2362
|
+
|
|
2363
|
+ }
|
|
2364
|
+ break;
|
|
2365
|
+
|
|
2366
|
+ case kTwodTypeId:
|
|
2367
|
+ {
|
|
2368
|
+ cmGr2dFltk* twodCtl = dynamic_cast<cmGr2dFltk*>(cp->wdgtPtr);
|
|
2369
|
+
|
|
2370
|
+ unsigned i;
|
|
2371
|
+ for(i=0; i<kTwodVarCnt; ++i)
|
|
2372
|
+ {
|
|
2373
|
+ switch( i )
|
|
2374
|
+ {
|
|
2375
|
+ case kTwodXArgIdx:
|
|
2376
|
+ cmDsvSetDouble(&value,twodCtl->x());
|
|
2377
|
+ break;
|
|
2378
|
+
|
|
2379
|
+ case kTwodYArgIdx:
|
|
2380
|
+ cmDsvSetDouble(&value,twodCtl->y());
|
|
2381
|
+ break;
|
|
2382
|
+
|
|
2383
|
+ case kTwodAngleArgIdx:
|
|
2384
|
+ cmDsvSetDouble(&value,twodCtl->angle());
|
|
2385
|
+ break;
|
|
2386
|
+
|
|
2387
|
+ case kTwodRadiusArgIdx:
|
|
2388
|
+ cmDsvSetDouble(&value,twodCtl->radius());
|
|
2389
|
+ break;
|
|
2390
|
+ }
|
|
2391
|
+
|
|
2392
|
+ cmAdIfSendMsgToAudioDSP(_aiH,cp->asSubIdx,kUiSelAsId,kValueDuiId,0,cp->instId,cp->u.twod.varIdArray[i],&value);
|
|
2393
|
+ }
|
|
2394
|
+
|
|
2395
|
+ instVarId = cmInvalidId;
|
2304
|
2396
|
}
|
2305
|
2397
|
break;
|
2306
|
2398
|
|