kcApp.h/cpp: Added 'print pgm' option.
This commit is contained in:
parent
f6d5382969
commit
d212ce24d2
@ -198,6 +198,11 @@ void kcApp::_createSetupDlg( Fl_Group* grp )
|
|||||||
btn->callback( _s_btn_cb, kTestBtnId );
|
btn->callback( _s_btn_cb, kTestBtnId );
|
||||||
yy += btn->h() + vBord;
|
yy += btn->h() + vBord;
|
||||||
|
|
||||||
|
btn = new Fl_Button(xx,yy,200,kMenuH,"Print program");
|
||||||
|
btn->callback( _s_btn_cb, kPrintPgmBtnId );
|
||||||
|
yy += btn->h() + vBord;
|
||||||
|
|
||||||
|
|
||||||
_ena_chk = new Fl_Check_Button(xx,yy,ctl_width,kMenuH,"Enable Audio");
|
_ena_chk = new Fl_Check_Button(xx,yy,ctl_width,kMenuH,"Enable Audio");
|
||||||
_ena_chk->callback( _s_btn_cb, kEnableBtnId );
|
_ena_chk->callback( _s_btn_cb, kEnableBtnId );
|
||||||
yy += _ena_chk->h() + vBord;
|
yy += _ena_chk->h() + vBord;
|
||||||
@ -1147,7 +1152,7 @@ void kcApp::_setTmlnValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp
|
|||||||
if((path = cmDsvStrcz(vp)) != NULL )
|
if((path = cmDsvStrcz(vp)) != NULL )
|
||||||
{
|
{
|
||||||
cp->u.tmln.tlctl->setAudioFilePath(path);
|
cp->u.tmln.tlctl->setAudioFilePath(path);
|
||||||
//cp->u.tmln.tlctl->redraw();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1881,6 +1886,27 @@ void kcApp::_testStub()
|
|||||||
_tlCtl->testStub();
|
_tlCtl->testStub();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void kcApp::_printPgm()
|
||||||
|
{
|
||||||
|
const char* pathStr = cmFsUserDir(); // make the default dir the user's home dir
|
||||||
|
const char patStr[] = ""; //"Text Files (*.txt)\tAudio Files (*.{wav,aif,aiff})"; // All Files (*.*) is append to this automatically
|
||||||
|
const char titleStr[] = "JSON output file name";
|
||||||
|
|
||||||
|
Fl_File_Chooser fc = Fl_File_Chooser(pathStr,patStr,Fl_File_Chooser::CREATE,titleStr);
|
||||||
|
|
||||||
|
fc.preview(0); // default the previous option to 'off'.
|
||||||
|
fc.show(); // show the chooser
|
||||||
|
|
||||||
|
// make the chooser modal
|
||||||
|
while( fc.shown() )
|
||||||
|
Fl::wait();
|
||||||
|
|
||||||
|
if( fc.count() > 0)
|
||||||
|
cmAdIfPrintPgm(_aiH, cmInvalidIdx, fc.value(0) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void kcApp::_s_callback(Fl_Widget* wp, void* data)
|
void kcApp::_s_callback(Fl_Widget* wp, void* data)
|
||||||
{ ((kcApp*)data)->_callback(NULL); }
|
{ ((kcApp*)data)->_callback(NULL); }
|
||||||
@ -2022,6 +2048,10 @@ void kcApp::_btn_cb(Fl_Widget* w, long data)
|
|||||||
_testStub();
|
_testStub();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kPrintPgmBtnId:
|
||||||
|
_printPgm();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{ assert(0); }
|
{ assert(0); }
|
||||||
}
|
}
|
||||||
|
@ -148,6 +148,7 @@ private:
|
|||||||
kSubSystemIdxBtnId,
|
kSubSystemIdxBtnId,
|
||||||
kSrateBtnId,
|
kSrateBtnId,
|
||||||
kTestBtnId,
|
kTestBtnId,
|
||||||
|
kPrintPgmBtnId,
|
||||||
|
|
||||||
kAboutMenuId,
|
kAboutMenuId,
|
||||||
kQuitMenuId
|
kQuitMenuId
|
||||||
@ -389,6 +390,7 @@ private:
|
|||||||
void _onCloseApp();
|
void _onCloseApp();
|
||||||
|
|
||||||
void _testStub();
|
void _testStub();
|
||||||
|
void _printPgm();
|
||||||
|
|
||||||
// main app callback
|
// main app callback
|
||||||
static void _s_callback(Fl_Widget* wp, void* data);
|
static void _s_callback(Fl_Widget* wp, void* data);
|
||||||
|
Loading…
Reference in New Issue
Block a user