|
/* $VER: DemoRadio 1.0 (23.6.2008)
*/
App.Description='Demo'
App.Copyright ='© 2008 by Robert A. Sisk'
App.Title=word(SourceLine(1),3)
App.Base=App.Title
call AddLib 'rmh.library',0,-30
if RMH_AddLibrary('rexxsupport.library','rxmui.library')>0 then do
call RMH_EasyRequest "Can't open" result,App.Title,'Exit'
signal Exit
end
App.Author=SubWord(App.Copyright,find(App.Copyright,'by')+1)
App.SingleTask=1
App.Version=SubWord(SourceLine(1),2)
App.SubWindow='MainWindow'
MainWindow.ID='Main'
MainWindow.Title=App.Title
Char.Disabled=1
MainWindow.Contents=MakeObj(,'HGroup',,
label('Type'),MakeObj('Type','Radio','||'),,
MakeObj(,'ColGroup',2,,
label('Name'),MakeObj('Name','Cycle','F1|F2|F3'),,
label('Character'),string('Char')))
if NewObj('Application','App')>0 then
signal Exit
SigBreakB_Ctrl_C=12
BreakCSignal=2**SigBreakB_Ctrl_C
call notify 'MainWindow','CloseRequest',1,'App','ReturnID','Quit'
call notify 'Type','Active','EveryTime','Name','Set','Disabled','TriggerValue'
call notify
'Type','Active','EveryTime','Char','Set','Disabled','NotTriggerValue'
call notify 'Char','Disabled',1,'_Self','Set','Contents',''
call set 'MainWindow','Open',1
if ~xGet('App','Iconified') then
if ~xGet('MainWindow','Open') then do
call MUIRequest 'App',,App.Title,'_Exit',"Can't open main window"
signal Exit
end
do forever
call NewHandle 'App','Event',BreakCSignal
if RMH_And(Event.Signals,BreakCSignal)>0 then
call Quit
interpret 'call' Event.Event
end
Quit:
Exit:
exit
|