|
@@ -198,6 +198,11 @@ void kcApp::_createSetupDlg( Fl_Group* grp )
|
198
|
198
|
btn->callback( _s_btn_cb, kTestBtnId );
|
199
|
199
|
yy += btn->h() + vBord;
|
200
|
200
|
|
|
201
|
+ btn = new Fl_Button(xx,yy,200,kMenuH,"Print program");
|
|
202
|
+ btn->callback( _s_btn_cb, kPrintPgmBtnId );
|
|
203
|
+ yy += btn->h() + vBord;
|
|
204
|
+
|
|
205
|
+
|
201
|
206
|
_ena_chk = new Fl_Check_Button(xx,yy,ctl_width,kMenuH,"Enable Audio");
|
202
|
207
|
_ena_chk->callback( _s_btn_cb, kEnableBtnId );
|
203
|
208
|
yy += _ena_chk->h() + vBord;
|
|
@@ -1147,7 +1152,7 @@ void kcApp::_setTmlnValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp
|
1147
|
1152
|
if((path = cmDsvStrcz(vp)) != NULL )
|
1148
|
1153
|
{
|
1149
|
1154
|
cp->u.tmln.tlctl->setAudioFilePath(path);
|
1150
|
|
- //cp->u.tmln.tlctl->redraw();
|
|
1155
|
+
|
1151
|
1156
|
}
|
1152
|
1157
|
}
|
1153
|
1158
|
break;
|
|
@@ -1881,6 +1886,27 @@ void kcApp::_testStub()
|
1881
|
1886
|
_tlCtl->testStub();
|
1882
|
1887
|
}
|
1883
|
1888
|
|
|
1889
|
+void kcApp::_printPgm()
|
|
1890
|
+{
|
|
1891
|
+ const char* pathStr = cmFsUserDir(); // make the default dir the user's home dir
|
|
1892
|
+ const char patStr[] = ""; //"Text Files (*.txt)\tAudio Files (*.{wav,aif,aiff})"; // All Files (*.*) is append to this automatically
|
|
1893
|
+ const char titleStr[] = "JSON output file name";
|
|
1894
|
+
|
|
1895
|
+ Fl_File_Chooser fc = Fl_File_Chooser(pathStr,patStr,Fl_File_Chooser::CREATE,titleStr);
|
|
1896
|
+
|
|
1897
|
+ fc.preview(0); // default the previous option to 'off'.
|
|
1898
|
+ fc.show(); // show the chooser
|
|
1899
|
+
|
|
1900
|
+ // make the chooser modal
|
|
1901
|
+ while( fc.shown() )
|
|
1902
|
+ Fl::wait();
|
|
1903
|
+
|
|
1904
|
+ if( fc.count() > 0)
|
|
1905
|
+ cmAdIfPrintPgm(_aiH, cmInvalidIdx, fc.value(0) );
|
|
1906
|
+
|
|
1907
|
+}
|
|
1908
|
+
|
|
1909
|
+
|
1884
|
1910
|
|
1885
|
1911
|
void kcApp::_s_callback(Fl_Widget* wp, void* data)
|
1886
|
1912
|
{ ((kcApp*)data)->_callback(NULL); }
|
|
@@ -2022,6 +2048,10 @@ void kcApp::_btn_cb(Fl_Widget* w, long data)
|
2022
|
2048
|
_testStub();
|
2023
|
2049
|
break;
|
2024
|
2050
|
|
|
2051
|
+ case kPrintPgmBtnId:
|
|
2052
|
+ _printPgm();
|
|
2053
|
+ break;
|
|
2054
|
+
|
2025
|
2055
|
default:
|
2026
|
2056
|
{ assert(0); }
|
2027
|
2057
|
}
|