#include "inc/iup.bi"


' Initializes IUP
sub _init_ constructor
  IupOpen(0,0)
end sub
' Finishes IUP 
sub _exit_ destructor
  IupClose()
end sub
'
' main
'
' IUP identifiers 
dim as Ihandle ptr frame,dialog

' Creates frame with a label 
  frame = IupFrame( IupHbox(IupFill(), _
                            IupVbox( _
                                    IupFill(),_
                                    IupLabel (!"IupFrame Attributes:\nFGCOLOR = \"255 0 0\"\nSIZE = \"EIGHTHxEIGHTH\"\nTITLE = \"This is the frame\"\nMARGIN = \"10x10\""),_
                                    IupFill(),_
                                    NULL), _
                            IupFill(), _
                            NULL) _
                   )         

  ' Sets frame's attributes 
  IupSetAttributes(frame, !"FGCOLOR=\"255 0 0\", SIZE=8x8, TITLE=\"This is the frame\", MARGIN=10x10")

  ' Creates dialog  
  dialog = IupDialog(frame)

  ' Sets dialog's title 
  IupSetAttribute(dialog, "TITLE", "IupFrame")

  IupShow( dialog )  ' Shows dialog in the center of the screen 
  IupMainLoop()      ' Initializes IUP main loop 


