cwPresetSel.h/cpp : Added report_presets().

This commit is contained in:
kevin 2023-11-26 15:27:29 -05:00
parent e6c70090fa
commit 3f9f72600c
2 changed files with 21 additions and 0 deletions

View File

@ -1409,6 +1409,26 @@ cw::rc_t cw::preset_sel::report( handle_t h )
return rc; return rc;
} }
cw::rc_t cw::preset_sel::report_presets( handle_t h )
{
rc_t rc = kOkRC;
preset_sel_t* p = _handleToPtr(h);
unsigned beg_loc = 1;
frag_t* f = p->fragL;
for(; f!=nullptr; f=f->link)
{
printf("%5i %5i ",beg_loc,f->endLoc);
for(unsigned i=0; i<f->presetN; ++i)
if( f->presetA[i].playFl || f->presetA[i].order!=0 )
printf("(%s-%i) ", p->presetLabelA[ f->presetA[i].preset_idx ].label, f->presetA[i].order);
printf("\n");
beg_loc = f->endLoc+1;
}
return rc;
}
cw::rc_t cw::preset_sel::translate_frags( const object_t* cfg ) cw::rc_t cw::preset_sel::translate_frags( const object_t* cfg )

View File

@ -128,6 +128,7 @@ namespace cw
rc_t write( handle_t h, const char* fn ); rc_t write( handle_t h, const char* fn );
rc_t read( handle_t h, const char* fn ); rc_t read( handle_t h, const char* fn );
rc_t report( handle_t h ); rc_t report( handle_t h );
rc_t report_presets( handle_t h );
rc_t translate_frags( const object_t* obj ); rc_t translate_frags( const object_t* obj );