home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR2
/
CLATPL.ZIP
/
CLARION2.TPX
< prev
next >
Wrap
Text File
|
1993-07-26
|
4KB
|
108 lines
#!------------------------------------------------------------------------------
#!
#! CLARION2.TPX
#!
#! Menu Execute a procedure from a pop-up menu
#! Pulldown Execute a procedure from a pulldown menu
#!
#!------------------------------------------------------------------------------
#!
#PROCEDURE(Menu,'Execute a procedure from a pop-up menu'),SCREEN,PULLDOWN
#!------------------------------------------------------------------------------
#!
#! The Menu Template
#!
#!------------------------------------------------------------------------------
#PROTOTYPE('')
#INSERT(%StandardHeader)
%Procedure PROCEDURE
%LocalData
%ScreenStructure
%PulldownStructure
#EMBED('Data Section')
CODE
#EMBED('Setup Procedure')
OPEN(Screen) #<!Open the screen
#IF(%Pulldown) #!If a Pulldown exists
OPEN(%Pulldown) #<!Open the Pulldown
#ENDIF
#EMBED('Setup Screen')
LOOP #<!Loop through screen fields
#INSERT(%GenerateFormulas)
#EMBED('Top of Accept Loop')
DISPLAY
CASE SELECTED() #<!Jump to field setup routine
#FOR(%ScreenField)
#IF(%ScreenFieldSetup <> %NULL)
OF %ScreenField #<!Edit %ScreenEditField field
%ScreenFieldSetup
#ENDIF
#ENDFOR
END #<!End CASE
ACCEPT #<!Enable mouse and keyboard
CASE KEYCODE()
#FOR(%HotKey)
OF %HotKey !User defined HotKey
%HotKeyProc !HotKey Procedure
#ENDFOR
END
CASE FIELD() #<!Jump to field edit routine
#INSERT(%PulldownEditRoutines)
#FOR(%ScreenField)
OF %ScreenField #<!Edit %ScreenEditField field
%ScreenFieldEdit
#ENDFOR
END #<!End CASE
END #<!End LOOP
#IF(%Pulldown) #!If a Pulldown exists
CLOSE(%Pulldown) #<!Close the Pulldown
#ENDIF
#EMBED('End of Procedure')
#!
#PROCEDURE(Pulldown,'Execute a procedure from a pulldown menu'),PULLDOWN
#!------------------------------------------------------------------------------
#!
#! The Pulldown Template
#!
#!------------------------------------------------------------------------------
#!
#PROTOTYPE('')
#INSERT(%StandardHeader)
%Procedure PROCEDURE
%LocalData
%PulldownStructure
#EMBED('Data Section')
CODE
#EMBED('Setup Procedure')
OPEN(%Pulldown) #<!Open the pulldown menu
#EMBED('Setup Pulldown')
LOOP
#INSERT(%GenerateFormulas)
#EMBED('Top of Accept Loop')
DISABLE(1,FIELDS()) #<!Disable any open screen
ACCEPT #<!Enable mouse and keyboard
ENABLE(1,FIELDS()) #<!Restore any open screen
CLOSE(%Pulldown) #<!Close the pulldown menu
CASE KEYCODE()
#FOR(%HotKey)
OF %HotKey !User defined HotKey
%HotKeyProc !HotKey Procedure
#ENDFOR
END
CASE FIELD() #<!Jump to selected item
#INSERT(%PulldownEditRoutines)
END #<!End CASE
OPEN(%Pulldown) #<!Reopen the pulldown menu
END #<!End LOOP
#EMBED('End of Procedure')
#!
#CHAIN('CLARION3.TPX')