home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
swCHIP 1991 January
/
swCHIP_95-1.bin
/
chip
/
tvgenpas
/
demo3pas.exe
/
TEMPLATE
/
MENUBOX.MTF
< prev
next >
Wrap
Text File
|
1994-12-27
|
2KB
|
57 lines
\ ********************************************************
\ Standard menubar template file for TVGen 3.0
\ (c) 1994 BOCIAN Software
\ ********************************************************
\
\ Recursively called procedure building up the menu source
\
@DEFPROC MenuProc
@IFEQUAL %_PARAMETER(2)% %_LEVELID%
\ Follows menu item
@IFEQUAL %_PARAMETER(1)% ITEM
NewItem('%_TEXT%','%_PARAM%',%_HOTKEY%,%_COMMAND%,%_HELPCTX%,
@ASSIGN __LEVEL %_LEVELID%
@NEXTITEM
@CALL MenuProc %_ITEMTYPE% %__LEVEL%
@NOCR )
@ENDIF (ifequal %_parameter(1)%)
\ Follows submenu
@IFEQUAL %_PARAMETER(1)% SUBMENU
NewSubMenu('%_TEXT%',%_HELPCTX%,NewMenu(
@ASSIGN __LEVEL %_ITEMID%
@NEXTITEM
@CALL MenuProc %_ITEMTYPE% %__LEVEL%
),
@ASSIGN __LEVEL %_PARAMETER(2)%
@CALL MenuProc %_ITEMTYPE% %__LEVEL%
@NOCR )
@ENDIF (ifequal %_parameter(1)%)
\ Follows divider line
@IFEQUAL %_PARAMETER(1)% LINE
NewLine(
@ASSIGN __LEVEL %_LEVELID%
@NEXTITEM
@CALL MenuProc %_ITEMTYPE% %__LEVEL%
@NOCR )
@ENDIF (ifequal %_parameter(1)%)
@ELSE
@NOCR nil
@ENDIF (ifequal %_parameter(2)%)
@ENDPROC
\
\
\ Main template sequence
@DEFINEFILE 1 %_OUTFILE%.INX
@FILE 1
@ASKFOR __MENUPROC 'MenuProc' Menu Procedure Name
function %__MENUPROC%(Bounds : TRect): PMenuBox;
begin
%__MENUPROC%:=New(PMenuBox,Init(Bounds,NewMenu(
@FIRSTITEM
@CALL MenuProc %_ITEMTYPE% %_LEVELID%
),nil));
end;
{ ************ Generated by TVGen 3.0 ************** }
@CLOSEFILE 1