|
@@ -77,7 +77,8 @@ kcApp::kcApp(int w, int h, const char *l, int argc, char *argv[])
|
77
|
77
|
_adlH(cmAdlNullHandle),_aiH(cmAiNullHandle),
|
78
|
78
|
_statIdx(0),_pageList(NULL),_ctlList(NULL),_prH(cmPrNullHandle),_prefsFn(NULL),
|
79
|
79
|
_stopTimerFl(false),_jsH(cmJsonNullHandle),_newPageFl(true),_incrColW(0),_colW(0),_horzBordFl(false),_horzBord(0),
|
80
|
|
- _closeCnt(0),_ssCnt(0),_ssArray(0),_ssPhase(0),_ssUpdateFl(false),_printqH(cmTsQueueNullHandle)
|
|
80
|
+ _closeCnt(0),_ssCnt(0),_ssArray(0),_ssPhase(0),_ssUpdateFl(false),_printqH(cmTsQueueNullHandle),
|
|
81
|
+ _tlCtl(NULL)
|
81
|
82
|
{
|
82
|
83
|
// install a callback to cleanup when the app window closes
|
83
|
84
|
// (the btn callbacks and _getApp() rely on a pointer to 'this' being found in kcApp.user_data())
|
|
@@ -423,6 +424,7 @@ void kcApp::_clearCtlList(bool mstrFl)
|
423
|
424
|
if( mstrFl )
|
424
|
425
|
mstr_grp->clear();
|
425
|
426
|
|
|
427
|
+ _tlCtl = NULL;
|
426
|
428
|
}
|
427
|
429
|
|
428
|
430
|
|
|
@@ -1222,6 +1224,11 @@ void kcApp::_createTmln( const cmDspUiHdr_t* m )
|
1222
|
1224
|
|
1223
|
1225
|
cp->u.tmln.tlctl = new tlCtl(&_ctx,this,NULL);
|
1224
|
1226
|
|
|
1227
|
+ // currently we only support one time-line control because
|
|
1228
|
+ // we have not yet implmenented a method of providing
|
|
1229
|
+ // timer callbacks to a list of UI controls
|
|
1230
|
+ assert( _tlCtl == NULL );
|
|
1231
|
+ _tlCtl = cp->u.tmln.tlctl;
|
1225
|
1232
|
|
1226
|
1233
|
Fl_Widget* wdgt = cp->u.tmln.tlctl->initTimeLineCtlr(_menu,x,y,w,h);
|
1227
|
1234
|
|
|
@@ -1239,15 +1246,10 @@ void kcApp::_setTmlnValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp
|
1239
|
1246
|
{
|
1240
|
1247
|
switch(i)
|
1241
|
1248
|
{
|
1242
|
|
- case kTmlnValArgIdx:
|
|
1249
|
+ case kTmlnSelArgIdx:
|
1243
|
1250
|
//tp->value( cmDsvStrcz(vp));
|
1244
|
1251
|
break;
|
1245
|
1252
|
|
1246
|
|
- case kTmlnLblArgIdx:
|
1247
|
|
- {
|
1248
|
|
- const char* lbl = cmDsvStrcz(vp);
|
1249
|
|
- }
|
1250
|
|
- break;
|
1251
|
1253
|
|
1252
|
1254
|
case kTmlnFileArgIdx:
|
1253
|
1255
|
{
|
|
@@ -1907,12 +1909,13 @@ void kcApp::_callback(void* data)
|
1907
|
1909
|
// to be diplayed in the console - all successive
|
1908
|
1910
|
// times the return value from finalizePgm() is
|
1909
|
1911
|
// ignored and the program is terminated.
|
|
1912
|
+ /*
|
1910
|
1913
|
if( _closeCnt == 1 && cc==0)
|
1911
|
1914
|
{
|
1912
|
1915
|
deactivate(); // send a strong hint that a problem occurred
|
1913
|
1916
|
return;
|
1914
|
1917
|
}
|
1915
|
|
-
|
|
1918
|
+ */
|
1916
|
1919
|
|
1917
|
1920
|
// When all windows are windows are closed then the app.
|
1918
|
1921
|
// will close - so hiding the application window
|
|
@@ -1949,7 +1952,11 @@ bool kcApp::_status_timeout_cb()
|
1949
|
1952
|
_checkPrintQueue();
|
1950
|
1953
|
|
1951
|
1954
|
if( !_stopTimerFl )
|
|
1955
|
+ {
|
1952
|
1956
|
_getEngMsg();
|
|
1957
|
+ if( _tlCtl != NULL )
|
|
1958
|
+ _tlCtl->onIdle();
|
|
1959
|
+ }
|
1953
|
1960
|
|
1954
|
1961
|
if( _ssUpdateFl )
|
1955
|
1962
|
{
|
|
@@ -2129,8 +2136,11 @@ void kcApp::_ctl_cb(ctl_t* cp)
|
2129
|
2136
|
break;
|
2130
|
2137
|
|
2131
|
2138
|
case kTmlnTypeId:
|
2132
|
|
- //instVarId = cp->u.text.varIdArray[ kTmlnValArgIdx ];
|
2133
|
|
- //cmDsvSetStrz(&value,(cmChar_t*)cp->u.tmln.text->value());
|
|
2139
|
+ {
|
|
2140
|
+ instVarId = cp->u.text.varIdArray[ kTmlnSelArgIdx ];
|
|
2141
|
+ unsigned selMarkerId = cp->u.tmln.tlctl->timeLineSelectedMarkerId();
|
|
2142
|
+ cmDsvSetUInt(&value, selMarkerId );
|
|
2143
|
+ }
|
2134
|
2144
|
break;
|
2135
|
2145
|
|
2136
|
2146
|
default:
|