home *** CD-ROM | disk | FTP | other *** search
- /* Menu.rexx */
-
- IF ~SHOW('LIBRARIES','tritonrexx.library') THEN DO
- IF ~ADDLIB('tritonrexx.library',10,-30,0) THEN DO
- SAY 'Kann die <tritonrexx.library> nicht öffnen!'
- EXIT(10)
- END
- END
-
- windowtags = WindowID(1),
- WindowTitle('Menüs'),
- PubScreenName('CygnusEdScreen1'),
- BeginMenu('Projekt'),
- MenuItem('N_Neu',1),
- MenuItem('O_Öffnen...',2),
- 'ItemBarlabel',
- MenuItem('S_Speichern',3),
- MenuItem('A_Speichern als...',4),
- 'ItemBarlabel',
- MenuItemD('P_Drucken...',5),
- 'ItemBarlabel',
- MenuItem('?_Info',6),
- 'ItemBarlabel',
- MenuItem('Q_Beenden',7),
- BeginMenu('Funktionen'),
- MenuItem('_F1_Funktion 1',11),
- MenuItem('_F2_Funktion 2',12),
- MenuItem('_F3_Funktion 3',13),
- 'ItemBarlabel',
- BeginSub('Hilfe'),
- SubItem('_HELP_Allgemein',14),
- 'SubBarlabel',
- SubItem('_SHIFT HELP_Tips & Tricks',15),
- SubItem('_CTRL HELP_Sonstiges',16),
- 'ItemBarlabel',
- MenuItemC('I_Icons erzeugen?',17),
- MenuItemCC('3_Funktion 3 ein/aus',18),
- 'EndProject'
-
- app = TR_CREATEAPP('TRCA_Name Menu')
-
- IF app ~= '00000000'x THEN DO
-
- window = TR_OPENPROJECT(app,windowtags)
-
- IF window ~= '00000000'x THEN DO
- ende = 0
-
- DO WHILE ende ~= 1
- CALL TR_WAIT(app,'')
-
- DO WHILE TR_HANDLEMSG(app,'event')
- IF event.trm_class = 'TRMS_KEYPRESSED' THEN DO
- qualifier = D2C(event.trm_qualifier)
-
- SELECT
- WHEN event.trm_code = 80 & ~BITTST(qualifier,9) THEN
- SAY 'F1 - Funktion 1'
-
- WHEN event.trm_code = 81 & ~BITTST(qualifier,9) THEN
- SAY 'F2 - Funktion 2'
-
- WHEN event.trm_code = 82 & ~BITTST(qualifier,9) THEN DO
- IF ~TR_GETATTRIBUTE(window,13,'TRAT_Disabled') THEN
- SAY 'F3 - Funktion 3'
- END
-
- WHEN event.trm_code = 95 & ~BITTST(qualifier,9) THEN DO
- IF BITTST(qualifier,3) THEN
- SAY 'CTRL HELP - Hilfe/Sonstiges'
- ELSE
- IF BITTST(qualifier,0) | BITTST(qualifier,1) THEN
- SAY 'SHIFT HELP - Hilfe/Tips & Tricks'
- ELSE
- SAY 'HELP - Hilfe/Allgemein'
- END
-
- OTHERWISE
- NOP
- END
- END
-
- IF event.trm_class = 'TRMS_ACTION' THEN DO
- SELECT
- WHEN event.trm_id = 1 THEN
- SAY 'Neu'
-
- WHEN event.trm_id = 2 THEN
- SAY 'Öffnen'
-
- WHEN event.trm_id = 3 THEN
- SAY 'Speichern'
-
- WHEN event.trm_id = 4 THEN
- SAY 'Speichern als'
-
- WHEN event.trm_id = 5 THEN
- SAY 'Drucken'
-
- WHEN event.trm_id = 6 THEN
- SAY 'Info'
-
- WHEN event.trm_id = 7 THEN
- ende = 1
-
- WHEN event.trm_id = 11 THEN
- SAY 'Funktion 1'
-
- WHEN event.trm_id = 12 THEN
- SAY 'Funktion 2'
-
- WHEN event.trm_id = 13 THEN
- SAY 'Funktion 3'
-
- WHEN event.trm_id = 14 THEN
- SAY 'Allgemeine Hilfe'
-
- WHEN event.trm_id = 15 THEN
- SAY 'Tips & Tricks'
-
- WHEN event.trm_id = 16 THEN
- SAY 'Sonstige Hilfe'
-
- OTHERWISE
- NOP
- END
- END
-
- IF event.trm_class = 'TRMS_NEWVALUE' THEN DO
- SELECT
- WHEN event.trm_id = 17 THEN DO
- IF event.trm_data = 0 THEN
- SAY 'Icons erzeugen ist ausgeschaltet'
- ELSE
- SAY 'Icons erzeugen ist eingeschaltet'
- END
-
- WHEN event.trm_id = 18 THEN
- CALL TR_SETATTRIBUTE(window,13,'TRAT_Disabled',~event.trm_data)
-
- OTHERWISE
- NOP
- END
- END
-
- IF event.trm_class = 'TRMS_CLOSEWINDOW' THEN
- ende = 1
- END
- END
-
- CALL TR_CLOSEPROJECT(window)
- END
-
- CALL TR_DELETEAPP(app)
- END
-
- EXIT(0)
-