I don't know what routines the foobar SDK provides to 3rd party programmers.
Neither do I, but I am pretty certain there will be facility to query a playlist and find the files used and the exact length of each track... and that's all we need really.
In my opinion, the main reason for using a foobar-plugin to create a cuesheet directly from foobar itself lies in its ability to write the exact cue points of several independent tracks before they are combined into one large file (as described above), such as audiobooks consisting of separate track rips. Thus, the component should primarily with the request to create a cuesheet with one file for the whole playlist in mind. Selected tracks are taken and written to the cuesheet file, leaving the task of creating the actual media file to the user.
Exactly. Diskwriter being the obvious choice, to create the image file from the same playlist.
NB: For those that want to create a cuesheet for individual files, as foo_cue_ex appeared to previously do, you can just use the following as your copy command ("Preferences > Display > Title formatting > Copy command"):
FILE "%_path%" $if($stricmp(%__codec%,MP3),MP3,$if($stricmp(%__codec%,AIFF),AIFF,WAVE))$char(10)
TRACK $num(%_playlist_number%,2) AUDIO$char(10)
$if(%title%, TITLE "%title%"$char(10),)
$if(%artist%, PERFORMER "%artist%"$char(10),)
INDEX 01 00:00:00
Select all the tracks, right-click and choose "Copy names" (or press Ctrl+C), then paste into a new text file and save as <name>.cue.
Edit: updated copy code - now correctly uses the FILE type (MP3, AIFF, or WAVE)