home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
dos
/
tvision
/
menugen
/
testmenu.pas
< prev
Wrap
Pascal/Delphi Source File
|
1990-12-19
|
1KB
|
43 lines
PROCEDURE TMApp. InitMenuBar;
VAR
R : TRect;
BEGIN
GetExtent (R);
R. B. Y := R. A. Y + 1;
MenuBar := NEW (PMenuBar,
Init (R,
NewMenu (
NewSubMenu ('~F~ile', hcNoContext, NewMenu (
NewItem ('~O~pen', 'F3', kbF3, cmFileOpen, hcNoContext,
NewItem ('~N~ew', 'F4', kbF4, cmNewWin, hcNoContext,
NewLine (
NewItem ('E~x~it', 'Alt-X', kbAltX, cmQuit, hcNoContext,
nil))))),
NewSubMenu ('~W~indow', hcNoContext, NewMenu (
NewItem ('~N~ext', 'F6', kbF6, cmNext, hcNoContext,
NewItem ('~Z~oom', 'F5', kbF5, cmZoom, hcNoContext,
NewItem ('~D~ialog', 'F2', kbF2, cmNewDialog, hcNoContext,
nil)))), nil)))));
END;
PROCEDURE TMApp. InitStatusLine;
VAR
R : TRect;
BEGIN
GetExtent (R);
R. A. Y := R. B. Y - 1;
StatusLine := NEW (PStatusLine,
Init (R,
NewStatusDef (0, $FFFF,
NewStatusKey ('~Alt-X~ Exit', kbAltX, cmQuit,
NewStatusKey ('~F4~ New', kbF4, cmNewWin,
NewStatusKey ('~Alt-F3~ Close', kbAlt3, cmClose,
nil))), nil)));
END;