#include once "fltk-c.bi"

'test of:
' Fl_File_Chooser  http://www.fltk.org/doc-1.3/classFl__File__Chooser.html
' Fl_File_ChooserCallback
' Fl_File_ChooserShow
sub FileChooserCB cdecl(fc as Fl_File_Chooser ptr,pdata as any ptr)
  dim as const zstring ptr filename=0
  filename = Fl_File_ChooserGetValue(fc)
  print "FileChooserCB: " & *filename
end sub


dim as Fl_File_Chooser ptr fc = Fl_File_ChooserNew(".", "*.bas", Fl_SINGLE, "Fl_File_Chooser01.bas")
Fl_File_ChooserSetPreview fc,1
Fl_File_ChooserCallback fc,@FileChooserCB
Fl_File_ChooserShow fc
Fl_Run
