#include once "fltk-c.bi"
dim as ubyte r8=128,g8=64,b8=0
dim as double r=0.5,g=0.26,b=0.0
dim as zstring ptr file
dim as zstring ptr path

sub FileOrFolderCB cdecl (path as const zstring ptr)
  if path<>0 then print !"FileChosserCB(\"" & *path & !"\")"
end sub

flFileChooserCallback @FileOrFolderCB

flMessageTitle("I'm a individual Title !")
flAlert "flAlert(message)"

flMessageTitleDefault("I'm a default Title !")

print "flChoice() = " & flChoice("flChoice()", "button0", "button1", "button2")

flColorChooser "flColorChooser()",r8,g8,b8, FL_COLORCHOOSER_RGB
? "flColorChooser() = " & r8,g8,b8

flColorChooser2 "flColorChooser2()",r,g,b, FL_COLORCHOOSER_RGB
? "flColorChooser2() = " & r,g,b

? "flInput() = " & *flInput("%s","type here ...")


path = flDirChooser("select a folder", ExePath(), 1) ' 1 = relative 0 = absolute path
if path<>0 then ? "flDirChooser() = " & *path

flFileChooserOkLabel("I'm a OK label")
file = flFileChooser("select a file","*.bas", ExePath(), 1) ' 1 = relative 0 = absolute path
if file<>0 then ? "flFileChooser() = " & *file

? "press any key ..."
sleep
