canvas-test2.m 1.37 KB
Newer Older
bp's avatar
bp committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#! xbigforth
\ automatic generated code
\ do not edit

also editor also minos also forth

component class comp0000
public:
  glcanvas ptr gl1
  glcanvas ptr gl2
  glcanvas ptr gl3
  button ptr gl2
 ( [varstart] )  ( [varend] ) 
how:
bp's avatar
bp committed
15
  : params   DF[ 0 ]DF X" No Title" ;
bp's avatar
bp committed
16 17 18 19 20 21 22
class;

comp0000 implements
 ( [methodstart] ) : xy-test ( x y b n -- ) 2drop
    DOPRESS cr ." in:" .s cr 2drop 2drop ;
  ( [methodend] ) 
  : widget  ( [dumpstart] )
23
            GL[  ]GL ( MINOS ) ^^ CK[ ( x y b n -- )
bp's avatar
bp committed
24 25 26 27 28 29 30
      dup 1 = if
          ." zx" cr
          xy-test         
      else
          2drop 2drop
      then
      ]CK ( MINOS ) $64 $1 *hfil $64 $1 *vfil glcanvas new  ^^bind gl1
31
            GL[  ]GL ( MINOS ) ^^ CK[ ( x y b n -- )
bp's avatar
bp committed
32 33 34 35 36 37 38
      dup 1 = if
          ." xy" cr
          xy-test
      else
          2drop 2drop
      then
      ]CK ( MINOS ) $64 $1 *hfil $64 $1 *vfil glcanvas new  ^^bind gl2
39
          #2 vabox new
bp's avatar
bp committed
40 41
            GL[  ]GL ( MINOS ) ^^ CK[ ( x y b n -- ) ." zy" cr 2drop
2drop ]CK ( MINOS ) $64 $1 *hfil $64 $1 *vfil glcanvas new  ^^bind gl3
42 43 44 45 46 47
            $64 $1 *hfil $64 $1 *vfil glue new 
          #2 vabox new
        #2 habox new #1 hskips
          ^^ S[ close ]S ( MINOS ) X" done" button new  ^^bind gl2
        #1 vabox new vfixbox 
      #2 vabox new
bp's avatar
bp committed
48 49 50 51 52
    ( [dumpend] ) ;
class;

: main
  comp0000 open-app
53
  event-loop bye ;
bp's avatar
bp committed
54 55
script? [IF]  main  [THEN]
previous previous previous