1 /* REXX test script for rexxbgui.library */
3 if ~show
('l','rexxbgui.library') then do
4 if ~addlib
('rexxbgui.library',0,-30) then do
11 call bguiopen
() /* causes error 12 if it did not work */
12 /* supply a second argument for a '0' return code instead of an ARexx
15 signal on syntax /* important: bguiclose() MUST be called */
26 call bguilist
('cycent','Entry #1','Entry #2','Entry #3','Entry #4',,
29 /* using ARexx feature: ,<newline> is translated to nothing */
30 /* the || are essential - any added space will cause trouble */
31 /* redefining the same ID makes previous buttons unaccessible */
32 /* do not redefine winclose etc. */
35 bguiinfo
('inf',,esc
'cRexxBGUI 3.0 new features')||,
36 bguihseparator
('Versions')||bguilayout
(LGO_FixMinHeight
,1)||,
37 bguiinfo
('ver','BGUI',bguiversion
())||,
38 bguiinfo
('rver','RexxBGUI',bguirexxversion
())||,
39 bguiinteger
('vertest','_Test BGUI version 41.')||bguilayout
(LGO_FixMinHeight
,1)||,
40 bguihseparator
('Vertical separator')||bguilayout
(LGO_FixMinHeight
,1)||,
42 bguibutton
('noop1','_Some button')||,
43 bguivseparator
()||bguilayout
(LGO_FixMinWidth
,1)||,
44 bguibutton
('noop2','_Another button'),
46 bguihseparator
('Cycle gadgets')||bguilayout
(LGO_FixMinHeight
,1)||,
47 bguicycle
('cyc1','_Normal','cycent','N')||bguilayout
(LGO_FixMinHeight
,1)||,
48 bguicycle
('cyc2','_Forced popup','cycent','P')||bguilayout
(LGO_FixMinHeight
,1)||,
49 bguihseparator
()||bguilayout
(LGO_FixMinHeight
,1)||,
52 bguibutton
('quit','_Quit')||,
54 )||bguilayout
(LGO_FixMinHeight
,1),
55 ,grspace
.normal
,grspace
.normal
)
57 a
=bguiwindow
('RexxBGUI 3.0 new features',g
,50,'-0',,arg(1))
59 if bguiwinopen
(a
)=0 then bguierror
(12)
62 do while bguiwinwaitevent
(a
,'ID')~
=id
.winclose
64 when id
=id
.quit
then leave
65 when id
=id
.winclose
then nop
66 when id
=id
.vertest
then do
67 rev
=bguiget
(obj
.vertest
,STRINGA_LongVal
)
68 if bguiversion
(41,rev
) then,
69 call bguireq
('At least version 41.'rev
'of BGUI.','*_OK',,a
)
71 call bguireq
('Version 41.'rev
'of BGUI not available.','*_OK',,a
)
79 if rc~
=0 then say '+++ ['rc']' errortext(rc) 'at line' sigl
86 say '+++ Break at line' sigl