#include once "fltk-c.bi"

' test of:
' Fl_Tile    http://www.fltk.org/doc-1.3/classFl__Tile.html

function CreateMainWindow as FL_WINDOW ptr
  dim as integer w,h
  ' create flicker free double window
  dim as FL_Window ptr win = Fl_Double_WindowNew(512,512,"drag the lines or the cross in the middle")
  Fl_WindowBegin win
    w=Fl_WidgetGetW(win)
    h=Fl_WidgetGetH(win)
    dim as FL_Group ptr grp = Fl_GroupNew(0,0,w,h)
    Fl_GroupBegin grp
      dim as FL_Group ptr tile = Fl_TileNew(0,0,w,h)
      Fl_GroupBegin tile
        w=w\2 : h=h\2
        Fl_WidgetSetBox Fl_Round_ClockNew(0,0,w,h),FL_DOWN_BOX
        Fl_WidgetSetBox Fl_Round_ClockNew(w,0,w,h),FL_DOWN_BOX
        Fl_WidgetSetBox Fl_Round_ClockNew(0,h,w,h),FL_DOWN_BOX
        Fl_WidgetSetBox Fl_Round_ClockNew(w,h,w,h),FL_DOWN_BOX
      Fl_GroupEnd tile
    Fl_GroupEnd grp
  Fl_WindowEnd win
  Fl_GroupSetResizable win,grp
  Fl_WindowSizeRange win,160,100
  return win
end function

'
' main
'
Fl_WindowShow CreateMainWindow()
Fl_Run
