  '03:01 19/05/2015

  ===================
  class ControlsClass
  ===================

  bstring tbuf
  bstring ebuf
  sys    count

  method build(sys mode)
  ======================
  '
  indexbase 1
  sys i,pt,pe,le
  TextArray *txt
  EditBoxObject *ed
  '
  '
  'DESTROY
  '
  if mode=0 then
    @txt=strptr tbuf
    @ed=strptr ebuf
    for i=1 to count
      txt[i].destructor
      ed[i].destructor
    next
    frees tbuf
    frees ebuf
    exit method
  end if
  '
  'CREATE TEXTS & EDITBOXES
  '
  count=5

  tbuf=nuls count*sizeof TextArray
  ebuf=nuls count*sizeof EditboxObject
  '
  @txt=strptr tbuf
  @ed=strptr ebuf
  '
  for i=1 to count
    txt[i].constructor
    ed[i].constructor
  next
  '
  sys et,cou
  '
  '
  et=txt[1].load textfile1
  'txt[1].save "s.txt"
  'sys i,j
  'if txt[1].locate "wndproc",i,j then print txt[1].line(i) cr cr  i  "  " j
  string filter="*.inc"
  txt[2].lines GetFileList (filter,cou)
  txt[2].sortlines 1 'DESCENDING ORDER
  txt[3].line(1)="This is Box3"
  txt[4].line(1)="This is Box4"
  txt[5].line(1)="This is Box5"
  '
  'INIT EDIT CONTROLS
  '
  '         id  ox   oy   sx    sy  sl    txt
  -----------------------------------------------
  ed[1].set 1,  0.2, 0.0, .5,   1,  .030, @txt[1]
  ed[2].set 2, -0.2, 0.3, .2,  .1,  .020, @txt[2]
  ed[3].set 3, -0.2, 0.2, .2,  .1,  .020, @txt[3]
  ed[4].set 4, -0.2, 0.1, .2,  .05, .020, @txt[4]
  ed[5].set 5, -0.2, -.0, .2,  .1,  .020, @txt[5]

  'ed.enq

  'main edit panel ed[1]==ed
  ed.editAble    =1
  ed.blockSelAble=1
  ed.lino        =1

ed.Keywords=
"
!
###
#alert
#asm
#assign
#autodim
#basic
#blockdepth
#byref
#byval
#case
#compact
#console
#def
#define
#dim
#elif
#else
#elseif
#emit
#endif
#endv
#error
#fi
#file
#if
#ifdef
#ifndef
#include
#lookahead
#noinit
#noprec
#o2h
#pragma
#print
#recordof
#semicolon
#show
#undef
#undefine
#unique
#view

$
%
&
@
+
,
:
-
*
/
=
<
>
(
)
[
]
{
}
|
^

inc
dec

abs
acos
add
addr
alias
and
any
as
asc
asciiz
asin
asm
at
atan
atn
basic
bind
block
bool
break
bstr
bstring
wbstring
byref
byte
byval
call
case
cast
cdecl
ceil
char
chr
class
com
comparestr
compile
const
continue
convert
copy
copy0
copy00
copyn
cos
countof
cpu
data
dataspace
db
dd
declare
def
deff
deg
del
dim
div
do
double
dq
dw
dword
else
data
elseif
embedfile
encodingof
end
enddo
endif
endselect
endwhile
enum
error
exit
exp
export
ext
extended
extern
external
float
floor
for
fpu
frac
freelibrary
freelibs
freememory
frees
freestrings
from
function
getfile
getmemory
getprocaddress
global
gosub
goto
guidtxt
guidval
has
hex
hypot
idiv
if
imul
incl
include
includepath
indexbase
indexers
inherits
instr
int
integer
jmp
jnz
jz
label
lcase
lea
leaf
left
len
let
lib
library
librarypath
lin
link
load
loadlibrary
local
log
log10
log2
logn
long
ltrim
macro
mbox
method
methods
mid
mmx
mod
mov
ms64
mul
new
news
next
not
null
nuls
numberformat
o2
o2h
of
offset
offsetof
once
operator
or
packed
pascal
pi
pow
print
private
protected
prototypeof
public
putfile
quad
quote
qword
rad
readstate
recip
recordof
rem
repeat
retn
return
round
rtrim
sal
sar
scope
select
select
sgn
shl
short
shr
signed
sin
single
sizeof
skip
space
spanof
sqr
sqrt
static
stdcall
step
step
str
string
wstring
strptr
struct
structureof
sub
switch
sys
tan
terminate
that
then
data
this
to
trunc
type
typecodeof
typedef
typeof
ubyte
ucase
uint
ulong
undef
unic
union
unsigned
val
var
version
virtual
void
wchar
wchr
wend
while
wide
with
word
wstring
xor
zstring
wzstring
"

  'itr function names etc
  end method



  method zone()
  =============
  sys i
  EditBoxObject ed at strptr ebuf
  '
  acte=0
  '
  for i=1 to count
    ed[i].zone
    if SelObject then exit for
  next
  end method


  method render()
  ===============
  '
  sys i
  EditBoxObject ed at strptr ebuf
  '
  for i=1 to count
    ed[i].render
  next
  end method



  method action()
  ===============
  indexbase 1
  static string s1,s2
  EditBoxObject *ed,*ei
  @ed=strptr ebuf
  @ei=@ed[2]
  n=ei.LineNumber : s1=ei.Getline n
  if s1<>s2 then
    ed[5].putline(s1,1)
    ed[5].putline("B" cr,2)
    ed[5].putline("C" cr,3)
    ed[5].putline("D" cr,4)
    ed[5].putline("E" cr,5)
    ed[1].load s1
    s2=s1
  end if
  end method


  end class


