kcApp.h/cpp Further time line ctl integration
This commit is contained in:
parent
2a701ba707
commit
7a322b8b4c
@ -77,7 +77,8 @@ kcApp::kcApp(int w, int h, const char *l, int argc, char *argv[])
|
|||||||
_adlH(cmAdlNullHandle),_aiH(cmAiNullHandle),
|
_adlH(cmAdlNullHandle),_aiH(cmAiNullHandle),
|
||||||
_statIdx(0),_pageList(NULL),_ctlList(NULL),_prH(cmPrNullHandle),_prefsFn(NULL),
|
_statIdx(0),_pageList(NULL),_ctlList(NULL),_prH(cmPrNullHandle),_prefsFn(NULL),
|
||||||
_stopTimerFl(false),_jsH(cmJsonNullHandle),_newPageFl(true),_incrColW(0),_colW(0),_horzBordFl(false),_horzBord(0),
|
_stopTimerFl(false),_jsH(cmJsonNullHandle),_newPageFl(true),_incrColW(0),_colW(0),_horzBordFl(false),_horzBord(0),
|
||||||
_closeCnt(0),_ssCnt(0),_ssArray(0),_ssPhase(0),_ssUpdateFl(false),_printqH(cmTsQueueNullHandle)
|
_closeCnt(0),_ssCnt(0),_ssArray(0),_ssPhase(0),_ssUpdateFl(false),_printqH(cmTsQueueNullHandle),
|
||||||
|
_tlCtl(NULL)
|
||||||
{
|
{
|
||||||
// install a callback to cleanup when the app window closes
|
// install a callback to cleanup when the app window closes
|
||||||
// (the btn callbacks and _getApp() rely on a pointer to 'this' being found in kcApp.user_data())
|
// (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)
|
|||||||
if( mstrFl )
|
if( mstrFl )
|
||||||
mstr_grp->clear();
|
mstr_grp->clear();
|
||||||
|
|
||||||
|
_tlCtl = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1222,6 +1224,11 @@ void kcApp::_createTmln( const cmDspUiHdr_t* m )
|
|||||||
|
|
||||||
cp->u.tmln.tlctl = new tlCtl(&_ctx,this,NULL);
|
cp->u.tmln.tlctl = new tlCtl(&_ctx,this,NULL);
|
||||||
|
|
||||||
|
// currently we only support one time-line control because
|
||||||
|
// we have not yet implmenented a method of providing
|
||||||
|
// timer callbacks to a list of UI controls
|
||||||
|
assert( _tlCtl == NULL );
|
||||||
|
_tlCtl = cp->u.tmln.tlctl;
|
||||||
|
|
||||||
Fl_Widget* wdgt = cp->u.tmln.tlctl->initTimeLineCtlr(_menu,x,y,w,h);
|
Fl_Widget* wdgt = cp->u.tmln.tlctl->initTimeLineCtlr(_menu,x,y,w,h);
|
||||||
|
|
||||||
@ -1239,15 +1246,10 @@ void kcApp::_setTmlnValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp
|
|||||||
{
|
{
|
||||||
switch(i)
|
switch(i)
|
||||||
{
|
{
|
||||||
case kTmlnValArgIdx:
|
case kTmlnSelArgIdx:
|
||||||
//tp->value( cmDsvStrcz(vp));
|
//tp->value( cmDsvStrcz(vp));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kTmlnLblArgIdx:
|
|
||||||
{
|
|
||||||
const char* lbl = cmDsvStrcz(vp);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kTmlnFileArgIdx:
|
case kTmlnFileArgIdx:
|
||||||
{
|
{
|
||||||
@ -1907,12 +1909,13 @@ void kcApp::_callback(void* data)
|
|||||||
// to be diplayed in the console - all successive
|
// to be diplayed in the console - all successive
|
||||||
// times the return value from finalizePgm() is
|
// times the return value from finalizePgm() is
|
||||||
// ignored and the program is terminated.
|
// ignored and the program is terminated.
|
||||||
|
/*
|
||||||
if( _closeCnt == 1 && cc==0)
|
if( _closeCnt == 1 && cc==0)
|
||||||
{
|
{
|
||||||
deactivate(); // send a strong hint that a problem occurred
|
deactivate(); // send a strong hint that a problem occurred
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// When all windows are windows are closed then the app.
|
// When all windows are windows are closed then the app.
|
||||||
// will close - so hiding the application window
|
// will close - so hiding the application window
|
||||||
@ -1949,7 +1952,11 @@ bool kcApp::_status_timeout_cb()
|
|||||||
_checkPrintQueue();
|
_checkPrintQueue();
|
||||||
|
|
||||||
if( !_stopTimerFl )
|
if( !_stopTimerFl )
|
||||||
|
{
|
||||||
_getEngMsg();
|
_getEngMsg();
|
||||||
|
if( _tlCtl != NULL )
|
||||||
|
_tlCtl->onIdle();
|
||||||
|
}
|
||||||
|
|
||||||
if( _ssUpdateFl )
|
if( _ssUpdateFl )
|
||||||
{
|
{
|
||||||
@ -2129,8 +2136,11 @@ void kcApp::_ctl_cb(ctl_t* cp)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case kTmlnTypeId:
|
case kTmlnTypeId:
|
||||||
//instVarId = cp->u.text.varIdArray[ kTmlnValArgIdx ];
|
{
|
||||||
//cmDsvSetStrz(&value,(cmChar_t*)cp->u.tmln.text->value());
|
instVarId = cp->u.text.varIdArray[ kTmlnSelArgIdx ];
|
||||||
|
unsigned selMarkerId = cp->u.tmln.tlctl->timeLineSelectedMarkerId();
|
||||||
|
cmDsvSetUInt(&value, selMarkerId );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -137,11 +137,10 @@ private:
|
|||||||
kMetrLblArgIdx = 3,
|
kMetrLblArgIdx = 3,
|
||||||
kMetrVarCnt = 4,
|
kMetrVarCnt = 4,
|
||||||
|
|
||||||
kTmlnValArgIdx = 0,
|
kTmlnFileArgIdx= 0,
|
||||||
kTmlnLblArgIdx = 1,
|
kTmlnPathArgIdx= 1,
|
||||||
kTmlnFileArgIdx= 2,
|
kTmlnSelArgIdx = 2,
|
||||||
kTmlnPathArgIdx= 3,
|
kTmlnVarCnt = 3
|
||||||
kTmlnVarCnt = 4
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -303,6 +302,7 @@ private:
|
|||||||
int _ssPhase;
|
int _ssPhase;
|
||||||
bool _ssUpdateFl;
|
bool _ssUpdateFl;
|
||||||
cmTsQueueH_t _printqH; // thread-safe queue for controlling access to the output console from multiple threads
|
cmTsQueueH_t _printqH; // thread-safe queue for controlling access to the output console from multiple threads
|
||||||
|
tlCtl* _tlCtl;
|
||||||
|
|
||||||
void resize(int x, int y, int w, int h);
|
void resize(int x, int y, int w, int h);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user