
#include "inc/iup.bi"

sub _init_ constructor
  IupOpen(0,0)
end sub

sub _exit_ destructor
  IupClose()
end sub

function mlaction cdecl (self as Ihandle ptr, c as integer,after as zstring ptr) as integer
  if (c = K_g) then
    return IUP_IGNORE
  else
    return IUP_DEFAULT
  end if
end function

'
' main
'
dim as Ihandle ptr dlg, ml

ml = IupMultiLine(NULL)
IupSetCallback(ml, "ACTION", cast(Icallback,@mlaction))
IupSetAttribute(ml, "EXPAND", "YES")
IupSetAttribute(ml, "VALUE",  !"I ignore the \"g\" key!")
IupSetAttribute(ml, "BORDER", "YES")

dlg = IupDialog(ml)
IupSetAttribute(dlg, "TITLE", "IupMultiline")
IupSetAttribute(dlg, "SIZE",  "QUARTERxQUARTER")

IupShow(dlg)
IupMainLoop()

