ソースを参照

cmDspClass.h, cmDspUi.c : Added cmDspUiTakeSeqBldrCreate().

master
Kevin Larke 9年前
コミット
5510595568
2個のファイルの変更29行の追加10行の削除
  1. 11
    10
      dsp/cmDspClass.h
  2. 18
    0
      dsp/cmDspUi.c

+ 11
- 10
dsp/cmDspClass.h ファイルの表示

@@ -391,16 +391,17 @@ extern "C" {
391 391
   // visible to the cmDspInst functions which use them but are not available
392 392
   // to the host UI.  The other values defined and declared in cmDspUi.h are
393 393
   // common to both the host UI and the DSP instances.
394
-  cmDspRC_t  cmDspUiConsolePrint( cmDspCtx_t* ctx, cmChar_t* text );
395
-  cmDspRC_t  cmDspUiSendValue(    cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned varId, const cmDspValue_t* valPtr ); 
396
-  cmDspRC_t  cmDspUiSendVar(      cmDspCtx_t* ctx, cmDspInst_t* inst, cmDspVar_t* var );
397
-  cmDspRC_t  cmDspUiScalarCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned typeDuiId, unsigned minVarId,  unsigned maxVarId,  unsigned stpVarId, unsigned valVarId, unsigned lblVarId );
398
-  cmDspRC_t  cmDspUiTextCreate(   cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned valVarId, unsigned lblVarId );
399
-  cmDspRC_t  cmDspUiMeterCreate(  cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned minVarId,  unsigned maxVarId,  unsigned valVarId,  unsigned lblVarId );
400
-  cmDspRC_t  cmDspUiButtonCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned typeDuiId, unsigned outVarId, unsigned lblVarId );
401
-  cmDspRC_t  cmDspUiLabelCreate(  cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned lblVarId,  unsigned alignVarId );
402
-  cmDspRC_t  cmDspUiTimeLineCreate(cmDspCtx_t* ctx,cmDspInst_t* inst, unsigned tlFileVarId,  unsigned audPathVarId, unsigned selVarId, unsigned cursVarId );
403
-  cmDspRC_t  cmDspUiScoreCreate(   cmDspCtx_t* ctx,cmDspInst_t* inst, unsigned scFileVarId,  unsigned selVarId, unsigned smpIdxVarId, unsigned pitchVarId, unsigned velVarId, unsigned locIdxVarIdx, unsigned evtIdxVarIdx, unsigned dynLvlVarIdx, unsigned valTypeVarIdx, unsigned valueVarIdx );
394
+  cmDspRC_t  cmDspUiConsolePrint(      cmDspCtx_t* ctx, cmChar_t* text );
395
+  cmDspRC_t  cmDspUiSendValue(         cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned varId, const cmDspValue_t* valPtr ); 
396
+  cmDspRC_t  cmDspUiSendVar(           cmDspCtx_t* ctx, cmDspInst_t* inst, cmDspVar_t* var );
397
+  cmDspRC_t  cmDspUiScalarCreate(      cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned typeDuiId, unsigned minVarId,  unsigned maxVarId,  unsigned stpVarId, unsigned valVarId, unsigned lblVarId );
398
+  cmDspRC_t  cmDspUiTextCreate(        cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned valVarId, unsigned lblVarId );
399
+  cmDspRC_t  cmDspUiMeterCreate(       cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned minVarId,  unsigned maxVarId,  unsigned valVarId,  unsigned lblVarId );
400
+  cmDspRC_t  cmDspUiButtonCreate(      cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned typeDuiId, unsigned outVarId, unsigned lblVarId );
401
+  cmDspRC_t  cmDspUiLabelCreate(       cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned lblVarId,  unsigned alignVarId );
402
+  cmDspRC_t  cmDspUiTimeLineCreate(    cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned tlFileVarId,  unsigned audPathVarId, unsigned selVarId, unsigned cursVarId );
403
+  cmDspRC_t  cmDspUiScoreCreate(       cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned scFileVarId,  unsigned selVarId, unsigned smpIdxVarId, unsigned pitchVarId, unsigned velVarId, unsigned locIdxVarIdx, unsigned evtIdxVarIdx, unsigned dynLvlVarIdx, unsigned valTypeVarIdx, unsigned valueVarIdx );
404
+  cmDspRC_t  cmDspUiTakeSeqBldrCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned fileNameVarId );
404 405
 
405 406
   cmDspRC_t  cmDspUiNewColumn(        cmDspCtx_t* ctx, unsigned colW );
406 407
   cmDspRC_t  cmDspUiInsertHorzBorder( cmDspCtx_t* ctx );

+ 18
- 0
dsp/cmDspUi.c ファイルの表示

@@ -415,6 +415,24 @@ cmDspRC_t  cmDspUiScoreCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned scFi
415 415
   return rc;
416 416
 }
417 417
 
418
+cmDspRC_t  cmDspUiTakeSeqBldrCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned fileNameVarId )
419
+{
420
+  cmDspRC_t    rc;
421
+  unsigned     arr[] = { fileNameVarId  };
422
+  cmDspValue_t v;
423
+  unsigned     vn    = sizeof(arr)/sizeof(arr[0]);
424
+  cmDsvSetUIntMtx(&v,arr,vn,1);
425
+
426
+  // tell the UI to create a time-line control
427
+  if((rc = _cmDspUiMsg( ctx, kUiSelAsId, kTakeSeqBldrDuiId, 0, inst, cmInvalidId, &v )) != kOkDspRC )
428
+    return cmDspInstErr(ctx,inst,kUiEleCreateFailDspRC,"Take Sequence Builder UI element create failed.");
429
+
430
+  // Setting kUiDsvFl will cause variable values to be sent to the UI whenever they change.
431
+  cmDspInstVarSetFlags( ctx, inst, fileNameVarId,  kUiDsvFl );
432
+
433
+  return rc;
434
+}
435
+
418 436
 
419 437
 cmDspRC_t  cmDspUiNewColumn(    cmDspCtx_t* ctx, unsigned colW )
420 438
 {

読み込み中…
キャンセル
保存